diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 6446f5d240..99a4544b0e 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -114,7 +114,7 @@ public class ApiDefinitionService { List resList = extApiDefinitionMapper.list(request); calculateResult(resList, request.getProjectId()); ApiDefinitionRequest finalRequest = request; - List resListFilters = new ArrayList<>(); + /* List resListFilters = new ArrayList<>(); if (finalRequest.getFilters().size() > 1) { if (null != finalRequest.getFilters().get("case_status")) { resListFilters = resList.stream() @@ -123,7 +123,7 @@ public class ApiDefinitionService { return resListFilters; } - } + }*/ return resList; diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue index 86df7af423..a3a99ce88e 100644 --- a/frontend/src/business/components/api/automation/ApiAutomation.vue +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -20,6 +20,7 @@ { this.genProtocalFilter(this.condition.protocol); - this.total = response.data.listObject.length; + this.total = response.data.itemCount; this.tableData = response.data.listObject; this.tableData.forEach(item => { if (item.tags && item.tags.length > 0) { @@ -514,6 +511,7 @@ export default { }); } getLabel(this, API_LIST); + this.$emit("refreshTree"); }, genProtocalFilter(protocalType) { if (protocalType === "HTTP") { diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 1da4eda44b..75f8cd752f 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -31,6 +31,7 @@ :checkRedirectID="checkRedirectID" :isRedirectEdit="isRedirectEdit" :tree-nodes="treeNodes" + @refreshTable="refresh" @testCaseEdit="editTestCase" @testCaseCopy="copyTestCase" @testCaseDetail="showTestCaseDetail" diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index dd1660d24d..4ff2f4c2b7 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -501,6 +501,7 @@ export default { confirmButtonText: this.$t('commons.confirm'), callback: (action) => { if (action === 'confirm') { + this.$emit('refreshTable'); this._handleDelete(testCase); } } @@ -528,6 +529,7 @@ export default { this.$post('/test/case/delete/' + testCaseId, {}, () => { this.initTableData(); this.$success(this.$t('commons.delete_success')); + }); }, refresh() { diff --git a/frontend/src/business/components/track/common/NodeTree.vue b/frontend/src/business/components/track/common/NodeTree.vue index 4a1aea8a5d..16feecb5c5 100644 --- a/frontend/src/business/components/track/common/NodeTree.vue +++ b/frontend/src/business/components/track/common/NodeTree.vue @@ -148,7 +148,7 @@ export default { "name": this.allLabel, "level": 0, "children": this.treeNodes, - "caseNum": num + "caseNum": num > 0 ? num : "" }); if (this.expandedNode.length === 0) { this.expandedNode.push("root");