diff --git a/jjb.config.js b/jjb.config.js index 054f850..b95671a 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -10,9 +10,9 @@ module.exports = { javaGitBranch: "dev", // 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095) // 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095 - API_HOST: "https://gbs-gateway.qhdsafety.com", + // API_HOST: "https://gbs-gateway.qhdsafety.com", - //API_HOST: "http://192.168.0.152", + API_HOST: "http://192.168.0.134", //API_HOST: "http://192.168.0.150", //太浅 // API_HOST: "http://192.168.0.152", //API_HOST: "http://192.168.0.103", //huwei diff --git a/src/components/StaffViewModal/index.js b/src/components/StaffViewModal/index.js index da5246b..5eb3290 100644 --- a/src/components/StaffViewModal/index.js +++ b/src/components/StaffViewModal/index.js @@ -9,7 +9,10 @@ import { fetchStaffCertListByPersonnelId, } from "~/api/staffCertificate"; import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper"; -import { QUALIFICATION_INDUSTRY_OPTIONS_MAP, TITLE_LEVEL_MAP } from "~/enumerate/enterpriseOptions"; +import { + QUALIFICATION_INDUSTRY_OPTIONS_MAP, + TITLE_LEVEL_MAP, +} from "~/enumerate/enterpriseOptions"; const GENDER_MAP = { 1: "男", 2: "女" }; const REGISTER_ENGINEER_MAP = { 1: "是", 2: "否" }; @@ -99,6 +102,54 @@ export default function StaffViewModal({ ? JSON.parse(info.proofMaterialUrl) : []; + const titleCodeArr = Array.isArray(info.titleCodeArr) + ? info.titleCodeArr.map((item) => { + let proveUrlList = []; + if (item.proveUrl) { + try { + proveUrlList = + typeof item.proveUrl === "string" + ? JSON.parse(item.proveUrl) + : item.proveUrl; + } catch { + proveUrlList = []; + } + } + return { + industryName: + QUALIFICATION_INDUSTRY_OPTIONS_MAP[item.industryCode] || + item.industryCode || + "-", + titleName: TITLE_LEVEL_MAP[item.titleCode] || item.titleCode || "-", + proveUrlList, + }; + }) + : []; + + const renderFileList = (files) => { + if (!files?.length) return "-"; + return files.map((item) => { + const isImage = /\.(jpg|jpeg|png|gif|webp|bmp|svg)(\?.*)?$/i.test( + item.url, + ); + return ( +