diff --git a/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue b/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue index fccda7e..aa21af5 100644 --- a/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue +++ b/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue @@ -92,11 +92,10 @@ import { useModal } from '/@/components/Modal'; import { useMessage } from '/@/hooks/web/useMessage'; import { useMethods } from '/@/hooks/system/useMethods'; - import { Api, deleteBatchDepart, queryDepartTreeSync4ZhuGuanBuMen } from '../depart.api'; + import { Api, deleteBatchDepart, queryDepartTreeSync } from '../depart.api'; import { searchByKeywords } from '/@/views/system/departUser/depart.user.api'; import DepartFormModal from '/@/views/system/depart/components/DepartFormModal.vue'; import { Popconfirm } from 'ant-design-vue'; - import {useUserStore} from "@/store/modules/user"; const prefixCls = inject('prefixCls'); const emit = defineEmits(['select', 'rootTreeData']); @@ -125,16 +124,13 @@ // 注册 modal const [registerModal, { openModal }] = useModal(); - const userStore = useUserStore(); // 加载顶级部门信息 async function loadRootTreeData() { try { loading.value = true; treeData.value = []; - const result = await queryDepartTreeSync4ZhuGuanBuMen({ - parentOrgCode: userStore.getUserInfo.orgCode, - }); + const result = await queryDepartTreeSync(); if (Array.isArray(result)) { treeData.value = result; } @@ -162,9 +158,8 @@ // 加载子级部门信息 async function loadChildrenTreeData(treeNode) { try { - const result = await queryDepartTreeSync4ZhuGuanBuMen({ - // pid: treeNode.dataRef.id, - parentOrgCode: treeNode.dataRef.orgCode, + const result = await queryDepartTreeSync({ + pid: treeNode.dataRef.id, }); if (result.length == 0) { treeNode.dataRef.isLeaf = true;