!383 下载方法新增遮罩层

Merge pull request !383 from 梁剑锋/dev
This commit is contained in:
疯狂的狮子Li 2023-07-04 06:50:19 +00:00 committed by Gitee
commit 2c3d2e4ea3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -34,6 +34,7 @@ export default {
},
zip(url, name) {
var url = baseURL + url
downloadLoadingInstance = Loading.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)
Message.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close();
})
},
saveAs(text, name, opts) {