fix(测试跟踪): 测试报告-接口用例-执行结果pending状态后多显示了.

--bug=1028817 --user=白奇 【测试跟踪】测试报告-接口用例-执行结果pending状态后多显示了. https://www.tapd.cn/55049933/s/1408430
This commit is contained in:
baiqi 2023-08-25 15:06:20 +08:00 committed by fit2-zhao
parent 025c9eed41
commit 5bc4a651f0
1 changed files with 27 additions and 14 deletions

View File

@ -1,16 +1,29 @@
<template>
<div style="display: inline">
<el-tag size="mini" type="primary" effect="plain" v-if="getStatus(status) === 'running'">
<div>
<el-tag
size="mini"
type="primary"
effect="plain"
v-if="getStatus(status) === 'running'"
>
{{ showStatus(status) }}
</el-tag>
<el-tag size="mini" type="success" v-else-if="getStatus(status) === 'success'">
<el-tag
size="mini"
type="success"
v-else-if="getStatus(status) === 'success'"
>
{{ showStatus(status) }}
</el-tag>
<el-tag size="mini" type="danger" v-else-if="getStatus(status) === 'error'">
{{ showStatus(status) }}
</el-tag>
<el-tag size="mini" type="danger" style="background-color: #F6972A; color: #FFFFFF"
v-else-if="getStatus(status) === 'fake_error'">
<el-tag
size="mini"
type="danger"
style="background-color: #f6972a; color: #ffffff"
v-else-if="getStatus(status) === 'fake_error'"
>
FakeError
</el-tag>
<el-tag v-else size="mini" type="info">
@ -24,7 +37,7 @@ export default {
name: "MsTestPlanApiStatus",
props: {
status: String
status: String,
},
methods: {
getStatus(status) {
@ -35,14 +48,14 @@ export default {
},
showStatus(status) {
if (!status) {
status = 'PENDING';
status = "PENDING";
}
return status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1);
}
}
}
return (
status.toLowerCase()[0].toUpperCase() + status.toLowerCase().substr(1)
);
},
},
};
</script>
<style scoped>
</style>
<style scoped></style>