From 80fb11dd9a27641c4914531700199c61888465ad Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 23 Feb 2024 09:14:11 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E9=80=89=E4=BA=BA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E5=85=A8=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../selection/UserSelectByContactModal.vue | 15 ++++++------- .../UserSelectByContactNoMergeModal.vue | 16 +++++++------- .../selection/UserSelectByWorkGroupModal.vue | 21 +++++++------------ src/components/selection/UserSelectModal.vue | 16 +++++++------- 4 files changed, 28 insertions(+), 40 deletions(-) diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index 974a3f69..4cd8df93 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -210,11 +210,8 @@ export default { this.loadData() }, methods: { - async open (value) { + open (value) { this.visible = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() if (value) { this.selectedRowKeys = value.split(',') @@ -272,16 +269,16 @@ export default { this.queryParam = {} this.loadData() }, - async searchQuery () { + searchQuery () { this.isClickedSearch = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() }, // 获取用户左侧树列表 - loadData () { + async loadData () { this.loadingLeft = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } const params = Object.assign({}, this.queryParam) params.pageNo = this.ipagination.current params.pageSize = this.ipagination.pageSize diff --git a/src/components/selection/UserSelectByContactNoMergeModal.vue b/src/components/selection/UserSelectByContactNoMergeModal.vue index 01ce5c9d..db29a219 100644 --- a/src/components/selection/UserSelectByContactNoMergeModal.vue +++ b/src/components/selection/UserSelectByContactNoMergeModal.vue @@ -142,6 +142,7 @@ export default { }, currentQueryAllData: { immediate: true, + deep: true, handler (val) { console.log(this.currentQueryAllData) const arrOne = this.currentQueryAllData.map(item => item.id) @@ -235,11 +236,8 @@ export default { this.loadData() }, methods: { - async open (value) { + open (value) { this.visible = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() if (value) { this.selectedRowKeys = value.split(',') @@ -300,16 +298,16 @@ export default { this.queryParam = {} this.loadData() }, - async searchQuery () { + searchQuery () { this.isClickedSearch = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() }, // 获取用户左侧树列表 - loadData () { + async loadData () { this.loadingLeft = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } const params = Object.assign({}, this.queryParam) params.pageNo = this.ipagination.current params.pageSize = this.ipagination.pageSize diff --git a/src/components/selection/UserSelectByWorkGroupModal.vue b/src/components/selection/UserSelectByWorkGroupModal.vue index f2e9a19b..8bd24861 100644 --- a/src/components/selection/UserSelectByWorkGroupModal.vue +++ b/src/components/selection/UserSelectByWorkGroupModal.vue @@ -169,6 +169,7 @@ export default { }, currentQueryAllData: { immediate: true, + deep: true, handler (val) { console.log(this.currentQueryAllData) const arrOne = this.currentQueryAllData.map(item => item.userId) @@ -265,11 +266,8 @@ export default { this.loadData() }, methods: { - async open (value) { + open (value) { this.visible = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() if (value) { this.selectedRowKeys = value.split(',') @@ -287,13 +285,10 @@ export default { }) }, // 左侧树点击选中 - async treeSelect (selectedKeys) { + treeSelect (selectedKeys) { console.log(selectedKeys) this.currentTreeNode = selectedKeys this.queryParam.workingGroupId = selectedKeys[0] - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() }, // 获取左侧树数据 @@ -368,16 +363,16 @@ export default { this.queryParam = {} this.loadData() }, - async searchQuery () { + searchQuery () { this.isClickedSearch = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() }, // 获取用户左侧树列表 - loadData () { + async loadData () { this.loadingLeft = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } const params = Object.assign({}, this.queryParam) params.pageNo = this.ipagination.current params.pageSize = this.ipagination.pageSize diff --git a/src/components/selection/UserSelectModal.vue b/src/components/selection/UserSelectModal.vue index 15776014..2484e26f 100644 --- a/src/components/selection/UserSelectModal.vue +++ b/src/components/selection/UserSelectModal.vue @@ -144,6 +144,7 @@ export default { }, currentQueryAllData: { immediate: true, + deep: true, handler (val) { console.log(this.currentQueryAllData) const arrOne = this.currentQueryAllData.map(item => item.id) @@ -232,12 +233,9 @@ export default { } }, methods: { - async open (value) { + open (value) { this.getSysCategoryTree() this.initRoleList() - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData() this.visible = true if (value) { @@ -318,16 +316,16 @@ export default { this.queryParam = {} this.loadData(1) }, - async searchQuery () { + searchQuery () { this.isClickedSearch = true - if (this.type === 'checkbox') { - await this.getCurrentAllData() - } this.loadData(1) }, // 获取用户左侧树列表 - loadData (arg) { + async loadData (arg) { this.loadingLeft = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } if (arg) { this.ipagination.current = 1 }