jinhui.wang

下载文件错误处理。

......@@ -127,7 +127,8 @@ export function downloadAsyncExportByTaskId(taskId, options = {}) {
if (reader.result && reader.result != null && reader.result != "") {
try {
const jsonData = JSON.parse(reader.result);
if (jsonData.code == "10103") {
console.log(jsonData);
if (jsonData.code == "100211") {
if (retryCount < maxRetry) {
setTimeout(() => {
downloadAsyncExportByTaskId(taskId, {
......
......@@ -548,7 +548,7 @@ export default {
if (JSON.parse(reader.result)) {
debugger;
let jsonData = JSON.parse(reader.result);
if (jsonData.code == "10103") {
if (jsonData.code == "100211") {
// 检查重试次数
if (retryCount < 50) {
// 延迟后重试
......
......@@ -430,14 +430,14 @@ export default {
await this.callOtherApi(); // 调用其他接口
} else if (result.data.status === "FAILED") {
this.stopPolling();
this.handleFailure();
// this.handleFailure();
this.alertWarningMsg(result.data.errorMessage);
} else {
this.startPolling(); // 启动轮询
}
} else {
this.stopPolling();
this.handleFailure();
// this.handleFailure();
}
// 其他状态继续轮询
} catch (error) {
......
......@@ -1368,7 +1368,7 @@ export default {
if (JSON.parse(reader.result)) {
debugger;
let jsonData = JSON.parse(reader.result);
if (jsonData.code == "10103") {
if (jsonData.code == "100211") {
// 检查重试次数
if (retryCount < 50) {
// 延迟后重试
......