From b7e404f6ed5d1ed5758eb19380e016c0689275ff Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 10 May 2024 09:59:21 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E9=80=89=E6=8B=A9=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=85=A8=E9=80=89=E6=94=B9=E6=88=90=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=BD=93=E5=89=8D=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E5=85=A8=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/selection/UserSelectByContactModal.vue | 5 +++-- src/components/selection/UserSelectByContactNoMergeModal.vue | 5 +++-- src/components/selection/UserSelectByWorkGroupModal.vue | 5 +++-- src/components/selection/UserSelectModal.vue | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) 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 () {