diff --git a/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue b/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue index 1bbf85857f..40bab5edd2 100644 --- a/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue +++ b/frontend/src/business/components/api/automation/scenario/api/RelevanceApiList.vue @@ -165,7 +165,6 @@ import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn"; import MsBatchEdit from "../../../definition/components/basis/BatchEdit"; import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonData"; - import {getCurrentProjectID} from "@/common/js/utils"; import ApiListContainer from "../../../definition/components/list/ApiListContainer"; import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem"; import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect"; @@ -319,7 +318,7 @@ if (item.tags && item.tags.length > 0) { item.tags = JSON.parse(item.tags); } - }); + }); this.genProtocalFilter(this.condition.protocol); this.$nextTick(function () { if (this.$refs.apitable) { @@ -419,6 +418,11 @@ let param = buildBatchParam(this); param.ids = Array.from(sampleSelectRows).map(row => row.id); return param; + }, + clear() { + if (this.$refs.apitable) { + this.$refs.apitable.clear(); + } } }, } diff --git a/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue b/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue index 45d027508f..e8a109ff2a 100644 --- a/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue +++ b/frontend/src/business/components/api/automation/scenario/api/RelevanceCaseList.vue @@ -99,51 +99,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -302,28 +257,32 @@ export default { }); }); getLabel(this, API_CASE_LIST); - }, - - showExecResult(row) { - this.visible = false; - this.$emit('showExecResult', row); - }, - filter(filters) { - _filter(filters, this.condition); - this.initTable(); - }, - sort(column) { - // 每次只对一个字段排序 - if (this.condition.orders) { - this.condition.orders = []; - } - _sort(column, this.condition); - this.initTable(); - }, - buildPagePath(path) { - return path + "/" + this.currentPage + "/" + this.pageSize; - }, - handleTestCase(testCase) { + }, + clear() { + if (this.$refs.table) { + this.$refs.table.clear(); + } + }, + showExecResult(row) { + this.visible = false; + this.$emit('showExecResult', row); + }, + filter(filters) { + _filter(filters, this.condition); + this.initTable(); + }, + sort(column) { + // 每次只对一个字段排序 + if (this.condition.orders) { + this.condition.orders = []; + } + _sort(column, this.condition); + this.initTable(); + }, + buildPagePath(path) { + return path + "/" + this.currentPage + "/" + this.pageSize; + }, + handleTestCase(testCase) { this.$get('/api/definition/get/' + testCase.apiDefinitionId, (response) => { let api = response.data; let selectApi = api; diff --git a/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue index fbe1616f55..32f7bd3474 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue @@ -156,6 +156,9 @@ }); }); }, + clear() { + this.selectRows.clear(); + }, handleSelectAll(selection) { _handleSelectAll(this, selection, this.tableData, this.selectRows); this.initProjectIds(); diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue index c277f8183d..3792f6b15d 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue @@ -86,6 +86,12 @@ open() { this.init(); this.$refs.baseRelevance.open(); + if (this.$refs.apiList) { + this.$refs.apiList.clear(); + } + if (this.$refs.apiCaseList) { + this.$refs.apiCaseList.clear(); + } }, init() { if (this.$refs.apiList) { diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue index 5dcf7a01a2..77d8d85357 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue @@ -76,6 +76,7 @@ open() { this.$refs.baseRelevance.open(); if (this.$refs.apiScenarioList) { + this.$refs.apiScenarioList.clear(); this.$refs.apiScenarioList.search(); } },