Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4f58e07f
authored
Aug 18, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化导出逻辑
1 parent
61720aa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
src/layout/header-aside/components/header-user/index.vue
src/plugin/axios/index.js
src/layout/header-aside/components/header-user/index.vue
View file @
4f58e07
...
...
@@ -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
()
{
...
...
src/plugin/axios/index.js
View file @
4f58e07
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment