fix: 报告下载 token过期下载文件错误
This commit is contained in:
@@ -188,6 +188,8 @@ export default {
|
||||
} else if (!localStorage.getItem(storageKey.token) && n === 1) {
|
||||
return window.location.replace('/')
|
||||
}
|
||||
get(api.reportTemp).then(res => {
|
||||
if (res.code === 200) {
|
||||
axios.get(url, { responseType: 'blob', params: params }).then(res => {
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
// 兼容ie11
|
||||
@@ -233,6 +235,8 @@ export default {
|
||||
this.$refs.dataTable.loadingTableId = !u.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
preview (u) {
|
||||
if (this.$refs.dataTable.loadingPreviewId === u.id) { // 列表单个下载
|
||||
|
||||
Reference in New Issue
Block a user