master
Gitea 2 weeks ago
parent ed59ba5992
commit 123a10f7ae
  1. 13
      jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue

@ -92,11 +92,10 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useMethods } from '/@/hooks/system/useMethods'; 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 { searchByKeywords } from '/@/views/system/departUser/depart.user.api';
import DepartFormModal from '/@/views/system/depart/components/DepartFormModal.vue'; import DepartFormModal from '/@/views/system/depart/components/DepartFormModal.vue';
import { Popconfirm } from 'ant-design-vue'; import { Popconfirm } from 'ant-design-vue';
import {useUserStore} from "@/store/modules/user";
const prefixCls = inject('prefixCls'); const prefixCls = inject('prefixCls');
const emit = defineEmits(['select', 'rootTreeData']); const emit = defineEmits(['select', 'rootTreeData']);
@ -125,16 +124,13 @@
// modal // modal
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const userStore = useUserStore();
// //
async function loadRootTreeData() { async function loadRootTreeData() {
try { try {
loading.value = true; loading.value = true;
treeData.value = []; treeData.value = [];
const result = await queryDepartTreeSync4ZhuGuanBuMen({ const result = await queryDepartTreeSync();
parentOrgCode: userStore.getUserInfo.orgCode,
});
if (Array.isArray(result)) { if (Array.isArray(result)) {
treeData.value = result; treeData.value = result;
} }
@ -162,9 +158,8 @@
// //
async function loadChildrenTreeData(treeNode) { async function loadChildrenTreeData(treeNode) {
try { try {
const result = await queryDepartTreeSync4ZhuGuanBuMen({ const result = await queryDepartTreeSync({
// pid: treeNode.dataRef.id, pid: treeNode.dataRef.id,
parentOrgCode: treeNode.dataRef.orgCode,
}); });
if (result.length == 0) { if (result.length == 0) {
treeNode.dataRef.isLeaf = true; treeNode.dataRef.isLeaf = true;

Loading…
Cancel
Save