fix(任务中心): 任务状态判断修改

This commit is contained in:
fit2-zhao 2021-06-18 17:25:07 +08:00 committed by fit2-zhao
parent f6de3ae50e
commit 50aec19f8f
1 changed files with 26 additions and 20 deletions

View File

@ -111,14 +111,19 @@ export default {
this.showTaskCenter();
},
getPercentage(status) {
if (status === 'Saved' || status === 'Completed' || status === 'success' || status === 'error') {
if (status) {
status = status.toLowerCase();
if (status === 'saved' || status === 'completed' || status === 'success' || status === 'error') {
return 100;
}
}
//return Math.round(Math.random() * 80 + 20);
return 60;
},
showReport(row, env) {
let status = row.executionStatus;
if (status) {
status = row.executionStatus.toLowerCase();
if (status === 'Saved' || status === 'Completed' || status === 'success' || status === 'error') {
this.taskVisible = false;
switch (row.executionModule) {
@ -139,6 +144,7 @@ export default {
} else {
this.$warning("正在运行中,请稍后查看");
}
}
},
getExecResult(reportId) {