排班登记管理、事件接报、案例库、危险货物库、危化品库、生成工艺库
parent
195fff66a1
commit
7b5d968b2a
|
|
@ -31,7 +31,7 @@
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"zy-react-library": "^1.2.28"
|
"zy-react-library": "^1.2.30"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
18
router.md
18
router.md
|
|
@ -64,9 +64,27 @@
|
||||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyRescueTeam/list`
|
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyRescueTeam/list`
|
||||||
- 预案与演练/企业预案管理
|
- 预案与演练/企业预案管理
|
||||||
`/emergencyRescue/container/enterprise/planAndDrill/enterprisePlan/list`
|
`/emergencyRescue/container/enterprise/planAndDrill/enterprisePlan/list`
|
||||||
|
- 预案与演练/企业预案申请记录
|
||||||
|
`/emergencyRescue/container/enterprise/planAndDrill/enterprisePlanApplyRecords/list`
|
||||||
|
- 预案与演练/企业预案审核
|
||||||
|
`/emergencyRescue/container/enterprise/planAndDrill/enterprisePlanAudit/list`
|
||||||
|
- 预案与演练/企业预案审核记录
|
||||||
|
`/emergencyRescue/container/enterprise/planAndDrill/enterprisePlanAuditRecords/list`
|
||||||
- 预案与演练/应急预案管理
|
- 预案与演练/应急预案管理
|
||||||
`/emergencyRescue/container/enterprise/planAndDrill/emergencyPlan/list`
|
`/emergencyRescue/container/enterprise/planAndDrill/emergencyPlan/list`
|
||||||
- 预案与演练/应急演练管理
|
- 预案与演练/应急演练管理
|
||||||
`/emergencyRescue/container/enterprise/planAndDrill/emergencyExercise/list`
|
`/emergencyRescue/container/enterprise/planAndDrill/emergencyExercise/list`
|
||||||
- 应急救援/值班管理/值班日志
|
- 应急救援/值班管理/值班日志
|
||||||
`/emergencyRescue/container/enterprise/emergencyRescue/duty/dutyLog/list`
|
`/emergencyRescue/container/enterprise/emergencyRescue/duty/dutyLog/list`
|
||||||
|
- 应急救援/值班管理/排班登记管理
|
||||||
|
`/emergencyRescue/container/enterprise/emergencyRescue/duty/schedulingRegistration/list`
|
||||||
|
- 应急救援/应急接报/事件接报
|
||||||
|
`/emergencyRescue/container/enterprise/emergencyRescue/emergencyReporting/eventReport/list`
|
||||||
|
- 应急救援/应急知识库/案例库
|
||||||
|
`/emergencyRescue/container/enterprise/emergencyRescue/emergencyKnowledgeLibrary/case/list`
|
||||||
|
- 应急救援/应急知识库/危险货物库
|
||||||
|
`/emergencyRescue/container/enterprise/emergencyRescue/emergencyKnowledgeLibrary/hazardousGoods/list`
|
||||||
|
- 应急救援/应急知识库/危化品库
|
||||||
|
`/emergencyRescue/container/enterprise/emergencyRescue/emergencyKnowledgeLibrary/hazardousChemicals/list`
|
||||||
|
- 应急救援/应急知识库/生成工艺库
|
||||||
|
`/emergencyRescue/container/enterprise/emergencyRescue/emergencyKnowledgeLibrary/generationProcess/list`
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
|
export const emergencyKnowledgeLibraryList = declareRequest(
|
||||||
|
"emergencyKnowledgeLibraryLoading",
|
||||||
|
"Post > @/emergencyRescue/emergencyCaseLibrary/list",
|
||||||
|
);
|
||||||
|
export const emergencyKnowledgeLibraryInfo = declareRequest(
|
||||||
|
"emergencyKnowledgeLibraryLoading",
|
||||||
|
"Get > /emergencyRescue/emergencyCaseLibrary/{id}",
|
||||||
|
);
|
||||||
|
export const emergencyKnowledgeLibraryAdd = declareRequest(
|
||||||
|
"emergencyKnowledgeLibraryLoading",
|
||||||
|
"Post > @/emergencyRescue/emergencyCaseLibrary/save",
|
||||||
|
);
|
||||||
|
export const emergencyKnowledgeLibraryUpdate = declareRequest(
|
||||||
|
"emergencyKnowledgeLibraryLoading",
|
||||||
|
"Put > @/emergencyRescue/emergencyCaseLibrary/edit",
|
||||||
|
);
|
||||||
|
export const emergencyKnowledgeLibraryDelete = declareRequest(
|
||||||
|
"emergencyKnowledgeLibraryLoading",
|
||||||
|
"Delete > @/emergencyRescue/emergencyCaseLibrary/{id}",
|
||||||
|
);
|
||||||
|
export const emergencyKnowledgeLibraryDeleteBatch = declareRequest(
|
||||||
|
"emergencyKnowledgeLibraryLoading",
|
||||||
|
"Delete > @/emergencyRescue/emergencyCaseLibrary/ids?ids={ids}",
|
||||||
|
);
|
||||||
|
|
@ -20,6 +20,14 @@ export const enterprisePlanBasicInfoDelete = declareRequest(
|
||||||
"enterprisePlanBasicInfoLoading",
|
"enterprisePlanBasicInfoLoading",
|
||||||
"Delete > @/emergencyRescue/enterprisePlanBasicInfo/{id}",
|
"Delete > @/emergencyRescue/enterprisePlanBasicInfo/{id}",
|
||||||
);
|
);
|
||||||
|
export const enterprisePlanBasicInfoConfigureApprover = declareRequest(
|
||||||
|
"enterprisePlanBasicInfoLoading",
|
||||||
|
"Put > @/emergencyRescue/enterprisePlanBasicInfo/configureApprover",
|
||||||
|
);
|
||||||
|
export const enterprisePlanBasicInfoAudit = declareRequest(
|
||||||
|
"enterprisePlanBasicInfoLoading",
|
||||||
|
"Put > @/emergencyRescue/enterprisePlanBasicInfo/audit",
|
||||||
|
);
|
||||||
export const enterprisePlanLevelResponseList = declareRequest(
|
export const enterprisePlanLevelResponseList = declareRequest(
|
||||||
"enterprisePlanLevelResponseLoading",
|
"enterprisePlanLevelResponseLoading",
|
||||||
"Post > @/emergencyRescue/enterprisePlanLevelResponse/list",
|
"Post > @/emergencyRescue/enterprisePlanLevelResponse/list",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
|
export const eventReportList = declareRequest(
|
||||||
|
"eventReportLoading",
|
||||||
|
"Post > @/emergencyRescue/eventReport/list",
|
||||||
|
);
|
||||||
|
export const eventReportAdd = declareRequest(
|
||||||
|
"eventReportLoading",
|
||||||
|
"Post > @/emergencyRescue/eventReport/save",
|
||||||
|
);
|
||||||
|
export const eventReportInfo = declareRequest(
|
||||||
|
"eventReportLoading",
|
||||||
|
"Get > /emergencyRescue/eventReport/{id}",
|
||||||
|
);
|
||||||
|
export const eventReportRescue = declareRequest(
|
||||||
|
"eventReportLoading",
|
||||||
|
"Post > @/emergencyRescue/eventReport/triggerRescue",
|
||||||
|
);
|
||||||
|
export const eventReportSpecialReportSave = declareRequest(
|
||||||
|
"eventReportSpecialReportLoading",
|
||||||
|
"Post > @/emergencyRescue/eventReportSpecial/save",
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
|
export const schedulingRegistrationListAll = declareRequest(
|
||||||
|
"schedulingRegistrationLoading",
|
||||||
|
"Get > /emergencyRescue/shiftSchedule/listAll",
|
||||||
|
);
|
||||||
|
export const schedulingRegistrationInfo = declareRequest(
|
||||||
|
"schedulingRegistrationLoading",
|
||||||
|
"Get > /emergencyRescue/shiftSchedule/{id}",
|
||||||
|
);
|
||||||
|
export const schedulingRegistrationUpdate = declareRequest(
|
||||||
|
"schedulingRegistrationLoading",
|
||||||
|
"Put > @/emergencyRescue/shiftSchedule/edit",
|
||||||
|
);
|
||||||
|
|
@ -27,3 +27,6 @@ export const NS_ENTERPRISE_PLAN = defineNamespace("enterprisePlan");
|
||||||
export const NS_EMERGENCY_PLAN = defineNamespace("emergencyPlan");
|
export const NS_EMERGENCY_PLAN = defineNamespace("emergencyPlan");
|
||||||
export const NS_EMERGENCY_EXERCISE = defineNamespace("emergencyExercise");
|
export const NS_EMERGENCY_EXERCISE = defineNamespace("emergencyExercise");
|
||||||
export const NS_DUTY_LOG = defineNamespace("dutyLog");
|
export const NS_DUTY_LOG = defineNamespace("dutyLog");
|
||||||
|
export const NS_EVENT_REPORT = defineNamespace("eventReport");
|
||||||
|
export const NS_EMERGENCY_KNOWLEDGE_LIBRARY = defineNamespace("emergencyKnowledgeLibrary");
|
||||||
|
export const NS_SCHEDULING_REGISTRATION = defineNamespace("schedulingRegistration");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Space } from "antd";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { useState } from "react";
|
||||||
|
import ImportIcon from "zy-react-library/components/Icon/ImportIcon";
|
||||||
|
import ImportFile from "zy-react-library/components/ImportFile";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import useImportFile from "zy-react-library/hooks/useImportFile";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { NS_SCHEDULING_REGISTRATION } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
const [importVisible, setImportVisible] = useState(false);
|
||||||
|
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
const { loading: importLoading, importFile } = useImportFile();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["schedulingRegistrationListAll"], {
|
||||||
|
form,
|
||||||
|
usePagination: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
values={{
|
||||||
|
likeShiftScheduleDate: dayjs().format("YYYY-MM"),
|
||||||
|
}}
|
||||||
|
options={[
|
||||||
|
{ name: "likeShiftScheduleDate", label: "月份", render: FORM_ITEM_RENDER_ENUM.DATE_MONTH },
|
||||||
|
]}
|
||||||
|
labelCol={{ span: 4 }}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={(<ImportIcon />)}
|
||||||
|
onClick={() => {
|
||||||
|
setImportVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
导入
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: "值班日期",
|
||||||
|
dataIndex: "shiftScheduleDate",
|
||||||
|
render: (_, record) => dayjs(record.shiftScheduleDate).format("MM月DD日"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "早班(08:00-20:00)",
|
||||||
|
children: [
|
||||||
|
{ title: "值班领导", dataIndex: "morningShiftScheduleLeaderName" },
|
||||||
|
{ title: "值班员", dataIndex: "morningShiftSchedulePersonnelName" },
|
||||||
|
{ title: "应急指挥人", dataIndex: "morningShiftScheduleCommanderName" },
|
||||||
|
{ title: "值班司机", dataIndex: "morningShiftScheduleDriverName" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "晚班(20:00-08:00)",
|
||||||
|
children: [
|
||||||
|
{ title: "值班领导", dataIndex: "nightShiftScheduleLeaderName" },
|
||||||
|
{ title: "值班员", dataIndex: "nightShiftSchedulePersonnelName" },
|
||||||
|
{ title: "应急指挥人", dataIndex: "nightShiftScheduleCommanderName" },
|
||||||
|
{ title: "值班司机", dataIndex: "nightShiftScheduleDriverName" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{ title: "备注", dataIndex: "remarks" },
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
loading={tableProps.loading || importLoading}
|
||||||
|
/>
|
||||||
|
<ImportFile
|
||||||
|
templateUrl="template/emergency_duty.xlsx"
|
||||||
|
visible={importVisible}
|
||||||
|
onCancel={() => setImportVisible(false)}
|
||||||
|
onConfirm={async (values) => {
|
||||||
|
const { success } = await importFile("/emergencyRescue/shiftSchedule/importShiftSchedule", { files: values.file });
|
||||||
|
if (success) {
|
||||||
|
message.success("导入成功");
|
||||||
|
setImportVisible(false);
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_SCHEDULING_REGISTRATION], true)(List);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function SchedulingRegistration(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SchedulingRegistration;
|
||||||
|
|
@ -0,0 +1,279 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Modal, Space } from "antd";
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
|
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import Upload from "zy-react-library/components/Upload";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
|
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||||
|
import useDownloadFile from "zy-react-library/hooks/useDownloadFile";
|
||||||
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
|
import { NS_EMERGENCY_KNOWLEDGE_LIBRARY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
|
||||||
|
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||||
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||||
|
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
|
form,
|
||||||
|
params: { likeEmergencyCaseType: 1 },
|
||||||
|
});
|
||||||
|
|
||||||
|
const onDelete = (record) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: `确定要删除【${record.title}】吗`,
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDelete"]({ id: record.id });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const onDeleteBatch = () => {
|
||||||
|
if (selectedRowKeys.length === 0) {
|
||||||
|
message.warning("请选择要删除的记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: "确认要删除吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDeleteBatch"]({ ids: selectedRowKeys });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "标题" },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
rowSelection={{
|
||||||
|
preserveSelectedRowKeys: true,
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: (selectedRowKeys) => {
|
||||||
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={(<AddIcon />)}
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
danger
|
||||||
|
ghost
|
||||||
|
icon={(<DeleteIcon />)}
|
||||||
|
onClick={onDeleteBatch}
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
columns={[
|
||||||
|
{ title: "标题", dataIndex: "title" },
|
||||||
|
{ title: "事故级别", dataIndex: "accidentLevelName" },
|
||||||
|
{ title: "内容", dataIndex: "content" },
|
||||||
|
{
|
||||||
|
title: "相关附件",
|
||||||
|
dataIndex: "fileId",
|
||||||
|
width: 100,
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={async () => {
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[706], eqForeignKey: record.fileId });
|
||||||
|
downloadFile({ url: files[0].url, name: files[0].name });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: 150,
|
||||||
|
fixed: "right",
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
setCurrentId(record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
danger
|
||||||
|
onClick={() => {
|
||||||
|
onDelete(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
loading={tableProps.loading || getFileLoading || downloadFileLoading}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
addModalVisible && (
|
||||||
|
<AddModal
|
||||||
|
id={currentId}
|
||||||
|
onCancel={() => {
|
||||||
|
setAddModalVisible(false);
|
||||||
|
setCurrentId("");
|
||||||
|
}}
|
||||||
|
getData={getData}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddModalComponent = (props) => {
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||||
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
|
|
||||||
|
const fileIdRef = useRef("");
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
if (!props.id)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const { data } = await props["emergencyKnowledgeLibraryInfo"]({ id: props.id });
|
||||||
|
fileIdRef.current = data.fileId;
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[706], eqForeignKey: data.fileId });
|
||||||
|
form.setFieldsValue({
|
||||||
|
...data,
|
||||||
|
files,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
await deleteFile({ single: false, files: values.deleteFiles });
|
||||||
|
const { id: fileId } = await uploadFile({
|
||||||
|
single: false,
|
||||||
|
files: values.files,
|
||||||
|
params: { type: UPLOAD_FILE_TYPE_ENUM[706], foreignKey: fileIdRef.current },
|
||||||
|
});
|
||||||
|
const { success } = await props[!props.id ? "emergencyKnowledgeLibraryAdd" : "emergencyKnowledgeLibraryUpdate"]({
|
||||||
|
...values,
|
||||||
|
fileId,
|
||||||
|
id: props.id,
|
||||||
|
emergencyCaseType: 1,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success(`${!props.id ? "新增" : "编辑"}成功`);
|
||||||
|
props.getData();
|
||||||
|
props.onCancel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
open
|
||||||
|
title={!props.id ? "新增" : "编辑"}
|
||||||
|
maskClosable={false}
|
||||||
|
width={600}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
onOk={form.submit}
|
||||||
|
confirmLoading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
showActionButtons={false}
|
||||||
|
span={24}
|
||||||
|
labelCol={{ span: 8 }}
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "标题" },
|
||||||
|
{
|
||||||
|
name: "accidentLevel",
|
||||||
|
label: "事故级别",
|
||||||
|
required: false,
|
||||||
|
render: (
|
||||||
|
<DictionarySelect
|
||||||
|
dictValue="emergencyKnowledgeLibraryCaseAccidentLevel"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue("accidentLevelName", label);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: "accidentLevelName", label: "事故级别名称", onlyForLabel: true },
|
||||||
|
{ name: "content", label: "内容", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, required: false },
|
||||||
|
{
|
||||||
|
name: "files",
|
||||||
|
label: "相关附件",
|
||||||
|
render: (
|
||||||
|
<Upload
|
||||||
|
maxCount={1}
|
||||||
|
size={20}
|
||||||
|
fileType="document"
|
||||||
|
accept=".pdf,.png,.jpg"
|
||||||
|
onGetRemoveFile={(file) => {
|
||||||
|
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
{ name: "deleteFiles", label: "删除的附件", onlyForLabel: true },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const AddModal = Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(AddModalComponent);
|
||||||
|
export default Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(List);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function Case(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Case;
|
||||||
|
|
@ -0,0 +1,265 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Modal, Space } from "antd";
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
|
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import Upload from "zy-react-library/components/Upload";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
|
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||||
|
import useDownloadFile from "zy-react-library/hooks/useDownloadFile";
|
||||||
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
|
import { NS_EMERGENCY_KNOWLEDGE_LIBRARY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
|
||||||
|
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||||
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||||
|
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
|
form,
|
||||||
|
params: { likeEmergencyCaseType: 4 },
|
||||||
|
});
|
||||||
|
|
||||||
|
const onDelete = (record) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: `确定要删除【${record.title}】吗`,
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDelete"]({ id: record.id });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const onDeleteBatch = () => {
|
||||||
|
if (selectedRowKeys.length === 0) {
|
||||||
|
message.warning("请选择要删除的记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: "确认要删除吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDeleteBatch"]({ ids: selectedRowKeys });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "名称" },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
rowSelection={{
|
||||||
|
preserveSelectedRowKeys: true,
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: (selectedRowKeys) => {
|
||||||
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={(<AddIcon />)}
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
danger
|
||||||
|
ghost
|
||||||
|
icon={(<DeleteIcon />)}
|
||||||
|
onClick={onDeleteBatch}
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
columns={[
|
||||||
|
{ title: "名称", dataIndex: "title" },
|
||||||
|
{ title: "类型", dataIndex: "accidentLevel" },
|
||||||
|
{ title: "内容", dataIndex: "content" },
|
||||||
|
{
|
||||||
|
title: "相关附件",
|
||||||
|
dataIndex: "fileId",
|
||||||
|
width: 100,
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={async () => {
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[709], eqForeignKey: record.fileId });
|
||||||
|
downloadFile({ url: files[0].url, name: files[0].name });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: 150,
|
||||||
|
fixed: "right",
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
setCurrentId(record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
danger
|
||||||
|
onClick={() => {
|
||||||
|
onDelete(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
loading={tableProps.loading || getFileLoading || downloadFileLoading}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
addModalVisible && (
|
||||||
|
<AddModal
|
||||||
|
id={currentId}
|
||||||
|
onCancel={() => {
|
||||||
|
setAddModalVisible(false);
|
||||||
|
setCurrentId("");
|
||||||
|
}}
|
||||||
|
getData={getData}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddModalComponent = (props) => {
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||||
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
|
|
||||||
|
const fileIdRef = useRef("");
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
if (!props.id)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const { data } = await props["emergencyKnowledgeLibraryInfo"]({ id: props.id });
|
||||||
|
fileIdRef.current = data.fileId;
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[709], eqForeignKey: data.fileId });
|
||||||
|
form.setFieldsValue({
|
||||||
|
...data,
|
||||||
|
files,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
await deleteFile({ single: false, files: values.deleteFiles });
|
||||||
|
const { id: fileId } = await uploadFile({
|
||||||
|
single: false,
|
||||||
|
files: values.files,
|
||||||
|
params: { type: UPLOAD_FILE_TYPE_ENUM[709], foreignKey: fileIdRef.current },
|
||||||
|
});
|
||||||
|
const { success } = await props[!props.id ? "emergencyKnowledgeLibraryAdd" : "emergencyKnowledgeLibraryUpdate"]({
|
||||||
|
...values,
|
||||||
|
fileId,
|
||||||
|
id: props.id,
|
||||||
|
emergencyCaseType: 4,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success(`${!props.id ? "新增" : "编辑"}成功`);
|
||||||
|
props.getData();
|
||||||
|
props.onCancel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
open
|
||||||
|
title={!props.id ? "新增" : "编辑"}
|
||||||
|
maskClosable={false}
|
||||||
|
width={600}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
onOk={form.submit}
|
||||||
|
confirmLoading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
showActionButtons={false}
|
||||||
|
span={24}
|
||||||
|
labelCol={{ span: 8 }}
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "名称" },
|
||||||
|
{ name: "accidentLevel", label: "类型" },
|
||||||
|
{ name: "content", label: "内容", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, required: false },
|
||||||
|
{
|
||||||
|
name: "files",
|
||||||
|
label: "相关附件",
|
||||||
|
render: (
|
||||||
|
<Upload
|
||||||
|
maxCount={1}
|
||||||
|
size={20}
|
||||||
|
fileType="document"
|
||||||
|
accept=".pdf,.png,.jpg"
|
||||||
|
onGetRemoveFile={(file) => {
|
||||||
|
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
{ name: "deleteFiles", label: "删除的附件", onlyForLabel: true },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const AddModal = Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(AddModalComponent);
|
||||||
|
export default Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(List);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function Case(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Case;
|
||||||
|
|
@ -0,0 +1,265 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Modal, Space } from "antd";
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
|
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import Upload from "zy-react-library/components/Upload";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
|
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||||
|
import useDownloadFile from "zy-react-library/hooks/useDownloadFile";
|
||||||
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
|
import { NS_EMERGENCY_KNOWLEDGE_LIBRARY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
|
||||||
|
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||||
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||||
|
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
|
form,
|
||||||
|
params: { likeEmergencyCaseType: 3 },
|
||||||
|
});
|
||||||
|
|
||||||
|
const onDelete = (record) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: `确定要删除【${record.title}】吗`,
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDelete"]({ id: record.id });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const onDeleteBatch = () => {
|
||||||
|
if (selectedRowKeys.length === 0) {
|
||||||
|
message.warning("请选择要删除的记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: "确认要删除吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDeleteBatch"]({ ids: selectedRowKeys });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "中文名称" },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
rowSelection={{
|
||||||
|
preserveSelectedRowKeys: true,
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: (selectedRowKeys) => {
|
||||||
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={(<AddIcon />)}
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
danger
|
||||||
|
ghost
|
||||||
|
icon={(<DeleteIcon />)}
|
||||||
|
onClick={onDeleteBatch}
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
columns={[
|
||||||
|
{ title: "中文名称", dataIndex: "title" },
|
||||||
|
{ title: "英文名称", dataIndex: "titleEn" },
|
||||||
|
{ title: "内容", dataIndex: "content" },
|
||||||
|
{
|
||||||
|
title: "相关附件",
|
||||||
|
dataIndex: "fileId",
|
||||||
|
width: 100,
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={async () => {
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[708], eqForeignKey: record.fileId });
|
||||||
|
downloadFile({ url: files[0].url, name: files[0].name });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: 150,
|
||||||
|
fixed: "right",
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
setCurrentId(record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
danger
|
||||||
|
onClick={() => {
|
||||||
|
onDelete(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
loading={tableProps.loading || getFileLoading || downloadFileLoading}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
addModalVisible && (
|
||||||
|
<AddModal
|
||||||
|
id={currentId}
|
||||||
|
onCancel={() => {
|
||||||
|
setAddModalVisible(false);
|
||||||
|
setCurrentId("");
|
||||||
|
}}
|
||||||
|
getData={getData}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddModalComponent = (props) => {
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||||
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
|
|
||||||
|
const fileIdRef = useRef("");
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
if (!props.id)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const { data } = await props["emergencyKnowledgeLibraryInfo"]({ id: props.id });
|
||||||
|
fileIdRef.current = data.fileId;
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[708], eqForeignKey: data.fileId });
|
||||||
|
form.setFieldsValue({
|
||||||
|
...data,
|
||||||
|
files,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
await deleteFile({ single: false, files: values.deleteFiles });
|
||||||
|
const { id: fileId } = await uploadFile({
|
||||||
|
single: false,
|
||||||
|
files: values.files,
|
||||||
|
params: { type: UPLOAD_FILE_TYPE_ENUM[708], foreignKey: fileIdRef.current },
|
||||||
|
});
|
||||||
|
const { success } = await props[!props.id ? "emergencyKnowledgeLibraryAdd" : "emergencyKnowledgeLibraryUpdate"]({
|
||||||
|
...values,
|
||||||
|
fileId,
|
||||||
|
id: props.id,
|
||||||
|
emergencyCaseType: 3,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success(`${!props.id ? "新增" : "编辑"}成功`);
|
||||||
|
props.getData();
|
||||||
|
props.onCancel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
open
|
||||||
|
title={!props.id ? "新增" : "编辑"}
|
||||||
|
maskClosable={false}
|
||||||
|
width={600}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
onOk={form.submit}
|
||||||
|
confirmLoading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
showActionButtons={false}
|
||||||
|
span={24}
|
||||||
|
labelCol={{ span: 8 }}
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "中文名称" },
|
||||||
|
{ name: "titleEn", label: "英文名称" },
|
||||||
|
{ name: "content", label: "内容", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, required: false },
|
||||||
|
{
|
||||||
|
name: "files",
|
||||||
|
label: "相关附件",
|
||||||
|
render: (
|
||||||
|
<Upload
|
||||||
|
maxCount={1}
|
||||||
|
size={20}
|
||||||
|
fileType="document"
|
||||||
|
accept=".pdf,.png,.jpg"
|
||||||
|
onGetRemoveFile={(file) => {
|
||||||
|
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
{ name: "deleteFiles", label: "删除的附件", onlyForLabel: true },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const AddModal = Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(AddModalComponent);
|
||||||
|
export default Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(List);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function HazardousGoods(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default HazardousGoods;
|
||||||
|
|
@ -0,0 +1,263 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Modal, Space } from "antd";
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
|
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import Upload from "zy-react-library/components/Upload";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
|
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||||
|
import useDownloadFile from "zy-react-library/hooks/useDownloadFile";
|
||||||
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
|
import { NS_EMERGENCY_KNOWLEDGE_LIBRARY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
|
||||||
|
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||||
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||||
|
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
|
form,
|
||||||
|
params: { likeEmergencyCaseType: 2 },
|
||||||
|
});
|
||||||
|
|
||||||
|
const onDelete = (record) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: `确定要删除【${record.title}】吗`,
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDelete"]({ id: record.id });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const onDeleteBatch = () => {
|
||||||
|
if (selectedRowKeys.length === 0) {
|
||||||
|
message.warning("请选择要删除的记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除确认",
|
||||||
|
content: "确认要删除吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["emergencyKnowledgeLibraryDeleteBatch"]({ ids: selectedRowKeys });
|
||||||
|
if (success) {
|
||||||
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "物品名称" },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
rowSelection={{
|
||||||
|
preserveSelectedRowKeys: true,
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: (selectedRowKeys) => {
|
||||||
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={(<AddIcon />)}
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
danger
|
||||||
|
ghost
|
||||||
|
icon={(<DeleteIcon />)}
|
||||||
|
onClick={onDeleteBatch}
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
columns={[
|
||||||
|
{ title: "物品名称", dataIndex: "title" },
|
||||||
|
{ title: "内容", dataIndex: "content" },
|
||||||
|
{
|
||||||
|
title: "相关附件",
|
||||||
|
dataIndex: "fileId",
|
||||||
|
width: 100,
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={async () => {
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[707], eqForeignKey: record.fileId });
|
||||||
|
downloadFile({ url: files[0].url, name: files[0].name });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: 150,
|
||||||
|
fixed: "right",
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setAddModalVisible(true);
|
||||||
|
setCurrentId(record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
danger
|
||||||
|
onClick={() => {
|
||||||
|
onDelete(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
loading={tableProps.loading || getFileLoading || downloadFileLoading}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
addModalVisible && (
|
||||||
|
<AddModal
|
||||||
|
id={currentId}
|
||||||
|
onCancel={() => {
|
||||||
|
setAddModalVisible(false);
|
||||||
|
setCurrentId("");
|
||||||
|
}}
|
||||||
|
getData={getData}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddModalComponent = (props) => {
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||||
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
|
|
||||||
|
const fileIdRef = useRef("");
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
if (!props.id)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const { data } = await props["emergencyKnowledgeLibraryInfo"]({ id: props.id });
|
||||||
|
fileIdRef.current = data.fileId;
|
||||||
|
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[707], eqForeignKey: data.fileId });
|
||||||
|
form.setFieldsValue({
|
||||||
|
...data,
|
||||||
|
files,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
await deleteFile({ single: false, files: values.deleteFiles });
|
||||||
|
const { id: fileId } = await uploadFile({
|
||||||
|
single: false,
|
||||||
|
files: values.files,
|
||||||
|
params: { type: UPLOAD_FILE_TYPE_ENUM[707], foreignKey: fileIdRef.current },
|
||||||
|
});
|
||||||
|
const { success } = await props[!props.id ? "emergencyKnowledgeLibraryAdd" : "emergencyKnowledgeLibraryUpdate"]({
|
||||||
|
...values,
|
||||||
|
fileId,
|
||||||
|
id: props.id,
|
||||||
|
emergencyCaseType: 2,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success(`${!props.id ? "新增" : "编辑"}成功`);
|
||||||
|
props.getData();
|
||||||
|
props.onCancel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
open
|
||||||
|
title={!props.id ? "新增" : "编辑"}
|
||||||
|
maskClosable={false}
|
||||||
|
width={600}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
onOk={form.submit}
|
||||||
|
confirmLoading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.emergencyKnowledgeLibrary.emergencyKnowledgeLibraryLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
|
showActionButtons={false}
|
||||||
|
span={24}
|
||||||
|
labelCol={{ span: 8 }}
|
||||||
|
options={[
|
||||||
|
{ name: "title", label: "物品名称" },
|
||||||
|
{ name: "content", label: "内容", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, required: false },
|
||||||
|
{
|
||||||
|
name: "files",
|
||||||
|
label: "相关附件",
|
||||||
|
render: (
|
||||||
|
<Upload
|
||||||
|
maxCount={1}
|
||||||
|
size={20}
|
||||||
|
fileType="document"
|
||||||
|
accept=".pdf,.png,.jpg"
|
||||||
|
onGetRemoveFile={(file) => {
|
||||||
|
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
{ name: "deleteFiles", label: "删除的附件", onlyForLabel: true },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const AddModal = Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(AddModalComponent);
|
||||||
|
export default Connect([NS_EMERGENCY_KNOWLEDGE_LIBRARY], true)(List);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function HazardousGoods(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default HazardousGoods;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EmergencyKnowledgeLibrary(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EmergencyKnowledgeLibrary;
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { message } from "antd";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import Map from "zy-react-library/components/Map";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import { PHONE } from "zy-react-library/regular";
|
||||||
|
import { NS_EVENT_REPORT } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function Add(props) {
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
const { success } = await props["eventReportAdd"]({
|
||||||
|
...values,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success("新增成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page headerTitle="新增" isShowFooter={false}>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.eventReport.eventReportLoading}
|
||||||
|
options={[
|
||||||
|
{
|
||||||
|
name: "accessMode",
|
||||||
|
label: "接入方式",
|
||||||
|
render: (
|
||||||
|
<DictionarySelect
|
||||||
|
dictValue="eventReportMethod"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue("accessModeName", label);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: "accessModeName", label: "接入方式名称", onlyForLabel: true },
|
||||||
|
{ name: "ownerName", label: "机主姓名" },
|
||||||
|
{ name: "incomingCall", label: "呼入电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||||
|
{ name: "eventType", label: "事件类型" },
|
||||||
|
{ name: "reportTime", label: "接报时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||||
|
{ name: "occurrenceTime", label: "发生时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||||
|
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_EVENT_REPORT], true)(Add);
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Modal, Space } from "antd";
|
||||||
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { NS_EVENT_REPORT } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["eventReportList"], {
|
||||||
|
form,
|
||||||
|
});
|
||||||
|
|
||||||
|
const onRescue = async (id) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "是否救援",
|
||||||
|
content: "是否发起救援?",
|
||||||
|
onOk: async () => {
|
||||||
|
const { success } = await props["eventReportRescue"]({ id });
|
||||||
|
if (success) {
|
||||||
|
message.success("操作成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
options={[
|
||||||
|
{ name: "likeAccessMode", label: "接入方式", render: (<DictionarySelect dictValue="eventReportMethod" />) },
|
||||||
|
{ name: "eventType", label: "事件类型" },
|
||||||
|
{ name: "times", label: "发生时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={(<AddIcon />)}
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push("./add");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
columns={[
|
||||||
|
{ title: "接入方式", dataIndex: "accessModeName" },
|
||||||
|
{ title: "机主姓名", dataIndex: "ownerName" },
|
||||||
|
{ title: "呼入电话", dataIndex: "incomingCall" },
|
||||||
|
{ title: "事件类型", dataIndex: "eventType" },
|
||||||
|
{ title: "接报时间", dataIndex: "reportTime" },
|
||||||
|
{ title: "发生时间", dataIndex: "occurrenceTime" },
|
||||||
|
{
|
||||||
|
title: "救援情况",
|
||||||
|
dataIndex: "isRescueExecuted",
|
||||||
|
render: (_, record) => (record.isRescueExecuted === 1 ? "未执行" : "已执行"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: 200,
|
||||||
|
fixed: "right",
|
||||||
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
{record.isRescueExecuted === 1 && (
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
onRescue(record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
是否救援
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./view?id=${record.id}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
const params = new URLSearchParams({
|
||||||
|
id: record.id,
|
||||||
|
accessMode: record.accessMode,
|
||||||
|
accessModeName: record.accessModeName,
|
||||||
|
ownerName: record.ownerName,
|
||||||
|
incomingCall: record.incomingCall,
|
||||||
|
eventType: record.eventType,
|
||||||
|
reportTime: record.reportTime,
|
||||||
|
occurrenceTime: record.occurrenceTime,
|
||||||
|
longitude: record.longitude,
|
||||||
|
latitude: record.latitude,
|
||||||
|
});
|
||||||
|
props.history.push(`./specialReport?${params.toString()}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
生成专报
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
/>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_EVENT_REPORT], true)(List);
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { message } from "antd";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import Map from "zy-react-library/components/Map";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
import { PHONE } from "zy-react-library/regular";
|
||||||
|
import { NS_EVENT_REPORT } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function Add(props) {
|
||||||
|
const query = useGetUrlQuery();
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
form.setFieldsValue(query);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
const { success } = await props["eventReportSpecialReportSave"]({
|
||||||
|
...values,
|
||||||
|
eventReportId: query.id,
|
||||||
|
regionCode: values.regionCode.join(","),
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success("新增成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page headerTitle="生成专报" isShowFooter={false}>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.eventReport.eventReportSpecialReportLoading}
|
||||||
|
useAutoGenerateRequired={false}
|
||||||
|
options={[
|
||||||
|
{ name: "eventTitle", label: "事件标题", span: 24 },
|
||||||
|
{ name: "ownerName", label: "机主姓名", componentProps: { disabled: true } },
|
||||||
|
{ name: "incomingCall", label: "呼入电话", componentProps: { disabled: true } },
|
||||||
|
{ name: "callerAddress", label: "主叫地址" },
|
||||||
|
{
|
||||||
|
name: "accessMode",
|
||||||
|
label: "接入方式",
|
||||||
|
render: (
|
||||||
|
<DictionarySelect
|
||||||
|
dictValue="eventReportMethod"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue("accessModeName", label);
|
||||||
|
}}
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: "accessModeName", label: "接入方式名称", onlyForLabel: true },
|
||||||
|
{ name: "personName", label: "姓名" },
|
||||||
|
{ name: "contactPhone", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||||
|
{ name: "otherInfo", label: "其他信息", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||||
|
{ name: "unitName", label: "单位名称" },
|
||||||
|
{
|
||||||
|
name: "regionCode",
|
||||||
|
label: "所在区域",
|
||||||
|
render: (
|
||||||
|
<AreaCascader
|
||||||
|
changeOnSelect
|
||||||
|
onGetNodePaths={(nodes) => {
|
||||||
|
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: "regionCodeName", label: "所在区域名称", onlyForLabel: true },
|
||||||
|
{ name: "unitAddress", label: "单位地址" },
|
||||||
|
{ name: "industryType", label: "行业类型" },
|
||||||
|
{ name: "economyType", label: "经济类型" },
|
||||||
|
{ name: "majorHazardSource", label: "重大危险源" },
|
||||||
|
{ name: "reportTime", label: "接报时间", render: FORM_ITEM_RENDER_ENUM.DATETIME, componentProps: { disabled: true } },
|
||||||
|
{ name: "occurrenceTime", label: "发生时间", render: FORM_ITEM_RENDER_ENUM.DATETIME, componentProps: { disabled: true } },
|
||||||
|
{ name: "eventType", label: "事件类型", componentProps: { disabled: true } },
|
||||||
|
{ name: "locationAddress", label: "所在地址" },
|
||||||
|
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" required={false} disable />) },
|
||||||
|
{ name: "reportType", label: "接报类型" },
|
||||||
|
{ name: "accidentTitle", label: "事故标题" },
|
||||||
|
{ name: "accidentLevel", label: "事故级别" },
|
||||||
|
{ name: "injuryType", label: "伤害类型" },
|
||||||
|
{ name: "accidentType", label: "事故类型" },
|
||||||
|
{ name: "trappedCount", label: "被困人数", render: FORM_ITEM_RENDER_ENUM.INTEGER },
|
||||||
|
{ name: "missingCount", label: "失踪人数", render: FORM_ITEM_RENDER_ENUM.INTEGER },
|
||||||
|
{ name: "deathCount", label: "死亡人数", render: FORM_ITEM_RENDER_ENUM.INTEGER },
|
||||||
|
{ name: "seriouslyInjuredCount", label: "重伤人数", render: FORM_ITEM_RENDER_ENUM.INTEGER },
|
||||||
|
{ name: "minorInjuryCount", label: "轻伤人数", render: FORM_ITEM_RENDER_ENUM.INTEGER },
|
||||||
|
{ name: "poisonedCount", label: "中毒人数", render: FORM_ITEM_RENDER_ENUM.INTEGER },
|
||||||
|
{
|
||||||
|
name: "directEconomicLoss",
|
||||||
|
label: "直接经济损失",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||||
|
componentProps: {
|
||||||
|
suffix: "(万元)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ name: "briefProcess", label: "简要经过", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||||
|
{ name: "disposalSituation", label: "处置情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_EVENT_REPORT], true)(Add);
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Descriptions, Spin } from "antd";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
import { NS_EVENT_REPORT } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function View(props) {
|
||||||
|
const [info, setInfo] = useState({});
|
||||||
|
|
||||||
|
const query = useGetUrlQuery();
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
const { data } = await props["eventReportInfo"]({ id: query.id });
|
||||||
|
setInfo(data);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page headerTitle="查看">
|
||||||
|
<Spin spinning={props.eventReport.eventReportLoading}>
|
||||||
|
<Descriptions
|
||||||
|
bordered
|
||||||
|
column={2}
|
||||||
|
styles={{ label: { width: 200 } }}
|
||||||
|
items={[
|
||||||
|
{ label: "接入方式", children: info.accessModeName },
|
||||||
|
{ label: "机主姓名", children: info.ownerName },
|
||||||
|
{ label: "呼入电话", children: info.incomingCall },
|
||||||
|
{ label: "事件类型", children: info.eventType },
|
||||||
|
{ label: "接报时间", children: info.reportTime },
|
||||||
|
{ label: "发生时间", children: info.occurrenceTime },
|
||||||
|
{ label: "经度", children: info.longitude },
|
||||||
|
{ label: "纬度", children: info.latitude },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_EVENT_REPORT], true)(View);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EventReport(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EventReport;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EmergencyReporting(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EmergencyReporting;
|
||||||
|
|
@ -71,7 +71,7 @@ function PlanAttachments(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 150,
|
width: 200,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
|
@ -82,7 +82,7 @@ function PlanAttachments(props) {
|
||||||
downloadFile({ url: files[0].url, name: files[0].name });
|
downloadFile({ url: files[0].url, name: files[0].name });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
下载
|
下载附件
|
||||||
</Button>
|
</Button>
|
||||||
{props.mode !== "view" && (
|
{props.mode !== "view" && (
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ const ReviewPersonModalComponent = (props) => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const { success } = await props["enterprisePlanBasicInfoUpdate"]({
|
const { success } = await props["enterprisePlanBasicInfoConfigureApprover"]({
|
||||||
...values,
|
...values,
|
||||||
id: props.planId,
|
id: props.planId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, message, Modal, Space } from "antd";
|
import { Button, Descriptions, message, Modal, Space } from "antd";
|
||||||
|
import { useState } from "react";
|
||||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
|
|
@ -10,10 +11,14 @@ import { ENTERPRISE_PLAN_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_ENTERPRISE_PLAN } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE_PLAN } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
const [reasonsRefusal, setReasonsRefusal] = useState("");
|
||||||
|
const [reasonsRefusalModalVisible, setReasonsRefusalModalVisible] = useState(false);
|
||||||
|
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["enterprisePlanBasicInfoList"], {
|
const { tableProps, getData } = useTable(props["enterprisePlanBasicInfoList"], {
|
||||||
form,
|
form,
|
||||||
|
params: { processStatus: props.processStatus || 0 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -42,15 +47,17 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{!props.processStatus && (
|
||||||
type="primary"
|
<Button
|
||||||
icon={(<AddIcon />)}
|
type="primary"
|
||||||
onClick={() => {
|
icon={(<AddIcon />)}
|
||||||
props.history.push("./add");
|
onClick={() => {
|
||||||
}}
|
props.history.push("./add");
|
||||||
>
|
}}
|
||||||
新增
|
>
|
||||||
</Button>
|
新增
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
|
|
@ -69,15 +76,38 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{props.processStatus !== 2 && (
|
||||||
type="link"
|
<Button
|
||||||
onClick={() => {
|
type="link"
|
||||||
props.history.push(`./view?id=${record.id}`);
|
onClick={() => {
|
||||||
}}
|
props.history.push(`./view?id=${record.id}`);
|
||||||
>
|
}}
|
||||||
查看
|
>
|
||||||
</Button>
|
查看
|
||||||
{(!record.auditFlag || record.auditFlag !== 3) && (
|
</Button>
|
||||||
|
)}
|
||||||
|
{props.processStatus === 2 && (
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./audit?id=${record.id}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
审核
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
{record.auditFlag === "3" && (
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setReasonsRefusalModalVisible(true);
|
||||||
|
setReasonsRefusal(record.reasonsRefusal);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
驳回原因
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
{!props.processStatus && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -87,7 +117,7 @@ function List(props) {
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{(!record.auditFlag || record.auditFlag !== 3) && (
|
{!props.processStatus && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
danger
|
danger
|
||||||
|
|
@ -104,8 +134,43 @@ function List(props) {
|
||||||
]}
|
]}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
/>
|
||||||
|
{
|
||||||
|
reasonsRefusalModalVisible && (
|
||||||
|
<ReasonsRefusalModal
|
||||||
|
reasonsRefusal={reasonsRefusal}
|
||||||
|
onCancel={() => {
|
||||||
|
setReasonsRefusalModalVisible(false);
|
||||||
|
setReasonsRefusal("");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ReasonsRefusalModal = (props) => {
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
open
|
||||||
|
title="驳回原因"
|
||||||
|
maskClosable={false}
|
||||||
|
width={600}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
footer={[
|
||||||
|
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Descriptions
|
||||||
|
bordered
|
||||||
|
column={1}
|
||||||
|
styles={{ label: { width: 200 } }}
|
||||||
|
items={[
|
||||||
|
{ label: "驳回原因", value: props.reasonsRefusal },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default Connect([NS_ENTERPRISE_PLAN], true)(List);
|
export default Connect([NS_ENTERPRISE_PLAN], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function View(props) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerTitle="查看">
|
<Page headerTitle={props.headerTitle || "查看"} extraActionButtons={props.extraActionButtons}>
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={urlState.currentStep}
|
activeKey={urlState.currentStep}
|
||||||
onChange={key => setUrlState({ currentStep: key })}
|
onChange={key => setUrlState({ currentStep: key })}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ListPage from "../../EnterprisePlan/List";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
return (<ListPage processStatus={1} {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default List;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ViewPage from "../../EnterprisePlan/View";
|
||||||
|
|
||||||
|
function View(props) {
|
||||||
|
return (<ViewPage {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default View;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EnterprisePlanApplyRecords(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EnterprisePlanApplyRecords;
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
import useUrlState from "@ahooksjs/use-url-state";
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button, message, Modal } from "antd";
|
||||||
|
import { Fragment, useState } from "react";
|
||||||
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
import { NS_ENTERPRISE_PLAN } from "~/enumerate/namespace";
|
||||||
|
import ViewPage from "../../EnterprisePlan/View";
|
||||||
|
|
||||||
|
function Audit(props) {
|
||||||
|
const query = useGetUrlQuery();
|
||||||
|
const [urlState] = useUrlState();
|
||||||
|
|
||||||
|
const [auditModalVisible, setAuditModalVisible] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Fragment>
|
||||||
|
<ViewPage
|
||||||
|
headerTitle="审核"
|
||||||
|
extraActionButtons={urlState.currentStep === "planAttachments" && (
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
setAuditModalVisible(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
审核
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
auditModalVisible
|
||||||
|
&& (
|
||||||
|
<AuditModal
|
||||||
|
id={query.id}
|
||||||
|
goBack={props.history.goBack}
|
||||||
|
onCancel={() => setAuditModalVisible(false)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const AuditModalComponent = (props) => {
|
||||||
|
const [form] = FormBuilder.useForm();
|
||||||
|
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
const { success } = await props["enterprisePlanBasicInfoAudit"]({
|
||||||
|
...values,
|
||||||
|
id: props.id,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success("审核成功");
|
||||||
|
props.onCancel();
|
||||||
|
props.goBack();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
title="审核"
|
||||||
|
open
|
||||||
|
maskClosable={false}
|
||||||
|
width={600}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
onOk={form.submit}
|
||||||
|
confirmLoading={props.enterprisePlan.enterprisePlanBasicInfoLoading}
|
||||||
|
>
|
||||||
|
<FormBuilder
|
||||||
|
loading={props.enterprisePlan.enterprisePlanBasicInfoLoading}
|
||||||
|
span={24}
|
||||||
|
labelCol={{ span: 8 }}
|
||||||
|
showActionButtons={false}
|
||||||
|
values={{
|
||||||
|
auditFlag: 2,
|
||||||
|
}}
|
||||||
|
options={[
|
||||||
|
{
|
||||||
|
name: "auditFlag",
|
||||||
|
label: "是否通过",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
|
items: [{ bianma: 2, name: "是" }, { bianma: 3, name: "否" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "refusalReason",
|
||||||
|
label: "驳回原因",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||||
|
dependencies: ["auditFlag"],
|
||||||
|
hidden: formValues => !(formValues.auditFlag === 3),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const AuditModal = Connect([NS_ENTERPRISE_PLAN], true)(AuditModalComponent);
|
||||||
|
export default Audit;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ListPage from "../../EnterprisePlan/List";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
return (<ListPage processStatus={2} {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default List;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EnterprisePlanAudit(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EnterprisePlanAudit;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ListPage from "../../EnterprisePlan/List";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
return (<ListPage processStatus={3} {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default List;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ViewPage from "../../EnterprisePlan/View";
|
||||||
|
|
||||||
|
function View(props) {
|
||||||
|
return (<ViewPage {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default View;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EnterprisePlanAuditRecords(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EnterprisePlanAuditRecords;
|
||||||
Loading…
Reference in New Issue