| | |
| | | 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, |
| | |
| | | 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)) { |
| | |
| | | } |
| | | |
| | | function formatHigherDeptOptions(treeList) { |
| | | // 根据返回数据的status字段值判断追加是否禁用disabled字段,返回处理后的树结构,用于上级部门级联选择器的展示(实际开发中也是如此,不可能前端需要的每个字段后端都会返回,这时需要前端自行根据后端返回的某些字段做逻辑处理) |
| | | // 根据返回数据的status字段值判断追加是否禁用disabled字段,返回处理后的树结构,用于上级项目级联选择器的展示(实际开发中也是如此,不可能前端需要的每个字段后端都会返回,这时需要前端自行根据后端返回的某些字段做逻辑处理) |
| | | if (!treeList || !treeList.length) return; |
| | | const newTreeList = []; |
| | | for (let i = 0; i < treeList.length; i++) { |
| | |
| | | onSearch, |
| | | /** 重置 */ |
| | | resetForm, |
| | | /** 新增、修改部门 */ |
| | | /** 新增、修改项目 */ |
| | | openDialog, |
| | | /** 删除部门 */ |
| | | /** 删除项目 */ |
| | | handleDelete, |
| | | handleSelectionChange, |
| | | handleSizeChange, |