diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index 5426ae8c..eb0af599 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -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 () { diff --git a/src/components/selection/UserSelectByContactNoMergeModal.vue b/src/components/selection/UserSelectByContactNoMergeModal.vue index 41a58787..f0fc1e84 100644 --- a/src/components/selection/UserSelectByContactNoMergeModal.vue +++ b/src/components/selection/UserSelectByContactNoMergeModal.vue @@ -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 () { diff --git a/src/components/selection/UserSelectByWorkGroupModal.vue b/src/components/selection/UserSelectByWorkGroupModal.vue index 5227e88d..dcdd0d63 100644 --- a/src/components/selection/UserSelectByWorkGroupModal.vue +++ b/src/components/selection/UserSelectByWorkGroupModal.vue @@ -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 () { diff --git a/src/components/selection/UserSelectModal.vue b/src/components/selection/UserSelectModal.vue index e51b67ff..e8dd29f5 100644 --- a/src/components/selection/UserSelectModal.vue +++ b/src/components/selection/UserSelectModal.vue @@ -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 () {