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> <template>
<div style="display: inline"> <div>
<el-tag size="mini" type="primary" effect="plain" v-if="getStatus(status) === 'running'"> <el-tag
size="mini"
type="primary"
effect="plain"
v-if="getStatus(status) === 'running'"
>
{{ showStatus(status) }} {{ showStatus(status) }}
</el-tag> </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) }} {{ showStatus(status) }}
</el-tag> </el-tag>
<el-tag size="mini" type="danger" v-else-if="getStatus(status) === 'error'"> <el-tag size="mini" type="danger" v-else-if="getStatus(status) === 'error'">
{{ showStatus(status) }} {{ showStatus(status) }}
</el-tag> </el-tag>
<el-tag size="mini" type="danger" style="background-color: #F6972A; color: #FFFFFF" <el-tag
v-else-if="getStatus(status) === 'fake_error'"> size="mini"
type="danger"
style="background-color: #f6972a; color: #ffffff"
v-else-if="getStatus(status) === 'fake_error'"
>
FakeError FakeError
</el-tag> </el-tag>
<el-tag v-else size="mini" type="info"> <el-tag v-else size="mini" type="info">
@ -24,7 +37,7 @@ export default {
name: "MsTestPlanApiStatus", name: "MsTestPlanApiStatus",
props: { props: {
status: String status: String,
}, },
methods: { methods: {
getStatus(status) { getStatus(status) {
@ -35,14 +48,14 @@ export default {
}, },
showStatus(status) { showStatus(status) {
if (!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> </script>
<style scoped> <style scoped></style>
</style>