|
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
|
ref="orgTree" |
|
|
|
|
:data="treeData" |
|
|
|
|
:props="treeProps" |
|
|
|
|
default-expand-all |
|
|
|
|
:default-expanded-keys="defaultExpandedKeys" |
|
|
|
|
highlight-current |
|
|
|
|
node-key="id" |
|
|
|
|
@node-click="handleNodeClick" |
|
|
|
|
@ -143,6 +143,7 @@ export default { |
|
|
|
|
return { |
|
|
|
|
treeData: [], |
|
|
|
|
treeProps: { label: "name", children: "child" }, |
|
|
|
|
defaultExpandedKeys: [], |
|
|
|
|
currentGroupId: null, |
|
|
|
|
currentStructureName: "", |
|
|
|
|
memberList: [], |
|
|
|
|
@ -200,7 +201,9 @@ export default { |
|
|
|
|
async fetchOrgTree() { |
|
|
|
|
try { |
|
|
|
|
const { data } = await getGroupsList(); |
|
|
|
|
this.treeData =data.list |
|
|
|
|
this.treeData = data.list; |
|
|
|
|
// 默认只展开一级节点 |
|
|
|
|
this.defaultExpandedKeys = this.treeData.map((node) => node.id); |
|
|
|
|
if (!this.userGroupId) return; |
|
|
|
|
const parentKeys = this.findParentKeys(this.treeData, this.userGroupId); |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
@ -447,6 +450,14 @@ export default { |
|
|
|
|
flex-shrink: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.load-more { |
|
|
|
|
padding: 12px; |
|
|
|
|
text-align: center; |
|
|
|
|
.loading-text { |
|
|
|
|
font-size: 12px; |
|
|
|
|
color: #909399; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 右侧详情 |
|
|
|
|
|