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 @@
-
-
+
+
+
+
+
-
-
+
+
+
+
+
@@ -20,9 +28,11 @@ import ApiScenarioFailureResult
from "@/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult";
import ApiCaseFailureResult
from "@/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult";
+import TabPaneCount from "@/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount";
export default {
name: "ApiCases",
components: {
+ TabPaneCount,
ApiCaseFailureResult,
ApiScenarioFailureResult, StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem},
props: {
@@ -36,11 +46,27 @@ export default {
},
data() {
return {
+ apiSize: 0,
+ scenarioSize: 0,
}
},
mounted() {
},
+ watch: {
+ apiSize() {
+ this.$emit('setSize', this.apiSize + this.scenarioSize);
+ },
+ scenarioSize() {
+ this.$emit('setSize', this.apiSize + this.scenarioSize);
+ },
+ },
methods: {
+ setApiSize(size) {
+ this.apiSize = size;
+ },
+ setScenarioSize(size) {
+ this.scenarioSize = size;
+ },
}
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue
index 9988db0672..c7199311fe 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue
@@ -49,6 +49,7 @@
+ 内容为空
@@ -88,12 +89,19 @@ export default {
result: {},
reportId: null,
response: {},
- showResponse: true
+ showResponse: false
}
},
mounted() {
this.getScenarioApiCase();
},
+ watch: {
+ scenarioCases() {
+ if (this.scenarioCases) {
+ this.$emit('setSize', this.scenarioCases.length);
+ }
+ }
+ },
methods: {
getScenarioApiCase() {
if (this.isTemplate || this.isDb) {
@@ -102,51 +110,38 @@ export default {
} else {
this.scenarioCases = this.report.scenarioFailureCases;
}
- this.handleDefaultClick();
} else if (this.isShare) {
if (this.isAll) {
this.result = getSharePlanScenarioAllCase(this.shareId, this.planId, (data) => {
this.scenarioCases = data;
- this.handleDefaultClick();
});
} else {
this.result = getSharePlanScenarioFailureCase(this.shareId, this.planId, (data) => {
this.scenarioCases = data;
- this.handleDefaultClick();
});
}
} else {
if (this.isAll) {
this.result = getPlanScenarioAllCase(this.planId, (data) => {
this.scenarioCases = data;
- this.handleDefaultClick();
});
} else {
this.result = getPlanScenarioFailureCase(this.planId, (data) => {
this.scenarioCases = data;
- this.handleDefaultClick();
});
}
}
},
- handleDefaultClick() {
- let data = this.scenarioCases;
- 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 = row.response;
}
} else {
- if (!row.reportId) {
- this.showResponse = false;
- } else {
+ if (row.reportId) {
+ this.showResponse = true;
this.reportId = row.reportId;
}
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalCases.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalCases.vue
index 0965df931b..d0227125b9 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalCases.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalCases.vue
@@ -95,6 +95,13 @@ export default {
mounted() {
this.getFunctionalTestCase();
},
+ watch: {
+ testCases() {
+ if (this.testCases) {
+ this.$emit('setSize', this.testCases.length);
+ }
+ }
+ },
methods: {
getFunctionalTestCase() {
if (this.isTemplate || this.isDb) {
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalIssueList.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalIssueList.vue
index 2d5872a5cc..067e4d0e64 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalIssueList.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/FunctionalIssueList.vue
@@ -77,6 +77,13 @@ export default {
this.isThirdPart = this.report.isThirdPartIssue;
this.getIssues();
},
+ watch: {
+ data() {
+ if (this.data) {
+ this.$emit('setSize', this.data.length);
+ }
+ }
+ },
methods: {
getIssues() {
if (this.isTemplate || this.isDb) {
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadAllResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadAllResult.vue
index 44adb161d4..c2b596da01 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadAllResult.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadAllResult.vue
@@ -2,13 +2,15 @@
-
+
-
+
+ :plan-report-template="response" :report-id="reportId" ref="loadCaseReportView"/>
+ 内容为空
@@ -37,7 +39,7 @@ export default {
data() {
return {
failureTestCases: [],
- showResponse: true,
+ showResponse: false,
reportId: "",
response: null
}
@@ -46,11 +48,10 @@ export default {
},
methods: {
getReport(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 = row.response;
}
} else {
@@ -59,9 +60,9 @@ export default {
reportId: row.loadReportId
}
if (!row.loadReportId) {
- this.showResponse = false;
return;
}
+ this.showResponse = true;
if (this.isShare) {
shareCheckoutLoadReport(this.shareId, param, data => {
this.openReport(data, row.loadReportId);
@@ -80,6 +81,9 @@ export default {
this.showResponse = false;
this.$warning(this.$t('test_track.plan.load_case.report_not_found'));
}
+ },
+ setAllSize(size) {
+ this.$emit('setSize', size);
}
}
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult.vue
index 137bacf7e8..7ee3640066 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult.vue
@@ -77,6 +77,13 @@ export default {
mounted() {
this.getFailureTestCase();
},
+ watch: {
+ loadTestCases() {
+ if (this.loadTestCases) {
+ this.$emit('setSize', this.loadTestCases.length);
+ }
+ }
+ },
methods: {
getFailureTestCase() {
if (this.isTemplate || this.isDb) {
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount.vue
new file mode 100644
index 0000000000..4c4a5fda02
--- /dev/null
+++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount.vue
@@ -0,0 +1,25 @@
+
+
+ {{title}}
+
+
+
+
+
+
+