From ae1f15d3a2c8cd767eb61b87aa6950078180140f Mon Sep 17 00:00:00 2001 From: flower Date: Wed, 16 Jan 2019 21:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=83=E4=B9=A0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/exam/examQuestion/examQuestion.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ruoyi-exam/src/main/resources/templates/exam/examQuestion/examQuestion.html b/ruoyi-exam/src/main/resources/templates/exam/examQuestion/examQuestion.html index 2a3abebd2..fa35f769b 100644 --- a/ruoyi-exam/src/main/resources/templates/exam/examQuestion/examQuestion.html +++ b/ruoyi-exam/src/main/resources/templates/exam/examQuestion/examQuestion.html @@ -101,7 +101,7 @@ @@ -151,7 +151,6 @@ title: '问题类型', sortable: true, formatter: function (value, item, index) { - debugger return $.table.selectDictLabel(type, item.type); } @@ -262,8 +261,12 @@ $.modal.alertWarning("请选择试题分类"); return; } - - + if(!document.getElementById("questionFile").files[0]){ + $.modal.alertWarning("请选择导入文件"); + return; + } + $(".myModalClose").click(); + $.modal.loading("正在导入数据,请稍后..."); var formData = new FormData(); formData.append("file", document.getElementById("questionFile").files[0]); formData.append("categoryId", $("#categoryId").val()); @@ -280,8 +283,9 @@ $('#myModal').modal('hide') $.table.search(); }else{ - $.modal.msgError(result.msg); + $.modal.msgError("导入失败"+data.msg); } + $.modal.closeLoading(); } });