From 35ed990a05f00781eff0e84ee0ceff50c0f98572 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 23 Feb 2024 09:08:43 +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 | 19 ++++++++------- .../UserSelectByContactNoMergeModal.vue | 19 ++++++++------- .../selection/UserSelectByWorkGroupModal.vue | 24 ++++++++++++------- src/components/selection/UserSelectModal.vue | 19 ++++++++------- 4 files changed, 48 insertions(+), 33 deletions(-) diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index a46b0ae9..974a3f69 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -114,7 +114,7 @@ export default { } } }, - dataSource: { + currentQueryAllData: { immediate: true, deep: true, handler (val) { @@ -210,8 +210,11 @@ export default { this.loadData() }, methods: { - open (value) { + async open (value) { this.visible = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } this.loadData() if (value) { this.selectedRowKeys = value.split(',') @@ -269,16 +272,16 @@ export default { this.queryParam = {} this.loadData() }, - searchQuery () { + async searchQuery () { this.isClickedSearch = true - this.loadData() - }, - // 获取用户左侧树列表 - async loadData () { - this.loadingLeft = true if (this.type === 'checkbox') { await this.getCurrentAllData() } + this.loadData() + }, + // 获取用户左侧树列表 + loadData () { + this.loadingLeft = true 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 6d97ad4f..01ce5c9d 100644 --- a/src/components/selection/UserSelectByContactNoMergeModal.vue +++ b/src/components/selection/UserSelectByContactNoMergeModal.vue @@ -140,7 +140,7 @@ export default { } } }, - dataSource: { + currentQueryAllData: { immediate: true, handler (val) { console.log(this.currentQueryAllData) @@ -235,8 +235,11 @@ export default { this.loadData() }, methods: { - open (value) { + async open (value) { this.visible = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } this.loadData() if (value) { this.selectedRowKeys = value.split(',') @@ -297,16 +300,16 @@ export default { this.queryParam = {} this.loadData() }, - searchQuery () { + async searchQuery () { this.isClickedSearch = true - this.loadData() - }, - // 获取用户左侧树列表 - async loadData () { - this.loadingLeft = true if (this.type === 'checkbox') { await this.getCurrentAllData() } + this.loadData() + }, + // 获取用户左侧树列表 + loadData () { + this.loadingLeft = true 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 da466ea9..f2e9a19b 100644 --- a/src/components/selection/UserSelectByWorkGroupModal.vue +++ b/src/components/selection/UserSelectByWorkGroupModal.vue @@ -167,7 +167,7 @@ export default { } } }, - dataSource: { + currentQueryAllData: { immediate: true, handler (val) { console.log(this.currentQueryAllData) @@ -265,8 +265,11 @@ export default { this.loadData() }, methods: { - open (value) { + async open (value) { this.visible = true + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } this.loadData() if (value) { this.selectedRowKeys = value.split(',') @@ -284,10 +287,13 @@ export default { }) }, // 左侧树点击选中 - treeSelect (selectedKeys) { + async treeSelect (selectedKeys) { console.log(selectedKeys) this.currentTreeNode = selectedKeys this.queryParam.workingGroupId = selectedKeys[0] + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } this.loadData() }, // 获取左侧树数据 @@ -362,16 +368,16 @@ export default { this.queryParam = {} this.loadData() }, - searchQuery () { + async searchQuery () { this.isClickedSearch = true - this.loadData() - }, - // 获取用户左侧树列表 - async loadData () { - this.loadingLeft = true if (this.type === 'checkbox') { await this.getCurrentAllData() } + this.loadData() + }, + // 获取用户左侧树列表 + loadData () { + this.loadingLeft = true 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 799b58c1..15776014 100644 --- a/src/components/selection/UserSelectModal.vue +++ b/src/components/selection/UserSelectModal.vue @@ -142,7 +142,7 @@ export default { } } }, - dataSource: { + currentQueryAllData: { immediate: true, handler (val) { console.log(this.currentQueryAllData) @@ -232,9 +232,12 @@ export default { } }, methods: { - open (value) { + async open (value) { this.getSysCategoryTree() this.initRoleList() + if (this.type === 'checkbox') { + await this.getCurrentAllData() + } this.loadData() this.visible = true if (value) { @@ -315,16 +318,16 @@ export default { this.queryParam = {} this.loadData(1) }, - searchQuery () { + async searchQuery () { this.isClickedSearch = true - this.loadData(1) - }, - // 获取用户左侧树列表 - async loadData (arg) { - this.loadingLeft = true if (this.type === 'checkbox') { await this.getCurrentAllData() } + this.loadData(1) + }, + // 获取用户左侧树列表 + loadData (arg) { + this.loadingLeft = true if (arg) { this.ipagination.current = 1 }