fix
parent
8af8df39df
commit
c7715a6e24
|
|
@ -12,10 +12,10 @@ module.exports = {
|
|||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||
// 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.152",
|
||||
API_HOST: "http://192.168.0.103", //huwei
|
||||
//API_HOST: "http://192.168.0.103", //huwei
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||
import StaffViewModal from "~/components/StaffViewModal";
|
||||
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.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 = ({
|
||||
detail,
|
||||
isReview = false,
|
||||
|
|
@ -27,6 +39,11 @@ const FilingTabs = ({
|
|||
|
||||
const [viewId, setViewId] = useState("");
|
||||
|
||||
const personnelTableData = useMemo(
|
||||
() => (detail?.personnelList || []).map((item) => ({ ...item, age: item.age ?? calcAge(item.birthDate) })),
|
||||
[detail?.personnelList],
|
||||
);
|
||||
|
||||
const attachmentList = useMemo(() => {
|
||||
const v = detail.attachmentUrl;
|
||||
if (!v) return [];
|
||||
|
|
@ -147,14 +164,27 @@ const FilingTabs = ({
|
|||
key: "personnel",
|
||||
label: "4.备案人员管理",
|
||||
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={[
|
||||
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
||||
{ title: "人员姓名", dataIndex: "personName", width: 100 },
|
||||
{ title: "类型", dataIndex: "personTypeName", width: 100 },
|
||||
|
||||
{ title: "职称", dataIndex: "titleName", width: 100, render: (_, record) => TITLE_LEVEL_MAP[record.titleCode] ?? (record.titleCode || "-") },
|
||||
{ title: "操作", width: 80,
|
||||
{ title: "人员姓名", dataIndex: "personName" },
|
||||
{ title: "部门", dataIndex: "deptName", ellipsis: true },
|
||||
{ title: "岗位", dataIndex: "positionName", ellipsis: true },
|
||||
{ title: "性别", dataIndex: "genderCode", width: 70, render: (v) => GENDER_MAP[v] || "-" },
|
||||
{ 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) => (
|
||||
<Button type="link" size="small" onClick={() => setViewId(record.sourcePersonnelId)}>
|
||||
查看
|
||||
|
|
@ -172,22 +202,16 @@ const FilingTabs = ({
|
|||
<Table size="small" bordered rowKey="id" pagination={false} dataSource={detail?.equipmentList || []}
|
||||
columns={[
|
||||
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
||||
{ title: "装备名称", dataIndex: "deviceName", width: 140, ellipsis: true },
|
||||
{ title: "规格型号", dataIndex: "deviceModel", width: 120, ellipsis: true },
|
||||
{ title: "生产厂家", dataIndex: "manufacturer", width: 140 },
|
||||
{ title: "装备名称", dataIndex: "deviceName", ellipsis: true },
|
||||
{ title: "规格型号", dataIndex: "deviceModel", ellipsis: true },
|
||||
{ title: "生产厂家", dataIndex: "manufacturer" },
|
||||
{ title: "设备价值(元)", dataIndex: "equipmentValue", width: 150 },
|
||||
{ title: "计量检定情况", width: 120,
|
||||
render: (_, record) => {
|
||||
if (record.calibrationReportUrl) {
|
||||
return <Tag color="success">已上传</Tag>;
|
||||
}
|
||||
return <Tag color="warning">待上传</Tag>;
|
||||
},
|
||||
},
|
||||
{ title: "操作", width: 80,
|
||||
render: (_, record) => (
|
||||
<PreviewUrlButton url={record.calibrationReportUrl}>
|
||||
查看
|
||||
</PreviewUrlButton>
|
||||
render: (_, record) =>
|
||||
record.calibrationReportUrl ? (
|
||||
<PreviewUrlButton url={record.calibrationReportUrl}>预览</PreviewUrlButton>
|
||||
) : (
|
||||
<Tag color="warning">待上传</Tag>
|
||||
),
|
||||
},
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
|
||||
.micro-temp-modal-body {
|
||||
max-height: 630px;
|
||||
max-height: 66vh;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: thin;
|
||||
|
|
|
|||
Loading…
Reference in New Issue