[update] 选择人员取消全选改成取消当前查询条件下的全选

This commit is contained in:
lideqin
2024-05-10 09:59:21 +08:00
parent 61ec63e839
commit b7e404f6ed
4 changed files with 12 additions and 8 deletions
@@ -221,8 +221,9 @@ export default {
if (e.target.checked) {
this.checkCurrentAll()
} else {
this.dataSourceRight = []
this.selectedRowKeys = []
const field = 'contactId'
this.dataSourceRight = this.dataSourceRight.filter(item => !this.currentQueryAllData.some(i => i[field] === item[field]))
this.selectedRowKeys = JSON.parse(JSON.stringify(this.dataSourceRight)).map(item => item[field])
}
},
checkCurrentAll () {
@@ -251,8 +251,9 @@ export default {
if (e.target.checked) {
this.checkCurrentAll()
} else {
this.dataSourceRight = []
this.selectedRowKeys = []
const field = 'id'
this.dataSourceRight = this.dataSourceRight.filter(item => !this.currentQueryAllData.some(i => i[field] === item[field]))
this.selectedRowKeys = JSON.parse(JSON.stringify(this.dataSourceRight)).map(item => item[field])
}
},
checkCurrentAll () {
@@ -322,8 +322,9 @@ export default {
if (e.target.checked) {
this.checkCurrentAll()
} else {
this.dataSourceRight = []
this.selectedRowKeys = []
const field = 'userId'
this.dataSourceRight = this.dataSourceRight.filter(item => !this.currentQueryAllData.some(i => i[field] === item[field]))
this.selectedRowKeys = JSON.parse(JSON.stringify(this.dataSourceRight)).map(item => item[field])
}
},
checkCurrentAll () {
+3 -2
View File
@@ -269,8 +269,9 @@ export default {
if (e.target.checked) {
this.checkCurrentAll()
} else {
this.dataSourceRight = []
this.selectedRowKeys = []
const field = 'id'
this.dataSourceRight = this.dataSourceRight.filter(item => !this.currentQueryAllData.some(i => i[field] === item[field]))
this.selectedRowKeys = JSON.parse(JSON.stringify(this.dataSourceRight)).map(item => item[field])
}
},
checkCurrentAll () {