dev_1.0.1
tangjie 2026-07-06 18:06:49 +08:00
parent 19e4771369
commit 0c9e2d62d3
17 changed files with 182 additions and 202 deletions

View File

@ -1,54 +1,33 @@
import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
import {
fromEquipForm,
fromPageResponse,
fromSingleResponse,
mapEquipEnableFlag,
toEquipForm,
toPageQuery,
} from "../enterpriseInfo/adapter";
import { apiGet, apiPost, apiPostDelete, safeAction, safePageResult } from "../enterpriseInfo/http";
export const equipInfoList = declareRequest("equipInfoLoading", safePageResult(async (params) => { export const equipInfoList = declareRequest(
const query = toPageQuery(params, { "equipInfoLoading",
likeDeviceName: "deviceName", "Get > /safetyEval/org-equipment/page",
instrumentType: "instrumentType", "equipInfoList: [] | res.data || [] & equipInfoTotal: 0 | res.data?.total || 0",
deviceType: "deviceType", );
enableStatus: "enableFlag",
});
if (query.enableFlag !== undefined && query.enableFlag !== "") {
query.enableFlag = mapEquipEnableFlag(query.enableFlag);
}
const res = await apiGet("/safetyEval/org-equipment/page", query);
return fromPageResponse(res, toEquipForm);
}));
export const equipInfoGet = declareRequest("equipInfoLoading", safeAction(async (params) => { export const equipInfoGet = declareRequest(
const res = await apiGet("/safetyEval/org-equipment/get", { id: params.id }); "equipInfoLoading",
return fromSingleResponse(res, toEquipForm); "Get > /safetyEval/org-equipment/get",
})); "equipInfoDetail: {} | res.data || {}",
);
export const equipInfoAdd = declareRequest("equipInfoLoading", safeAction(async (values) => { export const equipInfoAdd = declareRequest(
const res = await apiPost("/safetyEval/org-equipment/save", fromEquipForm(values)); "equipInfoLoading",
return fromSingleResponse(res, toEquipForm); "Post > @/safetyEval/org-equipment/save",
})); );
export const equipInfoEdit = declareRequest("equipInfoLoading", safeAction(async (values) => { export const equipInfoEdit = declareRequest(
const res = await apiPost("/safetyEval/org-equipment/modify", fromEquipForm(values)); "equipInfoLoading",
return fromSingleResponse(res, toEquipForm); "Post > @/safetyEval/org-equipment/modify",
})); );
export const equipInfoRemove = declareRequest("equipInfoLoading", safeAction(async ({ id }) => { export const equipInfoRemove = declareRequest(
return apiPostDelete("/safetyEval/org-equipment/delete", id); "equipInfoLoading",
})); "Post > @/safetyEval/org-equipment/delete",
);
export const equipInfoToggleStatus = declareRequest("equipInfoLoading", safeAction(async ({ id }) => { export const equipInfoToggleStatus = declareRequest(
const res = await apiGet("/safetyEval/org-equipment/get", { id }); "equipInfoLoading",
const data = res?.data || {}; "Get > /safetyEval/org-equipment/modify",
const nextFlag = Number(data.enableFlag) === 1 ? 2 : 1; );
return apiPost("/safetyEval/org-equipment/modify", {
...data,
id,
enableFlag: nextFlag,
});
}));

View File

