From fb650b07cc153948f6dc6ee98b90ef796b94db2b Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Tue, 14 Jul 2026 11:57:53 +0800 Subject: [PATCH] feat --- src/api/staffInfo/index.js | 6 ++++ .../PersonnelInfo/List/index.js | 31 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/api/staffInfo/index.js b/src/api/staffInfo/index.js index fd6f0f0..e9491b8 100644 --- a/src/api/staffInfo/index.js +++ b/src/api/staffInfo/index.js @@ -32,4 +32,10 @@ export const staffInfoRemove = declareRequest( export const staffInfoResetPassword = declareRequest( "staffInfoLoading", safeAction(async ({ id }) => apiPost("/safetyEval/org-personnel/reset-password", { data: asId(id) })), +); + +export const queryBasicDisciplineMajor = declareRequest( + "staffInfoLoading", + "Get > /safetyEval/basic-discipline-major", + "basicDisciplineMajorList: [] | res.data || []", ); \ No newline at end of file diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js index 9cf08ec..dc27879 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js @@ -20,7 +20,6 @@ import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; 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, NS_ORG_DEPARTMENT } from "~/enumerate/namespace"; import { EDUCATION_LEVEL_OPTIONS, @@ -293,6 +292,8 @@ function PersonnelInfoPage(props) { orgDepartmentTreeData={orgDepartmentTreeData} staffInfoAdd={props.staffInfoAdd} staffInfoEdit={props.staffInfoEdit} + queryBasicDisciplineMajor={props.queryBasicDisciplineMajor} + staffInfo={props.staffInfo} deptOptions={deptOptions} positionOptions={positionOptions} onCancel={() => { @@ -322,6 +323,8 @@ function StaffFormModal({ staffInfoGet, staffInfoAdd, staffInfoEdit, + queryBasicDisciplineMajor, + staffInfo, deptOptions, orgDepartmentTreeData, onCancel, @@ -367,6 +370,11 @@ function StaffFormModal({ } }; + const loadBasicDisciplineMajors = async (industryCode) => { + if (!industryCode) return; + await queryBasicDisciplineMajor({ industryCode, pageSize: 999 }); + }; + useEffect(() => { if (open && !wasOpenRef.current) { if (!currentId) { @@ -404,6 +412,7 @@ function StaffFormModal({ } form.setFieldsValue(setFields); + loadBasicDisciplineMajors(data.qualScope); }) .finally(() => { if (!cancelled) setDetailLoading(false); @@ -430,6 +439,10 @@ function StaffFormModal({ form.setFieldValue("postId", undefined); loadPositionsByDept(changed.deptId); } + if ("qualScope" in changed) { + form.setFieldValue("basicDisciplineMajorId", undefined); + loadBasicDisciplineMajors(changed.qualScope); + } }; const handleSubmit = async (values) => { @@ -607,6 +620,22 @@ function StaffFormModal({ /> + + +