From 716da663388dafd18566f54be53e87ba5c2dd752 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Tue, 7 Jul 2026 15:27:25 +0800 Subject: [PATCH] feat --- src/components/AttachmentUpload/index.js | 2 - .../PersonnelInfo/List/index.js | 314 +++++++++++++----- .../PersonnelInfo/StaffViewModal.js | 48 ++- .../EnterpriseInfo/ResignationApply/index.js | 5 +- .../components/OrgPersonnelSelectModal.jsx | 2 +- .../FilingForm/components/PersonnelStep.jsx | 2 +- .../QualificationReview/FilingTabs/index.js | 2 +- 7 files changed, 254 insertions(+), 121 deletions(-) diff --git a/src/components/AttachmentUpload/index.js b/src/components/AttachmentUpload/index.js index 40fe12c..f632a35 100644 --- a/src/components/AttachmentUpload/index.js +++ b/src/components/AttachmentUpload/index.js @@ -14,7 +14,6 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou label={label} valuePropName="fileList" getValueProps={(value) => { - if (Array.isArray(value)) { return { fileList: value }; } @@ -30,7 +29,6 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou }; }} getValueFromEvent={({ fileList }) => { - return ( fileList?.map((file) => ({ url: file.response?.data?.url || file.url, diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js index 3862f65..6166564 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js @@ -1,6 +1,16 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, DatePicker, Form, Input, message, Modal, Row, Col, Select, Table, Upload } from "antd"; -import { UploadOutlined } from "@ant-design/icons"; +import { + Button, + DatePicker, + Form, + Input, + message, + Modal, + Row, + Col, + Select, + Table, +} from "antd"; import { useEffect, useRef, useState } from "react"; import dayjs from "dayjs"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; @@ -21,6 +31,7 @@ import { } from "~/enumerate/enterpriseOptions"; import { getBirthDateFromIdCard } from "~/utils"; import { idCardRule, mobileRule } from "~/utils/validators"; +import AttachmentUpload from "~/components/AttachmentUpload"; import StaffViewModal from "../StaffViewModal"; const { router } = tools; @@ -48,17 +59,26 @@ function PersonnelInfoPage(props) { 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, - value: p.id, - deptId: p.deptId, - }))); + setDeptOptions( + (deptRes?.data || []).map((d) => ({ + label: d.deptName, + value: d.id, + })), + ); + setPositionOptions( + (posRes?.data || []).map((p) => ({ + label: p.positionName, + value: p.id, + deptId: p.deptId, + })), + ); } catch (err) { console.warn("[PersonnelInfo] load dept/position options failed:", err); } })(); - return () => { cancelled = true; }; + return () => { + cancelled = true; + }; }, []); useEffect(() => { @@ -134,19 +154,37 @@ function PersonnelInfoPage(props) { loading={loading} formLine={[