fix(接口自动化): #1006479 #1006481 【接口测试】场景回收站全选批量恢复,只能恢复10条、全选显示框显示错误

【【接口测试】场景回收站全选批量恢复,只能恢复10条】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006481;【【接口测试】全选框显示数据错误】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006479
This commit is contained in:
song-tianyang 2021-09-21 13:49:24 +08:00 committed by 刘瑞斌
parent ab77348833
commit 738e9bfda7
3 changed files with 24 additions and 7 deletions

View File

@ -719,9 +719,15 @@ export default {
},
handleBatchRestore() {
let ids = this.$refs.scenarioTable.selectIds;
this.$post("/api/automation/reduction", ids, response => {
this.$success(this.$t('commons.save_success'));
this.search();
let params = {};
this.buildBatchParam(params);
params.ids = ids;
this.$post("/api/automation/id/all", params, response => {
let idParams = response.data;
this.$post("/api/automation/reduction", idParams, response => {
this.$success(this.$t('commons.save_success'));
this.search();
});
});
},
handleDeleteBatch(row) {

View File

@ -20,6 +20,7 @@
<ms-table-header-select-popover v-if="enableSelection && showSelectAll" ref="selectPopover"
:page-size="pageSize > total ? total : pageSize"
:table-data-count-in-page="data.length"
:select-type="condition.selectAll"
:total="total"
@selectPageAll="isSelectDataAll(false)"
@selectAll="isSelectDataAll(true)"/>

View File

@ -29,6 +29,7 @@
name: "MsTableHeaderSelectPopover",
// props: ['total', 'pageSize', 'selectDataCounts'],
props: {
selectType: String,
total: {
type: Number,
default() {
@ -54,6 +55,11 @@
}
},
},
watch:{
total(){
this.reload();
}
},
created() {
if(this.keyIndex === 0){
this.keyIndex++;
@ -93,10 +99,14 @@
this.$emit(even);
},
reload() {
this.isShow = false;
this.$nextTick(() => {
this.isShow = true;
});
if(!this.selectType){
this.selectAllFontColor.color = "gray";
this.selectPageFontColor.color = "gray";
}
this.isShow = false;
this.$nextTick(() => {
this.isShow = true;
});
}
}
}