|
@@ -2,7 +2,6 @@ import { getDingTalkAllDeptUser, refashDingTalkAllDeptUser } from '@/api/expense
|
|
|
const DingDepartUser = {
|
|
|
template: `
|
|
|
<a-tree-select
|
|
|
- :disabled="disabled"
|
|
|
:value="defaultVal"
|
|
|
tree-data-simple-mode
|
|
|
style="width: 100%"
|
|
@@ -77,8 +76,11 @@ const DingDepartUser = {
|
|
|
disableCheckbox: true,
|
|
|
checkable: false
|
|
|
}
|
|
|
- if(item.deptUserList||item.deptList){
|
|
|
- node.children = this.formatData(item.deptUserList||item.deptList,item.deptList?'bm':'yg')
|
|
|
+ if(item.deptUserList){
|
|
|
+ node.children = this.formatData(item.deptUserList,'yg')
|
|
|
+ }
|
|
|
+ if(item.deptList){
|
|
|
+ node.children = this.formatData(item.deptList,'bm')
|
|
|
}
|
|
|
ret.push(node)
|
|
|
}else{
|
|
@@ -102,6 +104,7 @@ const DingDepartUser = {
|
|
|
// 获取部门人员
|
|
|
async genTreeNode() {
|
|
|
let ret = await getDingTalkAllDeptUser().then(res => res.data)
|
|
|
+ console.log(ret)
|
|
|
const res1 = ret.deptList||[]
|
|
|
const res2 = ret.deptUserList||[]
|
|
|
this.treeData = this.treeData.concat(this.formatData(res1,'bm')).concat(this.formatData(res2,'yg'));
|