fix(接口测试): 修复场景变量排序后批量操作未恢复到初始状态

--bug=1014188 --user=赵勇 【接口测试】场景变量-全部勾选后出现批量删除图标-点击表头字段排序-批量操作图标仍显示-可点击批量操作-实际删除失败 https://www.tapd.cn/55049933/s/1184785
This commit is contained in:
fit2-zhao 2022-06-17 11:18:20 +08:00 committed by f2c-ci-robot[bot]
parent 14d721e200
commit 31b1c79da5
1 changed files with 12 additions and 5 deletions

View File

@ -57,6 +57,7 @@
:fields.sync="fields" :fields.sync="fields"
:field-key="tableHeaderKey" :field-key="tableHeaderKey"
@handleRowClick="handleRowClick" @handleRowClick="handleRowClick"
@refresh="onChange"
ref="variableTable"> ref="variableTable">
<span v-for="item in fields" :key="item.key"> <span v-for="item in fields" :key="item.key">
<ms-table-column <ms-table-column
@ -312,12 +313,14 @@ export default {
index++; index++;
}); });
}, },
sortParamters() { sortParameters() {
let index = 1; let index = 1;
this.variables.forEach(item => { this.variables.forEach(item => {
item.num = index; item.num = index;
item.showMore = false;
index++; index++;
}); });
this.selection = [];
}, },
updateParameters(v) { updateParameters(v) {
this.editData = JSON.parse(JSON.stringify(v)); this.editData = JSON.parse(JSON.stringify(v));
@ -417,7 +420,7 @@ export default {
const index = this.variables.findIndex(d => d.id === row); const index = this.variables.findIndex(d => d.id === row);
this.variables.splice(index, 1); this.variables.splice(index, 1);
}); });
this.sortParamters(); this.sortParameters();
this.editData = {}; this.editData = {};
} }
} }
@ -427,7 +430,7 @@ export default {
const index = this.variables.findIndex(d => d.id === row); const index = this.variables.findIndex(d => d.id === row);
this.variables.splice(index, 1); this.variables.splice(index, 1);
}); });
this.sortParamters(); this.sortParameters();
this.editData = {}; this.editData = {};
} }
}, },
@ -442,7 +445,7 @@ export default {
this.variables.splice(index, 1); this.variables.splice(index, 1);
}); });
// this.editData = {type: "CONSTANT"}; // this.editData = {type: "CONSTANT"};
this.sortParamters(); this.sortParameters();
this.editData = {}; this.editData = {};
this.$refs.variableTable.cancelCurrentRow(); this.$refs.variableTable.cancelCurrentRow();
this.$refs.variableTable.clear(); this.$refs.variableTable.clear();
@ -499,7 +502,11 @@ export default {
this.editData.files = item.files this.editData.files = item.files
} }
}); });
} },
onChange(){
this.selection = [];
this.sortParameters();
},
} }
}; };
</script> </script>