diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index ab318fd359..67a63bf245 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -16,6 +16,8 @@ field-key="API_SCENARIO" operator-width="200" @refresh="search(projectId)" + @callBackSelectAll="callBackSelectAll" + @callBackSelect="callBackSelect" ref="scenarioTable"> @@ -812,6 +814,12 @@ export default { this.$emit('updateInitApiTableOpretion','0'); return false; } + }, + callBackSelectAll(selection){ + this.$emit('selection', selection); + }, + callBackSelect(selection){ + this.$emit('selection', selection); } } }; diff --git a/frontend/src/business/components/common/components/table/MsTable.vue b/frontend/src/business/components/common/components/table/MsTable.vue index c9bd95489e..7167a02af9 100644 --- a/frontend/src/business/components/common/components/table/MsTable.vue +++ b/frontend/src/business/components/common/components/table/MsTable.vue @@ -202,12 +202,16 @@ export default { setUnSelectIds(this.data, this.condition, this.selectRows); this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows); this.selectIds = Array.from(this.selectRows).map(o => o.id); + //有的组件需要回调父组件的函数,做下一步处理 + this.$emit('callBackSelectAll',selection); }, handleSelect(selection, row) { _handleSelect(this, selection, row, this.selectRows); setUnSelectIds(this.data, this.condition, this.selectRows); this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows); this.selectIds = Array.from(this.selectRows).map(o => o.id); + //有的组件需要回调父组件的函数,做下一步处理 + this.$emit('callBackSelect',selection); }, isSelectDataAll(data) { this.condition.selectAll = data;