From 412b8479c0eea4ebc08a90edb6a9fb9f9dfbece2 Mon Sep 17 00:00:00 2001 From: huwei <3313749341@qq.com> Date: Tue, 7 Jul 2026 16:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=8A=A4=EF=BC=8C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=AD=89=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/staffInfo/index.js | 10 ++-- .../PersonnelInfo/List/index.js | 53 +------------------ .../EnterpriseInfo/QualificationCert/index.js | 7 +++ 3 files changed, 12 insertions(+), 58 deletions(-) diff --git a/src/api/staffInfo/index.js b/src/api/staffInfo/index.js index 8ef9e4d..49d53b5 100644 --- a/src/api/staffInfo/index.js +++ b/src/api/staffInfo/index.js @@ -1,5 +1,6 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; -import { apiPost, apiPostDelete, safeAction } from "../enterpriseInfo/http"; +import { apiPost, safeAction } from "../enterpriseInfo/http"; +import { asId } from "../enterpriseInfo/idUtil"; export const staffInfoList = declareRequest( "staffInfoLoading", @@ -25,13 +26,10 @@ export const staffInfoEdit = declareRequest( export const staffInfoRemove = declareRequest( "staffInfoLoading", - safeAction(async ({ id }) => apiPostDelete("/safetyEval/org-personnel/delete", id)), + safeAction(async ({ id }) => apiPost("/safetyEval/org-personnel/delete", { data: asId(id) })), ); export const staffInfoResetPassword = declareRequest( "staffInfoLoading", - safeAction(async ({ id }) => { - const url = `/safetyEval/org-personnel/reset-password?id=${encodeURIComponent(id)}`; - return apiPost(url, {}); - }), + safeAction(async ({ id }) => apiPost("/safetyEval/org-personnel/reset-password", { data: asId(id) })), ); \ 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 adfda40..be78e73 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js @@ -1,6 +1,5 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, DatePicker, Form, Image, 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"; @@ -319,14 +318,10 @@ function StaffFormModal({ const [detailLoading, setDetailLoading] = useState(false); const [deptPositionOptions, setDeptPositionOptions] = useState([]); const [positionLoading, setPositionLoading] = useState(false); - const [uploadFileList, setUploadFileList] = useState([]); - const [previewImage, setPreviewImage] = useState(""); const watchedDeptId = Form.useWatch("deptId", form); const wasOpenRef = useRef(false); const inflightDeptRef = useRef(null); - const isImage = (url) => /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(url || ""); - const loadPositionsByDept = async (deptId) => { const id = deptId; if (!id) { @@ -363,8 +358,6 @@ function StaffFormModal({ if (!currentId) { form.resetFields(); setDeptPositionOptions([]); - setUploadFileList([]); - setPreviewImage(""); form.setFieldsValue({ registerEngineerFlag: 2, }); @@ -372,8 +365,6 @@ function StaffFormModal({ } if (!open) { setDeptPositionOptions([]); - setUploadFileList([]); - setPreviewImage(""); } wasOpenRef.current = open; }, [open, currentId, form]); @@ -410,8 +401,6 @@ function StaffFormModal({ const handleCancel = () => { form.resetFields(); setDeptPositionOptions([]); - setUploadFileList([]); - setPreviewImage(""); onCancel(); }; @@ -661,46 +650,6 @@ function StaffFormModal({ label="申报专业能力证明材料" maxCount={5} /> - { - if (Array.isArray(e)) return e; - return e?.fileList; - }} - > - { - setUploadFileList(info.fileList); - }} - onPreview={(file) => { - const src = file.url || file.response?.data?.url || file.thumbUrl; - if (!src) return; - if (isImage(src)) { - setPreviewImage(src); - } else { - window.open(src, "_blank"); - } - }} - > - - - - { - if (!visible) setPreviewImage(""); - }, - }} - /> diff --git a/src/pages/Container/EnterpriseInfo/QualificationCert/index.js b/src/pages/Container/EnterpriseInfo/QualificationCert/index.js index 4d090dc..a6773bd 100644 --- a/src/pages/Container/EnterpriseInfo/QualificationCert/index.js +++ b/src/pages/Container/EnterpriseInfo/QualificationCert/index.js @@ -59,6 +59,13 @@ function QualificationCertPage(props) { ...router.query, current: router.query.current || 1, pageSize: router.query.pageSize || 10, + // 映射后端期望的字段名:前端 likeCertName → 后端 certName + certName: router.query.likeCertName || undefined, + // 映射日期筛选:前端 validStartDate/validEndDate → 后端 startTime/endTime (LocalDateTime 格式) + startTime: router.query.validStartDate ? `${router.query.validStartDate} 00:00:00` : undefined, + endTime: router.query.validEndDate ? `${router.query.validEndDate} 23:59:59` : undefined, + // 后端分页字段名为 size + size: router.query.pageSize || 10, }; const res = await props.orgQualificationCertList(params); if (res?.success !== false) {