增加通讯录同步
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<section class="AppAccount">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="账号管理" isShowBottomBorder/>
|
||||
<ai-title slot="title" title="账号管理" isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<el-button size="small" type="primary" icon="iconfont iconUpdate_Files" @click="syncDept">同步部门</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template #left>
|
||||
<ai-address-book-menu :instance="instance" @select="handleSelect"/>
|
||||
</template>
|
||||
@@ -10,6 +14,7 @@
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" :disabled="!ids.toString()" @click="batchAllot">功能分配</el-button>
|
||||
<el-button size="small" icon="iconfont iconUpdate_Files" @click="syncMembers">同步成员</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索姓名、手机号" v-model="search.name" clearable
|
||||
@@ -72,7 +77,7 @@ import AiAddressBookMenu from "../../components/AiAddressBookMenu";
|
||||
export default {
|
||||
name: "AppAccount",
|
||||
components: {AiAddressBookMenu},
|
||||
label: "账号管理(村微sass版)",
|
||||
label: "账号管理(村微版)",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
@@ -223,6 +228,36 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
syncMembers() {
|
||||
const {departmentId = 1} = this.search;
|
||||
let loading = this.$loading({
|
||||
text: "正在同步成员...",
|
||||
spinner: 'el-icon-loading',
|
||||
background: "rgba(0,0,0,.8)"
|
||||
})
|
||||
this.instance.post(`/app/wxcp/wxdepartment/syncUser`, null, {
|
||||
timeout: 1000000,
|
||||
params: {departmentId}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success('同步成功')
|
||||
this.getList()
|
||||
}
|
||||
}).finally(() => this.$hideLoading(loading))
|
||||
},
|
||||
syncDept() {
|
||||
let loading = this.$loading({
|
||||
text: "正在同步部门...",
|
||||
spinner: 'el-icon-loading',
|
||||
background: "rgba(0,0,0,.8)"
|
||||
})
|
||||
this.instance.post(`/app/wxcp/wxdepartment/syncDepart`).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success('同步成功')
|
||||
this.getTree()
|
||||
}
|
||||
}).finally(() => this.$hideLoading(loading))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load('wxUserStatus')
|
||||
|
||||
Reference in New Issue
Block a user