diff --git a/src/views/system/installation/editDialog.vue b/src/views/system/installation/editDialog.vue index 15b8051..8ced2c7 100644 --- a/src/views/system/installation/editDialog.vue +++ b/src/views/system/installation/editDialog.vue @@ -6,6 +6,8 @@ import { getPostList } from '@/api/system/post' import { addLocation, updateLocation } from '@/api/system/installation' import type { IPostList } from '@/views/system/post/post-interface' +import { getDeptList, getDeptTree } from '@/api/system/dept' +import { judgeTree, toTreeList } from '@/utils/structure' const emits = defineEmits(['refresh']) const dataFormRef = ref() const dialogFormVisible = ref(false) // 对话框是否显示 @@ -122,6 +124,14 @@ }) } fetchPost() +const deptList = ref([]) +const fetchDict = () => { + getDeptList({}).then((res) => { + const data = res.data.list.filter((item: any) => item.fullName !== '顶级').map((item: any) => ({ ...item, label: item.fullName, value: item.id })) + deptList.value = toTreeList(data) + }) +} +fetchDict()