+
加载更多...
没有更多数据了
@@ -273,13 +272,15 @@ export default {
resList = data.list || [];
} else {
// 组织架构:不分页,一次性全量获取
- const { data } = await getGroupsListUser({ group_id: this.currentGroupId });
+ const { data } = await getGroupsListUser({
+ group_id: this.currentGroupId,
+ });
resList = data.list || [];
}
- const formatList = resList.map(item => ({
+ const formatList = resList.map((item) => ({
...item,
- online: [1, true].includes(item.online)
+ online: [1, true].includes(item.online),
}));
if (isRefresh) {
@@ -312,7 +313,7 @@ export default {
try {
const { data } = await getGroupsList();
this.treeData = data.list;
- this.defaultExpandedKeys = this.treeData.map(node => node.id);
+ this.defaultExpandedKeys = this.treeData.map((node) => node.id);
if (!this.userGroupId) return;
const parentKeys = this.findParentKeys(this.treeData, this.userGroupId);
this.$nextTick(() => {
@@ -332,7 +333,10 @@ export default {
for (const node of tree) {
if (node.id === targetId) return [...parents, node.id];
if (node.child && node.child.length) {
- const res = this.findParentKeys(node.child, targetId, [...parents, node.id]);
+ const res = this.findParentKeys(node.child, targetId, [
+ ...parents,
+ node.id,
+ ]);
if (res.length) return res;
}
}