refactor(接口测试): 任务中心和报告列表状态统一
--bug=1013989 --user=赵勇 [通用设置]任务中心-状态列表中应按照报告结果情况列出所有状态并保持中英文一致 https://www.tapd.cn/55049933/s/1180637
This commit is contained in:
parent
b06ca671eb
commit
0028f296f4
|
@ -36,9 +36,9 @@
|
|||
return status.toLowerCase();
|
||||
},
|
||||
showStatus(status) {
|
||||
return status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1);
|
||||
return status === "unexecute"? "NotExecute":
|
||||
status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -111,34 +111,8 @@
|
|||
<el-progress :percentage="getPercentage(item.executionStatus)" :format="format"/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span v-if="item.executionStatus && item.executionStatus.toLowerCase() === 'error'"
|
||||
class="ms-task-error">
|
||||
Error
|
||||
</span>
|
||||
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'success'"
|
||||
class="ms-task-success">
|
||||
Success
|
||||
</span>
|
||||
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'stop'"
|
||||
class="ms-task-stopped">
|
||||
Stopped
|
||||
</span>
|
||||
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'unexecute'"
|
||||
class="ms-task-stopped">
|
||||
Unexecuted
|
||||
</span>
|
||||
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'errorreportresult'"
|
||||
class="ms-task-error-report-status">
|
||||
FakeError
|
||||
</span>
|
||||
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'running'"
|
||||
class="ms-task-running">
|
||||
Running
|
||||
</span>
|
||||
<span v-else>
|
||||
{{
|
||||
item.executionStatus ? item.executionStatus.toLowerCase()[0].toUpperCase() + item.executionStatus.toLowerCase().substr(1) : item.executionStatus
|
||||
}}
|
||||
<span :class="showClass(item.executionStatus.toLowerCase())">
|
||||
{{ showStatus(item.executionStatus.toLowerCase()) }}
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -244,6 +218,22 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
showStatus(status) {
|
||||
status = status.toLowerCase();
|
||||
switch (status) {
|
||||
case "unexecute":
|
||||
return "NotExecute";
|
||||
case "errorreportresult":
|
||||
return "FakeError";
|
||||
case "stop":
|
||||
return "Stopped";
|
||||
default:
|
||||
return status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1);
|
||||
}
|
||||
},
|
||||
showClass(status) {
|
||||
return "ms-task-" + status;
|
||||
},
|
||||
nextData() {
|
||||
this.loading = true;
|
||||
this.init();
|
||||
|
@ -554,7 +544,7 @@ export default {
|
|||
color: #F56C6C;
|
||||
}
|
||||
|
||||
.ms-task-error-report-status {
|
||||
.ms-task-errorreportresult {
|
||||
color: #F6972A;
|
||||
}
|
||||
|
||||
|
@ -564,11 +554,15 @@ export default {
|
|||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.ms-task-unexecute {
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.ms-task-success {
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.ms-task-stopped {
|
||||
.ms-task-stop {
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue