tangjie 2026-08-05 11:24:39 +08:00
parent 8af8df39df
commit c7715a6e24
3 changed files with 50 additions and 26 deletions

View File

@ -12,10 +12,10 @@ module.exports = {
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x: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.134", API_HOST: "http://192.168.0.134",
//API_HOST: "http://192.168.0.150", //太浅 //API_HOST: "http://192.168.0.150", //太浅
// API_HOST: "http://192.168.0.152", // API_HOST: "http://192.168.0.152",
API_HOST: "http://192.168.0.103", //huwei //API_HOST: "http://192.168.0.103", //huwei
}, },
production: { production: {
// 应用后端分支名称,部署上线需要 // 应用后端分支名称,部署上线需要

View File

@ -4,7 +4,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { NS_QUAL_REVIEW } from "~/enumerate/namespace"; import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
import StaffViewModal from "~/components/StaffViewModal"; import StaffViewModal from "~/components/StaffViewModal";
import PreviewUrlButton from "~/components/PreviewUrlButton/index"; import PreviewUrlButton from "~/components/PreviewUrlButton/index";
import { QUALIFICATION_INDUSTRY_OPTIONS_MAP, TITLE_LEVEL_MAP } from "~/enumerate/enterpriseOptions"; import { QUALIFICATION_INDUSTRY_OPTIONS_MAP } from "~/enumerate/enterpriseOptions";
import { CAPABILITY_MAP, GENDER_MAP } from "~/enumerate/constant";
/** /**
@ -17,6 +18,17 @@ import { QUALIFICATION_INDUSTRY_OPTIONS_MAP, TITLE_LEVEL_MAP } from "~/enumerate
* @param {Function} [props.onPersonnelView] - 查看人员详情回调覆盖默认弹窗 * @param {Function} [props.onPersonnelView] - 查看人员详情回调覆盖默认弹窗
* @param {Function} [props.onEquipView] - 查看设备详情回调 (record) => void覆盖默认弹窗 * @param {Function} [props.onEquipView] - 查看设备详情回调 (record) => void覆盖默认弹窗
*/ */
function calcAge(birthDate) {
if (!birthDate) return "-";
const birth = new Date(birthDate);
if (isNaN(birth.getTime())) return "-";
const now = new Date();
let age = now.getFullYear() - birth.getFullYear();
const m = now.getMonth() - birth.getMonth();
if (m < 0 || (m === 0 && now.getDate() < birth.getDate())) age--;
return age >= 0 ? age : "-";
}
const FilingTabs = ({ const FilingTabs = ({
detail, detail,
isReview = false, isReview = false,
@ -27,6 +39,11 @@ const FilingTabs = ({
const [viewId, setViewId] = useState(""); const [viewId, setViewId] = useState("");
const personnelTableData = useMemo(
() => (detail?.personnelList || []).map((item) => ({ ...item, age: item.age ?? calcAge(item.birthDate) })),
[detail?.personnelList],
);
const attachmentList = useMemo(() => { const attachmentList = useMemo(() => {
const v = detail.attachmentUrl; const v = detail.attachmentUrl;
if (!v) return []; if (!v) return [];
@ -147,14 +164,27 @@ const FilingTabs = ({
key: "personnel", key: "personnel",
label: "4.备案人员管理", label: "4.备案人员管理",
children: ( children: (
<Table size="small" bordered rowKey="id" pagination={false} dataSource={detail?.personnelList || []} <Table size="small" bordered rowKey="id" pagination={false} dataSource={personnelTableData}
scroll={{ x: 1200 }}
columns={[ columns={[
{ title: "序号", width: 60, render: (_, __, i) => i + 1 }, { title: "序号", width: 60, render: (_, __, i) => i + 1 },
{ title: "人员姓名", dataIndex: "personName", width: 100 }, { title: "人员姓名", dataIndex: "personName" },
{ title: "类型", dataIndex: "personTypeName", width: 100 }, { title: "部门", dataIndex: "deptName", ellipsis: true },
{ title: "岗位", dataIndex: "positionName", ellipsis: true },
{ title: "职称", dataIndex: "titleName", width: 100, render: (_, record) => TITLE_LEVEL_MAP[record.titleCode] ?? (record.titleCode || "-") }, { title: "性别", dataIndex: "genderCode", width: 70, render: (v) => GENDER_MAP[v] || "-" },
{ title: "操作", width: 80, { title: "年龄", dataIndex: "age", width: 70 },
{ title: "注册安全工程师", dataIndex: "registerEngineerFlag", width: 120, render: (v) => v === 1 ? "是" : "否" },
{ title: "评价师", dataIndex: "evaluatorCertNo", width: 80, render: (v) => v ? "是" : "否" },
{
title: "能力",
render: (_, record) => {
const codes = record.professionalCapabilityCodeList || [];
return codes.length
? codes.map((code) => CAPABILITY_MAP[code] || code).join("、")
: "-";
},
},
{ title: "操作", width: 80, fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Button type="link" size="small" onClick={() => setViewId(record.sourcePersonnelId)}> <Button type="link" size="small" onClick={() => setViewId(record.sourcePersonnelId)}>
查看 查看
@ -172,23 +202,17 @@ const FilingTabs = ({
<Table size="small" bordered rowKey="id" pagination={false} dataSource={detail?.equipmentList || []} <Table size="small" bordered rowKey="id" pagination={false} dataSource={detail?.equipmentList || []}
columns={[ columns={[
{ title: "序号", width: 60, render: (_, __, i) => i + 1 }, { title: "序号", width: 60, render: (_, __, i) => i + 1 },
{ title: "装备名称", dataIndex: "deviceName", width: 140, ellipsis: true }, { title: "装备名称", dataIndex: "deviceName", ellipsis: true },
{ title: "规格型号", dataIndex: "deviceModel", width: 120, ellipsis: true }, { title: "规格型号", dataIndex: "deviceModel", ellipsis: true },
{ title: "生产厂家", dataIndex: "manufacturer", width: 140 }, { title: "生产厂家", dataIndex: "manufacturer" },
{ title: "设备价值(元)", dataIndex: "equipmentValue", width: 150 },
{ title: "计量检定情况", width: 120, { title: "计量检定情况", width: 120,
render: (_, record) => { render: (_, record) =>
if (record.calibrationReportUrl) { record.calibrationReportUrl ? (
return <Tag color="success">已上传</Tag>; <PreviewUrlButton url={record.calibrationReportUrl}>预览</PreviewUrlButton>
} ) : (
return <Tag color="warning">待上传</Tag>; <Tag color="warning">待上传</Tag>
}, ),
},
{ title: "操作", width: 80,
render: (_, record) => (
<PreviewUrlButton url={record.calibrationReportUrl}>
查看
</PreviewUrlButton>
),
}, },
]} ]}
/> />

View File

@ -9,7 +9,7 @@
} }
.micro-temp-modal-body { .micro-temp-modal-body {
max-height: 630px; max-height: 66vh;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
scrollbar-width: thin; scrollbar-width: thin;