From 8b8e5885a0d9ffede22d0f0d9f5063be9ac525e4 Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 29 Jul 2022 14:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=88=90=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extra/AppAddressBook/components/List.vue | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/packages/extra/AppAddressBook/components/List.vue b/packages/extra/AppAddressBook/components/List.vue index ebc7b9fe..bfbf0711 100644 --- a/packages/extra/AppAddressBook/components/List.vue +++ b/packages/extra/AppAddressBook/components/List.vue @@ -92,9 +92,8 @@ - 同步数据 - + 同步部门 + 同步成员 添加成员 @@ -505,25 +504,13 @@ export default { }, syncMembers() { - let departId = this.search.departmentId; - if (!departId) departId = 1; this.btnLoading = true this.instance.post(`/app/wxcp/wxdepartment/syncDepart`).then(res => { if (res.code == 0) { - this.instance.post(`/app/wxcp/wxdepartment/syncUser?departmentId=${departId}`, null, { - timeout: 1000000 - }).then(res => { - if (res.code == 0) { - this.$message.success('同步成功') - this.getList() - this.getTree() - } - - this.btnLoading = false - }).catch(() => { - this.btnLoading = false - }) + this.$message.success('同步成功') + this.getList() + this.getTree() } }).catch(() => { @@ -531,6 +518,26 @@ export default { }) }, + syncUser() { + let departId = this.search.departmentId; + if (!departId) departId = 1; + this.btnLoading = true + + this.instance.post(`/app/wxcp/wxdepartment/syncUser?departmentId=${departId}`, null, { + timeout: 1000000 + }).then(res => { + if (res.code == 0) { + this.$message.success('同步成功') + this.getList() + this.getTree() + } + + this.btnLoading = false + }).catch(() => { + this.btnLoading = false + }) + }, + getTags() { this.instance.post(`/app/wxcp/wxtag/listAll`).then(res => { if (res.code == 0) {