From 775bd5925a76bd2a501b850fc81cf53633eca39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 4 Jul 2023 16:38:43 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=B8=8B?= =?UTF-8?q?=E8=BD=BDzip=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0=E9=81=AE?= =?UTF-8?q?=E7=BD=A9=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui-vue3/src/plugins/download.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruoyi-ui-vue3/src/plugins/download.js b/ruoyi-ui-vue3/src/plugins/download.js index 0613085ae..29dd469c3 100644 --- a/ruoyi-ui-vue3/src/plugins/download.js +++ b/ruoyi-ui-vue3/src/plugins/download.js @@ -34,6 +34,7 @@ export default { }, zip(url, name) { var url = baseURL + url + downloadLoadingInstance = ElLoading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) axios({ method: 'get', url: url, @@ -50,6 +51,11 @@ export default { } else { this.printErrMsg(res.data); } + downloadLoadingInstance.close(); + }).catch((r) => { + console.error(r) + ElMessage.error('下载文件出现错误,请联系管理员!') + downloadLoadingInstance.close(); }) }, saveAs(text, name, opts) {