Commit 4f58e07f by 张立顺

优化导出逻辑

1 parent 61720aa3
......@@ -204,21 +204,26 @@ export default {
// }
this.dowloadTimerNum++
},
async getDownloaduuid() {
getDownloaduuid() {
if (this.pollDownloadList.length >= 3) return
const params = Object.assign(this.waitDownloadList[0])
const result = await asyncExportExcel({ exportParam: params.exportParam })
if (result) {
const list = this.dowloadList.map((item) => {
if (item.timeid == params.timeid) {
item.status = 'polling'
item.uuid = result
}
return item
})
this.actionSetDownloadList({ list, type: 'dowloadList' })
!this.isWorking && this.getDownloadslistInfo()
}
// async const result = await
params && asyncExportExcel({ exportParam: params.exportParam }).then((result) => {
if (result) {
const list = this.dowloadList.map((item) => {
if (item.timeid == params.timeid) {
item.status = 'polling'
item.uuid = result
}
return item
})
this.actionSetDownloadList({ list, type: 'dowloadList' })
!this.isWorking && this.getDownloadslistInfo()
}
}).catch((err) => {
console.log(err)
})
// console.log(result)
},
getDownloadslistInfo() {
......
......@@ -129,7 +129,7 @@ service.interceptors.response.use(
// 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断
var goBackArr = ["20", "21"]
console.log(dataAxios[ruleResult.code_key])
// console.log(dataAxios[ruleResult.code_key])
if (goBackArr.includes(dataAxios[ruleResult.code_key])) {
// await store.dispatch('d2admin/account/logout')
store.dispatch("d2admin/user/clear")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!