fix: 测试计划场景列表tag显示问题

This commit is contained in:
chenjianxing 2021-02-02 18:53:57 +08:00
parent f70995e175
commit 3e4e1272e6
2 changed files with 27 additions and 1 deletions

View File

@ -60,9 +60,23 @@
name: "ApiFailureCasesList",
components: {MsTag, PriorityTableItem, TypeTableItem, MethodTableItem, StatusTableItem},
props: ['apiTestCases'],
watch: {
apiTestCases() {
this.parseTags();
}
},
methods: {
goFailureTestCase(row) {
this.$emit("openFailureTestCase", row);
},
parseTags() {
if (this.apiTestCases) {
this.apiTestCases.forEach(item => {
if (item.tags && item.tags.length > 0) {
item.tags = JSON.parse(item.tags);
}
});
}
}
}
}
@ -70,4 +84,4 @@
<style scoped>
</style>
</style>k

View File

@ -64,9 +64,21 @@
name: "ScenarioFailureCasesList",
components: {MsTag, PriorityTableItem, TypeTableItem, MethodTableItem, StatusTableItem},
props: ['scenarioTestCases'],
watch: {
scenarioTestCases() {
this.parseTags();
}
},
methods: {
goFailureTestCase(row) {
this.$emit("openFailureTestCase", row);
},
parseTags() {
this.scenarioTestCases.forEach(item => {
if (item.tags && item.tags.length > 0) {
item.tags = JSON.parse(item.tags);
}
});
}
}
}