diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue index 5a7971e6e4..f2d1156cb2 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue @@ -1,12 +1,9 @@ @@ -81,6 +78,17 @@ } } }, + computed: { + showFunctional() { + return this.failureTestCases.functionalTestCases.length > 0 || (this.failureTestCases.apiTestCases.length <= 0 && this.failureTestCases.scenarioTestCases.length <= 0); + }, + showApi() { + return this.failureTestCases.apiTestCases.length > 0; + }, + showScenario() { + return this.failureTestCases.scenarioTestCases.length > 0; + } + }, methods: { goFailureTestCase(row) { hub.$emit("openFailureTestCase", row); @@ -98,7 +106,7 @@ } .failure-cases-list { - margin-bottom: 30px; + margin-bottom: 40px; } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue index a913852b38..1412d990a7 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue @@ -2,25 +2,25 @@ - + @@ -76,6 +76,30 @@ } } }, + computed: { + showFunctional() { + return this.executeResult.functionalResult.length > 0 || (this.executeResult.apiResult.length <= 0 && this.executeResult.scenarioResult.length <= 0); + }, + showApi() { + return this.executeResult.apiResult.length > 0; + }, + showScenario() { + return this.executeResult.scenarioResult.length > 0; + }, + isShowOne() { + let count = 0; + if (this.showFunctional) { + count++; + } + if (this.showApi) { + count++; + } + if (this.showScenario) { + count++; + } + return count === 1; + } + }, watch: { executeResult() { this.getCharData(); @@ -141,4 +165,8 @@ display: inline-block; } + .show-one .char-item { + display: block; + } + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue b/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue index 27bdee8af1..fa8a85e64b 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue @@ -1,36 +1,35 @@