Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zhanbo.xu
2026-02-07 14:23:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
317a9a72285c95682ad750421def72494d427bc9
317a9a72
1 parent
6138ad2d
feat: 优化导出配置10103的情况
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
src/views/exportListQuery/index.vue
src/views/exportListQuery/index.vue
View file @
317a9a7
...
...
@@ -428,6 +428,8 @@ export default {
pollInterval: 5000, // 轮询间隔(5秒)
isPolling: false, // 轮询状态标识
currentTaskId: null,
maxPollCount: 0,
pollCount: 0,
};
},
created() {
...
...
@@ -548,7 +550,7 @@ export default {
debugger;
let jsonData = JSON.parse(reader.result);
if (jsonData.code == "10103") {
this.startPolling();
this.startPolling(
50
);
return;
}
this.alertWarningMsg(jsonData.message);
...
...
@@ -606,7 +608,7 @@ export default {
this.handleFailure();
this.alertWarningMsg(result.data.errorMessage);
} else {
this.startPolling(); // 启动轮询
this.startPolling(
0
); // 启动轮询
}
} else {
this.stopPolling();
...
...
@@ -619,11 +621,29 @@ export default {
}
},
// 启动轮询
startPolling() {
startPolling(maxPollCount) {
// if (this.isPolling) return;
// this.isPolling = true;
// this.pollTimer = setInterval(() => {
// this.pollStatus();
// }, this.pollInterval);
if (this.isPolling) return;
this.isPolling = true;
this.pollCount = 0; // 初始化轮询计数器
this.maxPollCount = maxPollCount; // 设置最大轮询次数
this.pollTimer = setInterval(() => {
this.pollCount++; // 每次轮询增加计数
// 检查是否达到最大轮询次数
if (this.pollCount > this.maxPollCount && this.maxPollCount !== 0) {
this.stopPolling();
this.alertWarningMsg("导出失败!");
return;
}
this.pollStatus();
}, this.pollInterval);
},
...
...
@@ -679,7 +699,7 @@ export default {
if (+res.code === 200) {
console.log(res);
this.currentTaskId = res.data;
this.startPolling();
this.startPolling(
0
);
}
});
// this.fileDownload
...
...
Please
register
or
login
to post a comment