diff --git a/jjb.config.js b/jjb.config.js index c1c85a6..8c58ad4 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -14,7 +14,7 @@ module.exports = { }, production: { // 应用后端分支名称,部署上线需要 - javaGitBranch: "", + javaGitBranch: "dev", // 接口服务地址 API_HOST: "", }, diff --git a/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js b/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js index 38207a8..294f50c 100644 --- a/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js +++ b/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js @@ -55,8 +55,8 @@ function toSelectedDept(node) { } function DepartmentPositionPage(props) { - const {orgPosition}=props; - const {orgPositionLoading}=orgPosition; + const { orgPosition } = props; + const { orgPositionLoading } = orgPosition; const [selectedDept, setSelectedDept] = useState(null); const [treeData, setTreeData] = useState([]); const [deptModalOpen, setDeptModalOpen] = useState(false); @@ -318,6 +318,7 @@ function DepartmentPositionPage(props) { , ]} onFinish={() => fetchPositionData(1, 10)} + onReset={() => fetchPositionData(1, 10)} style={{ marginBottom: 16 }} /> - - - + {!currentId && ( + + + + )} { - console.warn("[StaffViewModal] load detail failed:", err); - return { data: {} }; - }), + Promise.resolve(requestDetailsRef.current({ id: currentId })).catch( + (err) => { + console.warn("[StaffViewModal] load detail failed:", err); + return { data: {} }; + }, + ), typeof loadCertList === "function" ? Promise.resolve(loadCertList(currentId)).catch((err) => { - console.warn("[StaffViewModal] load certificates failed:", err); - return []; - }) + console.warn("[StaffViewModal] load certificates failed:", err); + return []; + }) : Promise.resolve([]), - ]).then(([detailRes, certList]) => { - if (!cancelled) { - setInfo(detailRes?.data || {}); - setCertificates(Array.isArray(certList) ? certList : []); - } - }).finally(() => { - if (!cancelled) { - setDetailLoading(false); - } - }); + ]) + .then(([detailRes, certList]) => { + if (!cancelled) { + setInfo(detailRes?.data || {}); + setCertificates(Array.isArray(certList) ? certList : []); + } + }) + .finally(() => { + if (!cancelled) { + setDetailLoading(false); + } + }); return () => { cancelled = true; }; @@ -85,14 +94,18 @@ export default function StaffViewModal({ } }; + const proofMaterialUrl = info.proofMaterialUrl + ? JSON.parse(info.proofMaterialUrl) + : []; - const proofMaterialUrl= info.proofMaterialUrl? JSON.parse(info.proofMaterialUrl) : []; - const certPreviewFiles = certPreviewInfo?.certImgs?.length ? certPreviewInfo.certImgs : certPreviewInfo?.certImgFiles || []; const certPreviewUrl = resolvePreviewSrc(certPreviewFiles[0]); - const certPreviewName = certPreviewFiles[0]?.fileName || certPreviewFiles[0]?.name || certPreviewInfo?.certName; + const certPreviewName = + certPreviewFiles[0]?.fileName || + certPreviewFiles[0]?.name || + certPreviewInfo?.certName; return ( <> @@ -108,28 +121,57 @@ export default function StaffViewModal({ > {info.userName} - {GENDER_MAP[info.genderCode]} - {info.birthDate} + + {GENDER_MAP[info.genderCode]} + + + {info.birthDate} + {info.account} {info.deptName} {info.postName} - {info.personType || "基础人员"} - {info.qualScope || "-"} - {info.professionalLevelName || "-"} - {info.evaluatorCertNo || "-"} - {info.educationTypeName || "-"} - {info.educationLevelName || "-"} - {info.titleName || "-"} + + {info.personType || "基础人员"} + + + {info.qualScope || "-"} + + + {info.professionalLevelName || "-"} + + + {info.evaluatorCertNo || "-"} + + + {info.educationTypeName || "-"} + + + {info.educationLevelName || "-"} + + + {info.titleName || "-"} + {REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"} - {info.idCardNo} - - {info.currentAddress} - {info.officeAddress} - {info.graduateSchool} + + {info.idCardNo} + + + + {info.currentAddress} + + + {info.officeAddress} + + + {info.graduateSchool} + {info.major} - + {info.publications || "-"} @@ -139,18 +181,32 @@ export default function StaffViewModal({ {info.workExperience || "-"} - {proofMaterialUrl.length ? proofMaterialUrl.map((item) => ( - - )) : "-" -} + {proofMaterialUrl.length + ? proofMaterialUrl.map((item) => { + const isImage = /\.(jpg|jpeg|png|gif|webp|bmp|svg)(\?.*)?$/i.test(item.url); + return ( +
+ {isImage ? ( + + ) : ( + + )} +
+ ); + }) + : "-"}
-
证照信息
+
+ 证照信息 +
( - + ), }, ]} @@ -192,7 +254,9 @@ export default function StaffViewModal({ loading={certPreviewLoading} cancelText="关闭" okText={certPreviewUrl ? "新窗口打开" : "关闭"} - okButtonProps={{ style: certPreviewUrl ? undefined : { display: "none" } }} + okButtonProps={{ + style: certPreviewUrl ? undefined : { display: "none" }, + }} onCancel={() => { setCertPreview(null); setCertPreviewInfo(null); @@ -207,18 +271,38 @@ export default function StaffViewModal({ > {certPreviewInfo && (
- - {certPreviewInfo.certName} - {certPreviewInfo.certNo} - {certPreviewInfo.certCategory || "-"} - {certPreviewInfo.issueOrg || "-"} - {certPreviewInfo.validStartDate || "-"} - {certPreviewInfo.validEndDate || "-"} + + + {certPreviewInfo.certName} + + + {certPreviewInfo.certNo} + + + {certPreviewInfo.certCategory || "-"} + + + {certPreviewInfo.issueOrg || "-"} + + + {certPreviewInfo.validStartDate || "-"} + + + {certPreviewInfo.validEndDate || "-"} + - +
)} ); -} \ No newline at end of file +}