2626 <el-form-item >
2727 <el-button :disabled =" multipleSelection.length === 0" :loading =" loading" icon =" el-icon-delete" type =" danger" @click =" batchDelete" >批量删除</el-button >
2828 </el-form-item >
29+ <el-form-item >
30+ <el-button :loading =" loading" icon =" el-icon-share" type =" danger" @click =" syncDingTalkUsers" >同步钉钉用户信息</el-button >
31+ </el-form-item >
2932 </el-form >
3033
3134 <el-table v-loading =" loading" :data =" tableData" border stripe style =" width : 100% " @selection-change =" handleSelectionChange" >
144147 :options =" departmentsOptions"
145148 placeholder =" 请选择部门"
146149 :normalizer =" normalizer"
150+ value-consists-of =" ALL"
147151 :multiple =" true"
152+ flat =" true"
153+ no-children-text =" 没有更多选项"
154+ no-results-text =" 没有匹配的选项"
148155 @input =" treeselectInput"
149156 @select =" onOperatePersonChanged"
150157 />
176183import JSEncrypt from ' jsencrypt'
177184import Treeselect from ' @riophae/vue-treeselect'
178185import ' @riophae/vue-treeselect/dist/vue-treeselect.css'
179- import { getUsers , createUser , updateUserById , batchDeleteUserByIds } from ' @/api/personnel/user'
186+ import { getUsers , createUser , updateUserById , batchDeleteUserByIds , syncDingTalkUsersApi } from ' @/api/personnel/user'
180187import { getRoles } from ' @/api/system/role'
181188import { getGroupTree } from ' @/api/personnel/group'
182189
@@ -603,6 +610,7 @@ wLXapv+ZfsjG7NgdawIDAQAB
603610 return {
604611 id: node .ID ,
605612 label: node .groupType + ' =' + node .groupName ,
613+ isDisabled: node .groupType === ' ou' ,
606614 children: node .children
607615 }
608616 },
@@ -616,6 +624,19 @@ wLXapv+ZfsjG7NgdawIDAQAB
616624 } else {
617625 this .dialogFormData .departments = this .dialogFormData .departments + ' ,' + obj .groupName
618626 }
627+ },
628+ syncDingTalkUsers (obj ) {
629+ this .loading = true
630+ syncDingTalkUsersApi ().then (res => {
631+ this .loading = false
632+ this .$message ({
633+ showClose: true ,
634+ message: res .message ,
635+ type: ' success'
636+ })
637+ })
638+ this .getTableData ()
639+ this .loading = false
619640 }
620641 }
621642}
0 commit comments