diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanApiReport.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanApiReport.vue index 8a196e9487..0ec68074d9 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanApiReport.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanApiReport.vue @@ -4,11 +4,17 @@ - - + + + - - + + + @@ -20,12 +26,15 @@ import ApiResult from "@/business/components/track/plan/view/comonents/report/de import TestPlanReportContainer from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContainer"; import ApiCases from "@/business/components/track/plan/view/comonents/report/detail/component/ApiCases"; +import TabPaneCount from "@/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount"; export default { name: "TestPlanApiReport", - components: {ApiCases, TestPlanReportContainer, ApiResult, MsFormDivider}, + components: {TabPaneCount, ApiCases, TestPlanReportContainer, ApiResult, MsFormDivider}, data() { return { - activeName: 'first' + activeName: 'first', + failureSize: 0, + allSize: 0, }; }, props: [ @@ -69,6 +78,12 @@ export default { this.activeName = 'third'; } }, + setFailureSize(size) { + this.failureSize = size; + }, + setAllSize(size) { + this.allSize = size; + }, handleClick(tab, event) { } } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue index 2f22c4999e..824eda9f5d 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue @@ -4,14 +4,23 @@ - - + + + - - + + + - - + + + @@ -26,12 +35,18 @@ import FunctionalIssueList from "@/business/components/track/plan/view/comonents/report/detail/component/FunctionalIssueList"; import TestPlanReportContainer from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContainer"; +import TabPaneCount from "@/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount"; export default { name: "TestPlanFunctionalReport", - components: {TestPlanReportContainer, FunctionalIssueList, FunctionalCases, FunctionalResult, MsFormDivider}, + components: { + TabPaneCount, + TestPlanReportContainer, FunctionalIssueList, FunctionalCases, FunctionalResult, MsFormDivider}, data() { return { - activeName: 'first' + activeName: 'first', + failureSize: 0, + issueSize: 0, + allSize: 0, }; }, props: [ @@ -84,6 +99,15 @@ export default { this.activeName = 'fourth'; } }, + setFailureSize(size) { + this.failureSize = size; + }, + setIssueSize(size) { + this.issueSize = size; + }, + setAllSize(size) { + this.allSize = size; + }, handleClick(tab, event) { } } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanLoadReport.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanLoadReport.vue index eeadbc6a75..0e07544648 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanLoadReport.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanLoadReport.vue @@ -4,11 +4,19 @@ - - + + + - - + + + @@ -22,17 +30,21 @@ import TestPlanReportContainer import LoadFailureResult from "@/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult"; import LoadAllResult from "@/business/components/track/plan/view/comonents/report/detail/component/LoadAllResult"; +import TabPaneCount from "@/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount"; export default { name: "TestPlanLoadReport", components: { + TabPaneCount, LoadAllResult, LoadFailureResult, TestPlanReportContainer, LoadResult, MsFormDivider}, data() { return { - activeName: 'first' + activeName: 'first', + failureSize: 0, + allSize: 0, }; }, props: [ @@ -78,6 +90,12 @@ export default { this.activeName = 'third'; } }, + setFailureSize(size) { + this.failureSize = size; + }, + setAllSize(size) { + this.allSize = size; + }, handleClick(tab, event) { } } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue index 8aff7f3a27..62a6bdf023 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent.vue @@ -197,4 +197,9 @@ export default { padding-top: 15px; } +/deep/ .empty { + text-align: center; + width: 100%; + padding: 40px; +} diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue index b1c172e3a9..47f649c04a 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue @@ -48,9 +48,10 @@ - - + + +
内容为空
@@ -90,7 +91,14 @@ export default { apiCases: [], result: {}, response: {}, - showResponse: true + showResponse: false + } + }, + watch: { + apiCases() { + if (this.apiCases) { + this.$emit('setSize', this.apiCases.length); + } } }, mounted() { @@ -104,61 +112,47 @@ export default { } else { this.apiCases = this.report.apiFailureCases; } - this.handleDefaultClick(); } else if (this.isShare) { if (this.isAll) { this.result = getSharePlanApiAllCase(this.shareId, this.planId, (data) => { this.apiCases = data; - this.handleDefaultClick(); }); } else { this.result = getSharePlanApiFailureCase(this.shareId, this.planId, (data) => { this.apiCases = data; - this.handleDefaultClick(); }); } } else { if (this.isAll) { this.result = getPlanApiAllCase(this.planId, (data) => { this.apiCases = data; - this.handleDefaultClick(); }); } else { this.result = getPlanApiFailureCase(this.planId, (data) => { this.apiCases = data; - this.handleDefaultClick(); }); } } }, - handleDefaultClick() { - let data = this.apiCases; - if (data && data.length > 0) { - this.rowClick(data[0]); - } - }, rowClick(row) { - this.showResponse = true; + this.showResponse = false; if (this.isTemplate) { - if (!row.response) { - this.showResponse = false; - } else { + if (row.response) { + this.showResponse = true; this.response = JSON.parse(row.response); } } else if (this.isShare) { getShareApiReport(this.shareId, row.id, (data) => { - if (!data || !data.content) { - this.showResponse = false; - } else { + if (data && data.content) { + this.showResponse = true; this.response = JSON.parse(data.content); } }); } else { // todo getApiReport(row.id, (data) => { - if (!data || !data.content) { - this.showResponse = false; - } else { + if (data && data.content) { + this.showResponse = true; this.response = JSON.parse(data.content); } }); diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCases.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCases.vue index 4a7d646b29..a8e9b19bf3 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCases.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCases.vue @@ -1,11 +1,19 @@