diff --git a/src/main.js b/src/main.js index c1cdccb..676128f 100644 --- a/src/main.js +++ b/src/main.js @@ -6,7 +6,7 @@ import "dayjs/locale/zh-cn"; import "../blessed_by_buddha"; require("antd/dist/reset.css"); - +require("zy-react-library/css/common.less"); dayjs.locale("zh-cn"); setJJBCommonAntdMessage(message); diff --git a/src/pages/Container/Accident/components/Accident/index.js b/src/pages/Container/Accident/components/Accident/index.js index 88ec4c2..5b1fd9c 100644 --- a/src/pages/Container/Accident/components/Accident/index.js +++ b/src/pages/Container/Accident/components/Accident/index.js @@ -16,13 +16,13 @@ import { NS_ACCIDENT } from "~/enumerate/namespace"; import AddIcon from "zy-react-library/components/Icon/AddIcon"; import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon"; import ExportIcon from "zy-react-library/components/Icon/ExportIcon"; -import HeaderBack from "zy-react-library/components/HeaderBack"; import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import useDownloadBlob from "zy-react-library/hooks/useDownloadBlob"; import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria"; import PreviewImg from "zy-react-library/components/PreviewImg"; import useDownloadFile from "zy-react-library/hooks/useDownloadFile"; import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; +import Page from "zy-react-library/components/Page"; function Accident(props) { @@ -47,17 +47,19 @@ function Accident(props) { }); const typeName = props.type === 1 ? "事件" : "事故"; return ( -
- {props.isSupervise && } + }, { name: "eqIncidentLevel", label: `${typeName}等级`, render: }, - { name: "likeLocation", label: `${typeName}发生地点` }, - { name: "incidentDate", label: `${typeName}发生时间`, render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, ]} /> ( {props.permission(props.exportPermission) && - + await downloadBlob("/accident/accident/export", { params: { ...exportParams, eqType: props.type } }) + }}>全部导出 } {!props.isSupervise && props.permission(props.addPermission) && - + } {!props.isSupervise && props.permission(props.deleteBatchPermission) && - + } )} @@ -105,8 +108,8 @@ function Accident(props) { { dataIndex: "corpinfoName", title: `所属公司` }, { dataIndex: "incidentDate", title: `${typeName}发生时间` }, { dataIndex: "location", title: `${typeName}发生地点` }, - { dataIndex: "incidentTypeName", title: `${typeName}类型`}, - { dataIndex: "incidentLevelName", title: `${typeName}等级`}, + { dataIndex: "incidentTypeName", title: `${typeName}类型` }, + { dataIndex: "incidentLevelName", title: `${typeName}等级` }, { title: "操作", align: "center", @@ -183,7 +186,7 @@ function Accident(props) { typeName={typeName} getData={getData} />} - + ); } @@ -300,7 +303,7 @@ function AddModalComponent(props) { onCancel={onCancel} onOk={form.submit} title={props.currentId ? "编辑" : "新增"} - loading={props.accident.accidentLoading || uploadLoading || deleteLoading} + confirmLoading={props.accident.accidentLoading || uploadLoading || deleteLoading} width={800} > setDicNames({ ...dicNames, incidentTypeName: label })} /> }, { name: "incidentLevel", label: `${typeName}等级`, render: setDicNames({ ...dicNames, incidentLevelName: label })} /> }, - { name: "incidentNature", label: `${typeName}性质` }, { name: "location", label: `${typeName}发生地点` }, { name: "incidentDate", label: `${typeName}发生时间`, render: FORM_ITEM_RENDER_ENUM.DATETIME }, - { name: "directLoss", label: "直接经济损失(万元)", render: FORM_ITEM_RENDER_ENUM.NUMBER,componentProps: { precision: 2,min: 0 }, required: false }, - { name: "injured", label: "受伤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER,componentProps: { precision: 0,min: 0 }, required: false }, - { name: "fatalities", label: "死亡人数", render: FORM_ITEM_RENDER_ENUM.NUMBER,componentProps: { precision: 0,min: 0 }, required: false }, - { name: "seriouslyInjured", label: "重伤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER,componentProps: { precision: 0,min: 0 }, required: false }, + { name: "directLoss", label: "直接经济损失(万元)", render: FORM_ITEM_RENDER_ENUM.NUMBER, componentProps: { precision: 2, min: 0 }, required: false }, + { name: "injured", label: "受伤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER, componentProps: { precision: 0, min: 0 }, required: false }, + { name: "fatalities", label: "死亡人数", render: FORM_ITEM_RENDER_ENUM.NUMBER, componentProps: { precision: 0, min: 0 }, required: false }, + { name: "seriouslyInjured", label: "重伤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER, componentProps: { precision: 0, min: 0 }, required: false }, { name: "cause", label: `${typeName}起因`, render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, { name: "summary", label: `${typeName}概述`, render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, { name: "analysis", label: "原因分析及责任认定", render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, { name: "suggestions", label: "考核建议", render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, { name: "measures", label: "整改措施", render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, + { name: "reportUser", label: `填报人` }, { name: "reportDate", label: "报出日期", render: FORM_ITEM_RENDER_ENUM.DATETIME }, // 添加图片上传 { @@ -407,7 +411,6 @@ function InfoModalComponent(props) { { children: info.incidentName, label: `${typeName}名称` }, { children: info.incidentTypeName, label: `${typeName}类型` }, { children: info.incidentLevelName, label: `${typeName}等级` }, - { children: info.incidentNature, label: `${typeName}性质` }, { children: info.location, label: `${typeName}发生地点` }, { children: info.incidentDate, label: `${typeName}发生时间` }, { children: info.directLoss || 0, label: "直接经济损失(万元)" }, @@ -419,6 +422,7 @@ function InfoModalComponent(props) { { children: info.analysis, label: "原因分析及责任认定" }, { children: info.suggestions, label: "考核建议" }, { children: info.measures, label: "整改措施" }, + { children: info.reportUser, label: "填表人" }, { children: info.reportDate, label: "报出日期" }, // 显示图片 { @@ -429,7 +433,7 @@ function InfoModalComponent(props) { }, // 显示附件 { - label: `${typeName}附件`, + label: `${typeName}附件`, children: (
{attachmentFiles.map((file, index) => ( diff --git a/src/pages/Container/SuperviseAccident/List/index.js b/src/pages/Container/SuperviseAccident/List/index.js index d6d4381..119b87d 100644 --- a/src/pages/Container/SuperviseAccident/List/index.js +++ b/src/pages/Container/SuperviseAccident/List/index.js @@ -8,6 +8,7 @@ import {NS_ACCIDENT} from "~/enumerate/namespace"; import useDictionary from "zy-react-library/hooks/useDictionary"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria"; +import Page from "zy-react-library/components/Page"; const TYPE = [ @@ -36,7 +37,7 @@ function SuperviseAccident(props) { const {tableProps, getData} = useTable(props["getCorpInfoList"], { form, params: { - inType: "0,1", + inType: [0,1], }, onSuccess: ({data}) => { getAccidentCountByCorpinfoAndType(data.map(item => item.id),form.getFieldValue("eqAccidentType")) @@ -48,7 +49,7 @@ function SuperviseAccident(props) { const searchType = getUrlCriteriaQuery("searchFormKeys","searchFormValues").eqAccidentType; return ( -
+ setSelectedRowKeys(selectedRowKeys), }} columns={[ - {dataIndex: "corpName", title: `所属公司`}, + {dataIndex: "corpName", title: `公司名称`}, ...accidentType.map(item => ({ dataIndex: `countByCorpinfoAndType_${item.dictValue}`, title: `${item.dictLabel}`, @@ -94,7 +95,7 @@ function SuperviseAccident(props) { ]} {...tableProps} /> -
+ ); }