增加通讯录同步
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AppAccount">
|
<section class="AppAccount">
|
||||||
<ai-list>
|
<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>
|
<template #left>
|
||||||
<ai-address-book-menu :instance="instance" @select="handleSelect"/>
|
<ai-address-book-menu :instance="instance" @select="handleSelect"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -10,6 +14,7 @@
|
|||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<el-button type="primary" :disabled="!ids.toString()" @click="batchAllot">功能分配</el-button>
|
<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>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input size="small" placeholder="搜索姓名、手机号" v-model="search.name" clearable
|
<el-input size="small" placeholder="搜索姓名、手机号" v-model="search.name" clearable
|
||||||
@@ -72,7 +77,7 @@ import AiAddressBookMenu from "../../components/AiAddressBookMenu";
|
|||||||
export default {
|
export default {
|
||||||
name: "AppAccount",
|
name: "AppAccount",
|
||||||
components: {AiAddressBookMenu},
|
components: {AiAddressBookMenu},
|
||||||
label: "账号管理(村微sass版)",
|
label: "账号管理(村微版)",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
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() {
|
created() {
|
||||||
this.dict.load('wxUserStatus')
|
this.dict.load('wxUserStatus')
|
||||||
|
|||||||
Reference in New Issue
Block a user