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(); } });