@ -70,7 +70,7 @@ export default function FilePreviewModal({
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title={title} title={title}
width={width} width={width}
cancelText="关闭" cancelText="关闭"

View File

@ -304,7 +304,7 @@ function DepartmentPositionPage(props) {
{positionModalOpen && ( {positionModalOpen && (
<Modal <Modal
open={positionModalOpen} open={positionModalOpen}
destroyOnClose destroyOnHidden
title={currentId ? "编辑岗位" : "添加岗位"} title={currentId ? "编辑岗位" : "添加岗位"}
width={560} width={560}
onCancel={closePositionModal} onCancel={closePositionModal}
@ -444,7 +444,7 @@ function DeptFormModal({
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title={currentId ? "编辑部门" : "添加部门"} title={currentId ? "编辑部门" : "添加部门"}
width={560} width={560}
loading={detailLoading} loading={detailLoading}

View File

@ -1,29 +1,35 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import React, { useEffect, useState } from "react";
import { Button, Descriptions, Form, Input, InputNumber, message, Modal, Row, Col, Select, Space } from "antd"; import { Button, Descriptions, Form, Input, InputNumber, message, Modal, Row, Col, Table, Tag, Select, Space } from "antd";
import { useEffect, useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import Search from "zy-react-library/components/Search"; import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
import Table from "zy-react-library/components/Table"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
import useTable from "zy-react-library/hooks/useTable"; import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
import { tools } from "@cqsjjb/jjb-common-lib";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { NS_EQUIP_INFO } from "~/enumerate/namespace"; import { NS_EQUIP_INFO } from "~/enumerate/namespace";
import { isEquipEnabled } from "~/api/enterpriseInfo/adapter";
import { safeListRequest, safeRequest } from "~/utils";
import { positiveNumberRule } from "~/utils/validators"; import { positiveNumberRule } from "~/utils/validators";
const DUAL_CHANNEL = { 1: "是", 0: "否" }; const { router } = tools;
const DUAL_CHANNEL_MAP = { 1: "是", 0: "否" };
function EquipInfoPage(props) { function EquipInfoPage(props) {
const [formModalOpen, setFormModalOpen] = useState(false); const [formModalOpen, setFormModalOpen] = useState(false);
const [viewModalOpen, setViewModalOpen] = useState(false); const [viewModalOpen, setViewModalOpen] = useState(false);
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const { equipInfo } = props;
const { equipInfoList: dataSource, equipInfoTotal: total, equipInfoLoading: loading } = equipInfo || {};
const { tableProps, getData } = useTable(safeListRequest(props.equipInfoList), { form: searchForm }); const handleSearch = () => {
props.equipInfoList({
...router.query,
});
};
useEffect(() => { useEffect(() => {
getData(); searchForm.setFieldsValue(router.query);
handleSearch();
}, []); }, []);
const onDelete = (id) => { const onDelete = (id) => {
@ -36,26 +42,26 @@ function EquipInfoPage(props) {
const res = await props.equipInfoRemove({ id }); const res = await props.equipInfoRemove({ id });
if (res?.success !== false) { if (res?.success !== false) {
message.success("删除成功"); message.success("删除成功");
getData(); handleSearch();
} }
}, },
}); });
}; };
const onToggleStatus = (id, record) => { const onToggleStatus = (id, record) => {
const enabled = isEquipEnabled(record); const enabled = record.enableFlag === 1;
Modal.confirm({ Modal.confirm({
title: "提示", title: "提示",
content: enabled ? "是否停用" : "是否启用", content: enabled ? "是否停用" : "是否启用",
okText: "是", okText: "是",
cancelText: "否", cancelText: "否",
onOk: async () => { onOk: async () => {
const res = await props.equipInfoToggleStatus({ id }); const nextFlag = enabled ? 2 : 1;
const res = await props.equipInfoToggleStatus({ id, enableFlag: nextFlag });
if (res?.success !== false) { if (res?.success !== false) {
message.success("操作成功"); message.success("操作成功");
await getData(); handleSearch();
} } else {
else {
message.error(res?.message || "操作失败"); message.error(res?.message || "操作失败");
} }
}, },
@ -63,98 +69,110 @@ function EquipInfoPage(props) {
}; };
return ( return (
<PageLayout <PageLayout title="装备信息管理">
title={ <SearchForm
<div> style={{ marginBottom: 24 }}
<span>装备信息管理</span>
<div className="pageLayout-extra">
实现对评价机构内装备信息的维护管理
</div>
</div>
}
>
<Search
form={searchForm} form={searchForm}
options={[ loading={loading}
{ name: "likeDeviceName", label: "设备名称", placeholder: "请输入设备名称" }, formLine={[
{ name: "instrumentType", label: "仪器类型" }, <Form.Item key="likeDeviceName" name="likeDeviceName">
{ name: "deviceType", label: "设备类型" }, <ControlWrapper.Input label="设备名称" placeholder="请输入" allowClear />
{ </Form.Item>,
name: "enableStatus", <Form.Item key="instrumentType" name="instrumentType">
label: "设备状态", <ControlWrapper.Input label="仪器类型" placeholder="请输入" allowClear />
render: FORM_ITEM_RENDER_ENUM.SELECT, </Form.Item>,
options: [{ label: "启用", value: 1 }, { label: "禁用", value: 0 }], <Form.Item key="deviceType" name="deviceType">
}, <ControlWrapper.Input label="设备类型" placeholder="请输入" allowClear />
</Form.Item>,
<Form.Item key="enableFlag" name="enableFlag">
<ControlWrapper.Select label="设备状态" placeholder="请选择" allowClear style={{ width: "100%" }}>
<Select.Option value={1}>启用</Select.Option>
<Select.Option value={2}>禁用</Select.Option>
</ControlWrapper.Select>
</Form.Item>,
]} ]}
onFinish={getData} onReset={() => {
router.query = { ...router.query, current: 1, size: 10 };
handleSearch();
}}
onFinish={() => {
router.query = { ...router.query, current: 1, size: 10 };
handleSearch();
}}
/> />
<Table <Table
{...tableProps} rowKey="id"
toolBarRender={() => (
<Button
type="primary"
icon={<AddIcon />}
onClick={() => {
setCurrentId("");
setFormModalOpen(true);
}}
>
新增装备
</Button>
)}
columns={[ columns={[
{ title: "设备名称", dataIndex: "deviceName" }, { title: "设备名称", dataIndex: "deviceName", width: 200, ellipsis: true },
{ title: "设备型号", dataIndex: "model" }, { title: "设备型号", dataIndex: "deviceModel" },
{ title: "仪器类型", dataIndex: "instrumentType" }, { title: "仪器类型", dataIndex: "instrumentType" },
{ title: "设备类型", dataIndex: "deviceType" }, { title: "设备类型", dataIndex: "deviceType" },
{ title: "厂家", dataIndex: "manufacturer" }, { title: "厂家", dataIndex: "manufacturer", ellipsis: true, width: 180 },
{ title: "校准单位", dataIndex: "calibrationUnit" }, { title: "校准单位", dataIndex: "calibrationUnit" },
{ title: "校准初值", dataIndex: "calibrationInitialValue" }, { title: "校准初值", dataIndex: "calibrationInitValue", width: 100, },
{ {
title: "设备状态", title: "设备状态",
width: 90, width: 90,
render: (_, record) => (isEquipEnabled(record) ? "启用" : "禁用"), render: (_, record) => {
const enabled = record.enableFlag === 1;
return <Tag color={enabled ? "green" : "red"}>{enabled ? "启用" : "禁用"}</Tag>;
},
}, },
{ {
title: "操作", title: "操作",
width: 260, width: 180,
render: (_, record) => ( render: (_, record) => (
<Space> <TableAction>
<Button type="link" onClick={() => { setCurrentId(record.id); setViewModalOpen(true); }}> <Button type="link" size="small" onClick={() => { setCurrentId(record.id); setViewModalOpen(true); }}>
查看 查看
</Button> </Button>
<Button type="link" onClick={() => { setCurrentId(record.id); setFormModalOpen(true); }}> <Button type="link" size="small" onClick={() => { setCurrentId(record.id); setFormModalOpen(true); }}>
编辑 编辑
</Button> </Button>
<Button type="link" onClick={() => onToggleStatus(record.id, record)}> <Button type="link" size="small" onClick={() => onToggleStatus(record.id, record)}>
{isEquipEnabled(record) ? "禁用" : "启用"} {record.enableFlag === 1 ? "禁用" : "启用"}
</Button> </Button>
<Button danger type="link" onClick={() => onDelete(record.id)}>删除</Button> <Button danger type="link" size="small" onClick={() => onDelete(record.id)}>删除</Button>
</Space> </TableAction>
), ),
}, },
]} ]}
dataSource={dataSource}
scroll={{ y: props.scrollY }}
loading={loading}
pagination={{
total,
showSizeChanger: true,
showQuickJumper: true,
showTotal: (t) => `${t}`,
current: router.query.current || 1,
pageSize: router.query.size || 10,
onChange: (page, pageSize) => {
router.query = { ...router.query, current: page, size: pageSize };
handleSearch();
},
}}
/> />
{formModalOpen && ( {formModalOpen && (
<EquipFormModal <EquipFormModal
open={formModalOpen} open={formModalOpen}
currentId={currentId} currentId={currentId}
requestAdd={props.equipInfoAdd} equipInfoGet={props.equipInfoGet}
requestEdit={props.equipInfoEdit} equipInfoAdd={props.equipInfoAdd}
requestDetails={props.equipInfoGet} equipInfoEdit={props.equipInfoEdit}
onCancel={() => { onCancel={() => {
setFormModalOpen(false); setFormModalOpen(false);
setCurrentId(""); setCurrentId("");
}} }}
onSuccess={getData} onSuccess={handleSearch}
/> />
)} )}
{viewModalOpen && ( {viewModalOpen && (
<EquipViewModal <EquipViewModal
open={viewModalOpen} open={viewModalOpen}
currentId={currentId} currentId={currentId}
requestDetails={props.equipInfoGet} equipInfoGet={props.equipInfoGet}
onCancel={() => { onCancel={() => {
setViewModalOpen(false); setViewModalOpen(false);
setCurrentId(""); setCurrentId("");
@ -166,34 +184,28 @@ function EquipInfoPage(props) {
} }
function EquipFormModal({ function EquipFormModal({
open, currentId, requestAdd, requestEdit, requestDetails, onCancel, onSuccess, open, currentId, equipInfoGet, equipInfoAdd, equipInfoEdit, onCancel, onSuccess,
}) { }) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [submitting, setSubmitting] = useState(false); const [submitting, setSubmitting] = useState(false);
const [detailLoading, setDetailLoading] = useState(false); const [detailLoading, setDetailLoading] = useState(false);
useEffect(() => { useEffect(() => {
if (!open) { if (!open) return;
return;
}
if (!currentId) { if (!currentId) {
form.resetFields(); form.resetFields();
return; return;
} }
let cancelled = false; let cancelled = false;
setDetailLoading(true); setDetailLoading(true);
safeRequest(requestDetails, { id: currentId }).then((res) => { equipInfoGet({ id: currentId }).then((res) => {
if (!cancelled && res?.data) { if (cancelled) return;
form.setFieldsValue(res.data); const data = res?.data || {};
} form.setFieldsValue(data);
}).finally(() => { }).finally(() => {
if (!cancelled) { if (!cancelled) setDetailLoading(false);
setDetailLoading(false);
}
}); });
return () => { return () => { cancelled = true; };
cancelled = true;
};
}, [open, currentId]); }, [open, currentId]);
const handleCancel = () => { const handleCancel = () => {
@ -204,21 +216,16 @@ function EquipFormModal({
const handleSubmit = async (values) => { const handleSubmit = async (values) => {
try { try {
setSubmitting(true); setSubmitting(true);
const request = currentId ? requestEdit : requestAdd; if (currentId) values.id = currentId;
if (currentId) { const res = await (currentId ? equipInfoEdit(values) : equipInfoAdd(values));
values.id = currentId;
}
const res = await request(values);
if (res?.success !== false) { if (res?.success !== false) {
message.success(currentId ? "编辑成功" : "添加成功"); message.success(currentId ? "编辑成功" : "添加成功");
handleCancel(); handleCancel();
onSuccess(); onSuccess();
} } else {
else {
message.error(res?.message || "操作失败"); message.error(res?.message || "操作失败");
} }
} } finally {
finally {
setSubmitting(false); setSubmitting(false);
} }
}; };
@ -226,7 +233,7 @@ function EquipFormModal({
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title={currentId ? "编辑设备" : "添加设备"} title={currentId ? "编辑设备" : "添加设备"}
width={900} width={900}
loading={detailLoading} loading={detailLoading}
@ -237,7 +244,17 @@ function EquipFormModal({
<Form form={form} layout="vertical" onFinish={handleSubmit}> <Form form={form} layout="vertical" onFinish={handleSubmit}>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="instrumentCategory" label="仪器分类" rules={[{ required: true, message: "请选择仪器分类" }]}> <Form.Item name="deviceName" label="设备名称" rules={[{ required: true, message: "请输入设备名称" }]}>
<Input placeholder="请输入设备名称" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="deviceModel" label="型号" rules={[{ required: true, message: "请输入型号" }]}>
<Input placeholder="请输入型号" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="instrumentType" label="仪器分类" rules={[{ required: true, message: "请选择仪器分类" }]}>
<Input placeholder="请输入仪器分类" /> <Input placeholder="请输入仪器分类" />
</Form.Item> </Form.Item>
</Col> </Col>
@ -247,13 +264,8 @@ function EquipFormModal({
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="deviceName" label="设备名称" rules={[{ required: true, message: "请输入设备名称" }]}> <Form.Item name="manufacturer" label="厂家" rules={[{ required: true, message: "请输入厂家" }]}>
<Input placeholder="请输入设备名称" /> <Input placeholder="请输入厂家" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="model" label="型号" rules={[{ required: true, message: "请输入型号" }]}>
<Input placeholder="请输入型号" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
@ -261,11 +273,6 @@ function EquipFormModal({
<Input placeholder="请输入设备流量说明" /> <Input placeholder="请输入设备流量说明" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}>
<Form.Item name="manufacturer" label="厂家" rules={[{ required: true, message: "请输入厂家" }]}>
<Input placeholder="请输入厂家" />
</Form.Item>
</Col>
<Col span={12}> <Col span={12}>
<Form.Item name="minFlow" label="最小流量" rules={[positiveNumberRule("最小流量", false)]}> <Form.Item name="minFlow" label="最小流量" rules={[positiveNumberRule("最小流量", false)]}>
<InputNumber style={{ width: "100%" }} placeholder="请输入最小流量" /> <InputNumber style={{ width: "100%" }} placeholder="请输入最小流量" />
@ -282,17 +289,17 @@ function EquipFormModal({
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="calibrationInitialValue" label="校准初始值" rules={[positiveNumberRule("校准初始值", false)]}> <Form.Item name="calibrationInitValue" label="校准初始值" rules={[positiveNumberRule("校准初始值", false)]}>
<InputNumber style={{ width: "100%" }} placeholder="请输入校准初始值" /> <InputNumber style={{ width: "100%" }} placeholder="请输入校准初始值" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="onSiteCalibrationType" label="现场校验类型"> <Form.Item name="fieldCalibrationType" label="现场校验类型">
<Input placeholder="请输入现场校验类型" /> <Input placeholder="请输入现场校验类型" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="isDualChannel" label="是否双路"> <Form.Item name="dualChannelFlag" label="是否双路">
<Select <Select
allowClear allowClear
placeholder="请选择" placeholder="请选择"
@ -306,7 +313,7 @@ function EquipFormModal({
); );
} }
function EquipViewModal({ open, currentId, requestDetails, onCancel }) { function EquipViewModal({ open, currentId, equipInfoGet, onCancel }) {
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});
const [detailLoading, setDetailLoading] = useState(false); const [detailLoading, setDetailLoading] = useState(false);
@ -317,24 +324,18 @@ function EquipViewModal({ open, currentId, requestDetails, onCancel }) {
} }
let cancelled = false; let cancelled = false;
setDetailLoading(true); setDetailLoading(true);
safeRequest(requestDetails, { id: currentId }).then((res) => { equipInfoGet({ id: currentId }).then((res) => {
if (!cancelled) { if (!cancelled) setInfo(res?.data || {});
setInfo(res?.data || {});
}
}).finally(() => { }).finally(() => {
if (!cancelled) { if (!cancelled) setDetailLoading(false);
setDetailLoading(false);
}
}); });
return () => { return () => { cancelled = true; };
cancelled = true;
};
}, [open, currentId]); }, [open, currentId]);
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title="查看设备" title="查看设备"
width={900} width={900}
loading={detailLoading} loading={detailLoading}
@ -343,21 +344,21 @@ function EquipViewModal({ open, currentId, requestDetails, onCancel }) {
onCancel={onCancel} onCancel={onCancel}
> >
<Descriptions bordered column={2} labelStyle={{ width: 120 }}> <Descriptions bordered column={2} labelStyle={{ width: 120 }}>
<Descriptions.Item label="仪器分类">{info.instrumentCategory || info.instrumentType}</Descriptions.Item>
<Descriptions.Item label="设备类型">{info.deviceType}</Descriptions.Item>
<Descriptions.Item label="设备名称">{info.deviceName}</Descriptions.Item> <Descriptions.Item label="设备名称">{info.deviceName}</Descriptions.Item>
<Descriptions.Item label="型号">{info.model}</Descriptions.Item> <Descriptions.Item label="设备型号">{info.deviceModel}</Descriptions.Item>
<Descriptions.Item label="设备流量说明" span={2}>{info.flowDesc}</Descriptions.Item> <Descriptions.Item label="仪器分类">{info.instrumentType}</Descriptions.Item>
<Descriptions.Item label="设备类型">{info.deviceType}</Descriptions.Item>
<Descriptions.Item label="厂家">{info.manufacturer}</Descriptions.Item> <Descriptions.Item label="厂家">{info.manufacturer}</Descriptions.Item>
<Descriptions.Item label="现场校验类型">{info.onSiteCalibrationType}</Descriptions.Item> <Descriptions.Item label="设备流量说明" span={2}>{info.flowDesc}</Descriptions.Item>
<Descriptions.Item label="最小流量">{info.minFlow}</Descriptions.Item> <Descriptions.Item label="最小流量">{info.minFlow}</Descriptions.Item>
<Descriptions.Item label="最大流量">{info.maxFlow}</Descriptions.Item> <Descriptions.Item label="最大流量">{info.maxFlow}</Descriptions.Item>
<Descriptions.Item label="校准单位">{info.calibrationUnit}</Descriptions.Item> <Descriptions.Item label="校准单位">{info.calibrationUnit}</Descriptions.Item>
<Descriptions.Item label="校准初始值">{info.calibrationInitialValue}</Descriptions.Item> <Descriptions.Item label="校准初始值">{info.calibrationInitValue}</Descriptions.Item>
<Descriptions.Item label="是否双路">{DUAL_CHANNEL[info.isDualChannel] ?? "-"}</Descriptions.Item> <Descriptions.Item label="现场校验类型">{info.fieldCalibrationType}</Descriptions.Item>
<Descriptions.Item label="是否双路">{DUAL_CHANNEL_MAP[info.dualChannelFlag] ?? "-"}</Descriptions.Item>
</Descriptions> </Descriptions>
</Modal> </Modal>
); );
} }
export default Connect([NS_EQUIP_INFO], true)(EquipInfoPage); export default Connect([NS_EQUIP_INFO], true)(AntdTableFuncControl(EquipInfoPage));

View File

@ -228,7 +228,7 @@ function PersonnelChangePage(props) {
<Modal <Modal
open={auditModalOpen} open={auditModalOpen}
destroyOnClose destroyOnHidden
title="审核离职申请" title="审核离职申请"
width={720} width={720}
footer={( footer={(
@ -254,7 +254,7 @@ function PersonnelChangePage(props) {
<Modal <Modal
open={viewResignOpen} open={viewResignOpen}
destroyOnClose destroyOnHidden
title="查看离职申请" title="查看离职申请"
width={720} width={720}
cancelText="返回" cancelText="返回"

View File

@ -224,7 +224,7 @@ function CertModal({
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title={currentId ? "编辑证书" : "添加证书"} title={currentId ? "编辑证书" : "添加证书"}
width={800} width={800}
loading={detailLoading} loading={detailLoading}
@ -317,7 +317,7 @@ function ViewModal({ open, currentId, requestDetails, onCancel }) {
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title="证书详情" title="证书详情"
width={800} width={800}
loading={detailLoading} loading={detailLoading}

View File

@ -356,7 +356,7 @@ function StaffFormModal({
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title={currentId ? "编辑人员" : "添加人员"} title={currentId ? "编辑人员" : "添加人员"}
width={900} width={900}
loading={detailLoading} loading={detailLoading}

View File

@ -91,7 +91,7 @@ export default function StaffViewModal({
<> <>
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title="查看" title="查看"
width={900} width={900}
loading={detailLoading} loading={detailLoading}
@ -191,7 +191,7 @@ export default function StaffViewModal({
<Modal <Modal
open={!!certPreview} open={!!certPreview}
destroyOnClose destroyOnHidden
title="证书预览" title="证书预览"
width={720} width={720}
loading={certPreviewLoading} loading={certPreviewLoading}

View File

@ -382,7 +382,7 @@ function CertFormModal({
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
maskClosable={false} maskClosable={false}
title={currentId ? "编辑证书" : "添加证书"} title={currentId ? "编辑证书" : "添加证书"}
width={800} width={800}
@ -505,7 +505,7 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
maskClosable={false} maskClosable={false}
title="证书详情" title="证书详情"
width={800} width={800}

View File

@ -178,7 +178,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title="添加离职申请" title="添加离职申请"
width={720} width={720}
confirmLoading={submitting} confirmLoading={submitting}
@ -279,7 +279,7 @@ function ViewModal({ open, currentId, requestDetails, onCancel }) {
return ( return (
<Modal <Modal
open={open} open={open}
destroyOnClose destroyOnHidden
title="查看离职申请" title="查看离职申请"
width={720} width={720}
loading={detailLoading} loading={detailLoading}

View File

@ -39,7 +39,7 @@ export default function ChangeHistoryModal({ open, originFilingId, onCancel }) {
open={open} open={open}
title="备案变更记录" title="备案变更记录"
width={560} width={560}
destroyOnClose destroyOnHidden
cancelText="关闭" cancelText="关闭"
okButtonProps={{ style: { display: "none" } }} okButtonProps={{ style: { display: "none" } }}
onCancel={onCancel} onCancel={onCancel}

View File

@ -58,7 +58,7 @@ function OrgEquipmentSelectModalInner(props) {
open={open} open={open}
title="添加备案装备" title="添加备案装备"
width={800} width={800}
destroyOnClose destroyOnHidden
onCancel={onCancel} onCancel={onCancel}
onOk={handleOk} onOk={handleOk}
okText="确认添加" okText="确认添加"

View File

@ -61,7 +61,7 @@ function OrgPersonnelSelectModalInner(props) {
open={open} open={open}
title="添加备案人员" title="添加备案人员"
width={800} width={800}
destroyOnClose destroyOnHidden
onCancel={onCancel} onCancel={onCancel}
onOk={handleOk} onOk={handleOk}
okText="确认添加" okText="确认添加"

View File

@ -15,7 +15,7 @@ export default function PrerequisiteVerifyModal({
open={open} open={open}
title="资质申请前置条件核验结果" title="资质申请前置条件核验结果"
width={560} width={560}
destroyOnClose destroyOnHidden
onCancel={onCancel} onCancel={onCancel}
onOk={allPassed ? onConfirm : undefined} onOk={allPassed ? onConfirm : undefined}
okText="确定" okText="确定"

View File

@ -108,7 +108,7 @@ function EnterprisePortraitPage() {
<Modal <Modal
open={viewOpen} open={viewOpen}
destroyOnClose destroyOnHidden
title="企业安全能力画像" title="企业安全能力画像"
width={800} width={800}
loading={detailLoading} loading={detailLoading}

View File

@ -122,7 +122,7 @@ function EvaluatorInfoPage() {
<Modal <Modal
open={viewOpen} open={viewOpen}
destroyOnClose destroyOnHidden
title="评价师详细信息" title="评价师详细信息"
width={900} width={900}
loading={detailLoading} loading={detailLoading}
@ -188,7 +188,7 @@ function EvaluatorInfoPage() {
<Modal <Modal
open={!!certPreview} open={!!certPreview}
destroyOnClose destroyOnHidden
title="证书预览" title="证书预览"
width={520} width={520}
cancelText="关闭" cancelText="关闭"

View File

@ -231,7 +231,7 @@ function OrgAccountPage(props) {
<Modal <Modal
open={viewOpen} open={viewOpen}
destroyOnClose destroyOnHidden
title="机构信息查看" title="机构信息查看"
width={760} width={760}
loading={detailLoading} loading={detailLoading}
@ -259,7 +259,7 @@ function OrgAccountPage(props) {
<Modal <Modal
open={editOpen} open={editOpen}
destroyOnClose destroyOnHidden
title="编辑机构信息" title="编辑机构信息"
width={760} width={760}
confirmLoading={editLoading} confirmLoading={editLoading}