|
|
@@ -178,13 +178,13 @@ const rowSelection: any = ref({
|
|
|
|
|
|
hideSelectAll: true,
|
|
|
onChange: (ids: string[]) => {
|
|
|
- console.log('ids', ids)
|
|
|
- const key = typeFilterScenes.value[type.value].map((item: any) => item.num).join('')
|
|
|
+
|
|
|
+ const key1 = typeFilterScenes.value[type.value].map((item: any) => item.num).join('')
|
|
|
ids = ids.filter(id => !selectIds.value.includes(id))
|
|
|
if (!cache[type.value]) {
|
|
|
cache[type.value] = {}
|
|
|
}
|
|
|
- cache[type.value][key] = ids
|
|
|
+ cache[type.value][key1] = ids
|
|
|
|
|
|
|
|
|
|
|
|
@@ -192,7 +192,8 @@ const rowSelection: any = ref({
|
|
|
const curIds = [...selectIds.value]
|
|
|
for (const keyp in cache) {
|
|
|
for (const key in cache[keyp]) {
|
|
|
- curIds.push(...cache[keyp][key])
|
|
|
+ const numNew = cache[keyp][key].filter(id => key == key1 || !key1.includes(id))//过滤非当前table data 已选中数据
|
|
|
+ curIds.push(...numNew)
|
|
|
}
|
|
|
}
|
|
|
selects.value = [...new Set(curIds)] || []//去重
|