zhangwei
2025-08-08 d71422ecb4e6a0c855e94e0416e4fc52387dec18
src/views/system/dept/utils/hook.tsx
@@ -18,7 +18,7 @@
import { usePublicHooks } from "../../hooks";
import { addDialog } from "@/components/ReDialog";
import { type Ref, reactive, ref, onMounted, h, computed } from "vue";
import type { FormItemProps } from "../utils/types";
import type { FormItemProps } from "./types";
import {
  cloneDeep,
  isAllEmpty,
@@ -317,7 +317,7 @@
    pagination.pageSize = result.pageSize;
    pagination.currentPage = result.page;
    // if (!isAllEmpty(form.name)) {
    //   // 前端搜索部门名称
    //   // 前端搜索项目名称
    //   newData = newData.filter(item => item.name.includes(form.name));
    // }
    // if (!isAllEmpty(form.status)) {
@@ -328,7 +328,7 @@
  }
  function formatHigherDeptOptions(treeList) {
    // 根据返回数据的status字段值判断追加是否禁用disabled字段,返回处理后的树结构,用于上级部门级联选择器的展示(实际开发中也是如此,不可能前端需要的每个字段后端都会返回,这时需要前端自行根据后端返回的某些字段做逻辑处理)
    // 根据返回数据的status字段值判断追加是否禁用disabled字段,返回处理后的树结构,用于上级项目级联选择器的展示(实际开发中也是如此,不可能前端需要的每个字段后端都会返回,这时需要前端自行根据后端返回的某些字段做逻辑处理)
    if (!treeList || !treeList.length) return;
    const newTreeList = [];
    for (let i = 0; i < treeList.length; i++) {
@@ -474,9 +474,9 @@
    onSearch,
    /** 重置 */
    resetForm,
    /** 新增、修改部门 */
    /** 新增、修改项目 */
    openDialog,
    /** 删除部门 */
    /** 删除项目 */
    handleDelete,
    handleSelectionChange,
    handleSizeChange,