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 { 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;

Loading…
Cancel
Save