Commit 4f58e07f by 张立顺

优化导出逻辑

1 parent 61720aa3
...@@ -204,10 +204,11 @@ export default { ...@@ -204,10 +204,11 @@ export default {
// } // }
this.dowloadTimerNum++ this.dowloadTimerNum++
}, },
async getDownloaduuid() { getDownloaduuid() {
if (this.pollDownloadList.length >= 3) return if (this.pollDownloadList.length >= 3) return
const params = Object.assign(this.waitDownloadList[0]) const params = Object.assign(this.waitDownloadList[0])
const result = await asyncExportExcel({ exportParam: params.exportParam }) // async const result = await
params && asyncExportExcel({ exportParam: params.exportParam }).then((result) => {
if (result) { if (result) {
const list = this.dowloadList.map((item) => { const list = this.dowloadList.map((item) => {
if (item.timeid == params.timeid) { if (item.timeid == params.timeid) {
...@@ -219,6 +220,10 @@ export default { ...@@ -219,6 +220,10 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: 'dowloadList' })
!this.isWorking && this.getDownloadslistInfo() !this.isWorking && this.getDownloadslistInfo()
} }
}).catch((err) => {
console.log(err)
})
// console.log(result) // console.log(result)
}, },
getDownloadslistInfo() { getDownloadslistInfo() {
......
...@@ -129,7 +129,7 @@ service.interceptors.response.use( ...@@ -129,7 +129,7 @@ service.interceptors.response.use(
// 这个状态码是和后端约定的 // 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断 // 有 code 代表这是一个后端接口 可以进行进一步的判断
var goBackArr = ["20", "21"] var goBackArr = ["20", "21"]
console.log(dataAxios[ruleResult.code_key]) // console.log(dataAxios[ruleResult.code_key])
if (goBackArr.includes(dataAxios[ruleResult.code_key])) { if (goBackArr.includes(dataAxios[ruleResult.code_key])) {
// await store.dispatch('d2admin/account/logout') // await store.dispatch('d2admin/account/logout')
store.dispatch("d2admin/user/clear") 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!