fix(测试跟踪): 修复测试报告、任务中心状态显示不一致的缺陷

--bug=1013357 --user=王孝刚 【通用设置】测试计划报告-接口测试报告和任务中心报告-running
+stopped字体大小写和颜色不一致 https://www.tapd.cn/55049933/s/1161910
This commit is contained in:
wxg0103 2022-05-23 11:09:35 +08:00 committed by f2c-ci-robot[bot]
parent cd2f3b5997
commit 2730922faa
3 changed files with 46 additions and 26 deletions

View File

@ -1,25 +1,25 @@
<template>
<div>
<el-tag size="mini" type="info" v-if="row.status === 'Starting'">
{{ getStatus(row.status) }}
{{ showStatus(row.status) }}
</el-tag>
<el-tag size="mini" type="primary" effect="plain" v-else-if="row.status === 'Running'">
{{ getStatus(row.status) }}
{{ showStatus(row.status) }}
</el-tag>
<el-tag size="mini" type="success" v-else-if="getStatus(row.status) === 'success'">
{{ getStatus(row.status) }}
{{ showStatus(row.status) }}
</el-tag>
<el-tag size="mini" type="warning" v-else-if="row.status === 'Reporting'">
{{ getStatus(row.status) }}
{{ showStatus(row.status) }}
</el-tag>
<el-tag size="mini" type="danger" v-else-if="getStatus(row.status) === 'error'">
{{ getStatus(row.status) }}
{{ showStatus(row.status) }}
</el-tag>
<el-tag size="mini" type="danger" style="background-color: #F6972A; color: #FFFFFF" v-else-if="row.status === 'errorReportResult'">
{{ $t('error_report_library.option.name') }}
</el-tag>
<el-tag v-else size="mini" type="info">
{{ getStatus(row.status) }}
{{ showStatus(row.status) }}
</el-tag>
</div>
</template>
@ -31,10 +31,14 @@
props: {
row: Object
},
methods:{
getStatus(status){
methods: {
getStatus(status) {
return status.toLowerCase();
},
showStatus(status) {
return status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1);
}
}
}
</script>

View File

@ -111,20 +111,28 @@
<el-col :span="4">
<span v-if="item.executionStatus && item.executionStatus.toLowerCase() === 'error'"
class="ms-task-error">
error
Error
</span>
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'success'"
class="ms-task-success">
success
Success
</span>
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'stop'">
stopped
<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() === 'errorreportresult'" class="ms-task-error-report-status">
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'errorreportresult'"
class="ms-task-error-report-status">
{{ $t('error_report_library.option.name') }}
</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() : item.executionStatus }}
{{
item.executionStatus ? item.executionStatus.toLowerCase()[0].toUpperCase() + item.executionStatus.toLowerCase().substr(1) : item.executionStatus
}}
</span>
</el-col>
</el-row>
@ -182,16 +190,16 @@ export default {
],
runStatus: [
{id: '', label: this.$t('api_test.definition.document.data_set.all')},
{id: 'saved', label: 'saved'},
{id: 'starting', label: 'starting'},
{id: 'running', label: 'running'},
{id: 'reporting', label: 'reporting'},
{id: 'completed', label: 'completed'},
{id: 'error', label: 'error'},
{id: 'success', label: 'success'},
{id: 'waiting', label: 'waiting'},
{id: 'fail', label: 'fail'},
{id: 'stop', label: 'stopped'}
{id: 'saved', label: 'Saved'},
{id: 'starting', label: 'Starting'},
{id: 'running', label: 'Running'},
{id: 'reporting', label: 'Reporting'},
{id: 'completed', label: 'Completed'},
{id: 'error', label: 'Error'},
{id: 'success', label: 'Success'},
{id: 'waiting', label: 'Waiting'},
{id: 'fail', label: 'Fail'},
{id: 'stop', label: 'Stopped'}
],
condition: {triggerMode: "", executionStatus: ""},
maintainerOptions: [],
@ -548,6 +556,14 @@ export default {
color: #67C23A;
}
.ms-task-stopped {
color: #909399;
}
.ms-task-running {
color: #783887;
}
.ms-task-name-width {
display: inline-block;
overflow-x: hidden;

View File

@ -81,11 +81,11 @@
sortable
:label="$t('commons.status')">
<template v-slot:default="scope">
<ms-tag v-if="scope.row.status == 'RUNNING'" type="success" effect="plain" :content="'Running'"/>
<ms-tag v-if="scope.row.status == 'RUNNING'" type="primary" effect="plain" :content="'Running'"/>
<ms-tag
v-else-if="scope.row.status == 'COMPLETED'||scope.row.status == 'SUCCESS'||scope.row.status == 'FAILED'"
type="info" effect="plain" :content="'Completed'"/>
<ms-tag v-else type="effect" effect="plain" :content="scope.row.status"/>
<ms-tag v-else type="info" effect="plain" :content="scope.row.status"/>
</template>
</ms-table-column>