From c8f165dd7de0114cda039c58c3184d2f58858b43 Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Wed, 10 Jul 2024 16:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E9=A2=98=E5=AF=BC=E5=85=A5=E3=80=81?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/exam/QuController.java | 1 + .../main/resources/templates/system/elExam/qu/qu.html | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/QuController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/QuController.java index 248c69c..c5fbe78 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/QuController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/QuController.java @@ -187,6 +187,7 @@ public class QuController extends BaseController { @ApiOperation("导入Excel") + @RequiresPermissions("system:qu:import") @ResponseBody @PostMapping( "/import") public AjaxResult importFile(@RequestParam("file") MultipartFile file) { diff --git a/ruoyi-admin/src/main/resources/templates/system/elExam/qu/qu.html b/ruoyi-admin/src/main/resources/templates/system/elExam/qu/qu.html index 947e172..c91657b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/elExam/qu/qu.html +++ b/ruoyi-admin/src/main/resources/templates/system/elExam/qu/qu.html @@ -39,7 +39,7 @@ 删除 - + 导入 @@ -110,6 +110,7 @@ // function toImport(){ // $.modal.open("试题导入", prefix + "/toImport",'500','300'); // } + console.log(document.getElementsByClassName('fixed-sidebar')) // 请求实例 const instance = axios.create({ baseURL: ctx, @@ -151,7 +152,12 @@ formData.append(key, data[key]) }) } - + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); return new Promise((resolve, reject) => { instance.request({ url: url, @@ -159,6 +165,7 @@ data: formData, timeout: 1200000 }).then(response => { + loading.close(); console.log(response) resolve(response) }).catch(err => {