26
26
<el-form-item >
27
27
<el-button :disabled =" multipleSelection.length === 0" :loading =" loading" icon =" el-icon-delete" type =" danger" @click =" batchDelete" >批量删除</el-button >
28
28
</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 >
29
32
</el-form >
30
33
31
34
<el-table v-loading =" loading" :data =" tableData" border stripe style =" width : 100% " @selection-change =" handleSelectionChange" >
144
147
:options =" departmentsOptions"
145
148
placeholder =" 请选择部门"
146
149
:normalizer =" normalizer"
150
+ value-consists-of =" ALL"
147
151
:multiple =" true"
152
+ flat =" true"
153
+ no-children-text =" 没有更多选项"
154
+ no-results-text =" 没有匹配的选项"
148
155
@input =" treeselectInput"
149
156
@select =" onOperatePersonChanged"
150
157
/>
176
183
import JSEncrypt from ' jsencrypt'
177
184
import Treeselect from ' @riophae/vue-treeselect'
178
185
import ' @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'
180
187
import { getRoles } from ' @/api/system/role'
181
188
import { getGroupTree } from ' @/api/personnel/group'
182
189
@@ -603,6 +610,7 @@ wLXapv+ZfsjG7NgdawIDAQAB
603
610
return {
604
611
id: node .ID ,
605
612
label: node .groupType + ' =' + node .groupName ,
613
+ isDisabled: node .groupType === ' ou' ,
606
614
children: node .children
607
615
}
608
616
},
@@ -616,6 +624,19 @@ wLXapv+ZfsjG7NgdawIDAQAB
616
624
} else {
617
625
this .dialogFormData .departments = this .dialogFormData .departments + ' ,' + obj .groupName
618
626
}
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
619
640
}
620
641
}
621
642
}
0 commit comments