From 123a10f7ae7272fd298a81f0155b67f53d8de694 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 10 Nov 2024 18:07:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E6=96=B0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/depart/components/DepartLeftTree.vue | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue b/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue index 780d137..064a18b 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;