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 }