fix(UI 自动化): 测试报告状态统一

--bug=1013989 --user=张大海 [通用设置]任务中心-状态列表中应按照报告结果情况列出所有状态并保持中英文一致 https://www.tapd.cn/55049933/s/1182594
This commit is contained in:
zhangdahai112 2022-06-15 15:44:05 +08:00 committed by f2c-ci-robot[bot]
parent d2e9044613
commit c81bbf5754
1 changed files with 13 additions and 7 deletions

View File

@ -1,30 +1,30 @@
<template> <template>
<div> <div>
<el-tag size="mini" type="info" v-if="row.status === 'Starting'"> <el-tag size="mini" type="info" v-if="row.status === 'Starting'">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
<el-tag size="mini" type="primary" effect="plain" v-else-if="row.status === 'Running'"> <el-tag size="mini" type="primary" effect="plain" v-else-if="row.status === 'Running'">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
<el-tag size="mini" type="success" v-else-if="row.status === 'Success'"> <el-tag size="mini" type="success" v-else-if="row.status === 'Success'">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
<el-tag size="mini" type="warning" v-else-if="row.status === 'Reporting'"> <el-tag size="mini" type="warning" v-else-if="row.status === 'Reporting'">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
<el-tooltip placement="top" v-else-if="row.status === 'Error' && row.description" effect="light"> <el-tooltip placement="top" v-else-if="row.status === 'Error' && row.description" effect="light">
<template v-slot:content> <template v-slot:content>
<div>{{row.description}}</div> <div>{{row.description}}</div>
</template> </template>
<el-tag size="mini" type="danger"> <el-tag size="mini" type="danger">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
</el-tooltip> </el-tooltip>
<el-tag v-else-if="row.status === 'Error' && !row.description" size="mini" type="danger"> <el-tag v-else-if="row.status === 'Error' && !row.description" size="mini" type="danger">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
<el-tag v-else size="mini" type="info"> <el-tag v-else size="mini" type="info">
{{ row.status }} {{ showStatus(row.status) }}
</el-tag> </el-tag>
</div> </div>
</template> </template>
@ -35,6 +35,12 @@
props: { props: {
row: Object row: Object
},
methods: {
showStatus(status) {
return status === "unexecute" ? "NotExecute" :
status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1);
}
} }
} }
</script> </script>