From 3e4e1272e637c3f5a92f7587390cec18677d74a6 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 2 Feb 2021 18:53:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=88=97=E8=A1=A8tag=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/ApiFailureCasesList.vue | 16 +++++++++++++++- .../component/ScenarioFailureCasesList.vue | 12 ++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue index e8ee8e8118..577bb76a46 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue @@ -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 @@ +k diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue index 7370bcbedd..711f5ed5a7 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue @@ -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); + } + }); } } }