mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(测试跟踪): 修复取消记住跨页选择的记录前一页的数据不能删除问题
--bug=1021992 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001021992
This commit is contained in:
parent
e384a3c21f
commit
386b7f7fab
@ -434,7 +434,13 @@ export default {
|
||||
});
|
||||
},
|
||||
handleSelect(selection, row) {
|
||||
_handleSelect(this, selection, row, this.selectRows);
|
||||
let selectRowMap = new Map();
|
||||
for (let selectRow of this.selectRows) {
|
||||
selectRowMap.set(selectRow.id, selectRow);
|
||||
}
|
||||
_handleSelect(this, selection, row, selectRowMap);
|
||||
let selectRow = Array.from(selectRowMap.values());
|
||||
this.selectRows = new Set(selectRow);
|
||||
setUnSelectIds(this.data, this.condition, this.selectRows);
|
||||
this.selectDataCounts = getSelectDataCounts(
|
||||
this.condition,
|
||||
|
@ -37,16 +37,16 @@ export function _handleSelectAll(component, selection, tableData, selectRows, co
|
||||
}
|
||||
}
|
||||
|
||||
export function _handleSelect(component, selection, row, selectRows) {
|
||||
export function _handleSelect(component, selection, row, selectRowMap) {
|
||||
row.hashTree = [];
|
||||
if (selectRows.has(row)) {
|
||||
if (selectRowMap.has(row.id)) {
|
||||
component.$set(row, "showMore", false);
|
||||
selectRows.delete(row);
|
||||
selectRowMap.delete(row.id);
|
||||
} else {
|
||||
component.$set(row, "showMore", true);
|
||||
selectRows.add(row);
|
||||
selectRowMap.set(row.id, row);
|
||||
}
|
||||
let arr = Array.from(selectRows);
|
||||
let arr = Array.from(selectRowMap.values());
|
||||
arr.forEach(row => {
|
||||
component.$set(row, "showMore", true);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user