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