From f48db748fa3d960eacb0134325c1da521d479ccb Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 4 Nov 2021 10:55:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E5=9B=9E=E6=94=B6=E7=AB=99=E6=95=B0=E6=8D=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestCaseMapper.xml | 2 +- .../track/case/components/TestCaseList.vue | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 1509da9c30..d217822020 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -342,7 +342,7 @@ - + and (test_case.status is null or test_case.status != 'Trash') diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 3516b66f76..b4929286ce 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -272,7 +272,8 @@ export default { deletePath: "/test/case/delete", enableOrderDrag: true, condition: { - components: TEST_CASE_CONFIGS + components: TEST_CASE_CONFIGS, + filters: {} }, graphData: {}, priorityFilters: [ @@ -409,11 +410,6 @@ export default { created: function () { this.getTemplateField(); this.$emit('setCondition', this.condition); - if(this.trashEnable){ - this.condition.filters = {status: ["Trash"]}; - }else { - this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]}; - } this.initTableData(); let redirectParam = this.$route.query.dataSelectRange; this.checkRedirectEditPage(redirectParam); @@ -439,7 +435,6 @@ export default { }, activated() { this.getTemplateField(); - this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]}; let ids = this.$route.params.ids; if (ids) { this.condition.ids = ids; @@ -575,6 +570,7 @@ export default { this.condition.selectThisWeedData = false; this.condition.selectThisWeedRelevanceData = false; this.condition.caseCoverage = null; + this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"]; switch (this.selectDataRange) { case 'thisWeekCount': this.condition.selectThisWeedData = true; @@ -600,6 +596,9 @@ export default { } this.condition.filters.priority = this.condition.filters['用例等级']; this.condition.filters.status = this.condition.filters['用例状态']; + if(this.trashEnable){ + this.condition.filters = {status: ["Trash"]}; + } if (this.projectId) { this.condition.projectId = this.projectId; this.$emit('setCondition', this.condition);