From bc292b63abc2bf71fb809a9e304e7bfc41ec0e69 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Thu, 9 Jul 2026 18:03:32 +0800 Subject: [PATCH] fix --- .../PersonnelInfo/List/index.js | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js index 38c2482..c962eba 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js @@ -10,6 +10,7 @@ import { Col, Select, Table, + TreeSelect, } from "antd"; import { useEffect, useRef, useState } from "react"; import dayjs from "dayjs"; @@ -20,7 +21,7 @@ import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction"; import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; import { tools } from "@cqsjjb/jjb-common-lib"; import { Get } from "@cqsjjb/jjb-common-lib/http"; -import { NS_STAFF_INFO } from "~/enumerate/namespace"; +import { NS_STAFF_INFO, NS_ORG_DEPARTMENT } from "~/enumerate/namespace"; import { EDUCATION_LEVEL_OPTIONS, EDUCATION_TYPE_OPTIONS, @@ -43,7 +44,8 @@ function PersonnelInfoPage(props) { const [searchForm] = Form.useForm(); const [deptOptions, setDeptOptions] = useState([]); const [positionOptions, setPositionOptions] = useState([]); - const { staffInfo } = props; + const { staffInfo, orgDepartmentTree, orgDepartment } = props; + const { orgDepartmentTreeData } = orgDepartment; const { staffInfoList: dataSource, staffInfoTotal: total, @@ -51,20 +53,15 @@ function PersonnelInfoPage(props) { } = staffInfo || {}; useEffect(() => { + orgDepartmentTree(); let cancelled = false; (async () => { try { - const [deptRes, posRes] = await Promise.all([ - Get("/safetyEval/org-department/page", { current: 1, size: 200 }), + const [posRes] = await Promise.all([ Get("/safetyEval/org-position/page", { current: 1, size: 200 }), ]); if (cancelled) return; - setDeptOptions( - (deptRes?.data || []).map((d) => ({ - label: d.deptName, - value: d.id, - })), - ); + setPositionOptions( (posRes?.data || []).map((p) => ({ label: p.positionName, @@ -91,9 +88,9 @@ function PersonnelInfoPage(props) { }; const goCertificate = (id, staffName) => { - - - props.history.push(`Certificate?staffId=${id}&staffName=${encodeURIComponent(staffName || "")}`); + props.history.push( + `Certificate?staffId=${id}&staffName=${encodeURIComponent(staffName || "")}`, + ); }; const onDelete = (id) => { @@ -162,18 +159,18 @@ function PersonnelInfoPage(props) { /> ,