|
@@ -82,7 +82,7 @@
|
|
|
const deptTree = ref<DeptTree[]>();
|
|
const deptTree = ref<DeptTree[]>();
|
|
|
const getDeptTreeData = async () => {
|
|
const getDeptTreeData = async () => {
|
|
|
const res = await getAllDepartments();
|
|
const res = await getAllDepartments();
|
|
|
- deptTree.value = res[0].children;
|
|
|
|
|
|
|
+ deptTree.value = res.flatMap((item) => item.children ?? []);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 表单数据
|
|
// 表单数据
|