添加事故详情页面
parent
bd5bb63a51
commit
560ba2a9bc
|
|
@ -10,6 +10,7 @@ module.exports = {
|
|||
javaGitBranch: "<branch-name>",
|
||||
// 接口服务地址
|
||||
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
|
|
@ -44,7 +45,7 @@ module.exports = {
|
|||
// 开发服务
|
||||
server: {
|
||||
// 监听端口号
|
||||
port: "8080",
|
||||
port: "8030",
|
||||
// 服务地址
|
||||
host: "127.0.0.1",
|
||||
// 是否自动打开浏览器
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
"lodash-es": "^4.17.21",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"zy-react-library": "latest"
|
||||
"zy-react-library": "^1.3.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ function Accident(props) {
|
|||
params: {
|
||||
eqType: props.type,
|
||||
eqCorpinfoId: props.corpinfoId,
|
||||
eqIncidentType: props.eqIncidentType,
|
||||
},
|
||||
transform: data => ({
|
||||
geIncidentDate: data.incidentDate?.[0] ? (`${data.incidentDate[0]} 00:00:00`) : "",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form } from "antd";
|
||||
import { Button, Form } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
|
|
@ -27,7 +27,7 @@ function Bulletin(props) {
|
|||
usePagination: false,
|
||||
params: {
|
||||
eqAccidentType: query.eqAccidentType,
|
||||
corpinfoId: query.corpinfoId,
|
||||
corpinfoIds: [query.corpinfoId],
|
||||
},
|
||||
onSuccess: ({ data }) => {
|
||||
setCountByIncidentType(data);
|
||||
|
|
@ -39,15 +39,24 @@ function Bulletin(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Page headerTitle="查看">
|
||||
|
||||
<Table
|
||||
options={false}
|
||||
columns={[
|
||||
...accidentType.map(item => ({
|
||||
dataIndex: `countByCorpinfoAndType_${item.dictValue}`,
|
||||
title: `${item.dictLabel}`,
|
||||
render: (_, record) => (
|
||||
getAccidentCount(record.corpinfoId, item.dictValue)
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./View?corpinfoId=${record.corpinfoId}&eqAccidentType=${query.eqAccidentType}&eqIncidentType=${item.dictValue}`);
|
||||
}}
|
||||
>
|
||||
{getAccidentCount(record.corpinfoId, item.dictValue)}
|
||||
</Button>
|
||||
|
||||
),
|
||||
})),
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import Accident from "../../Accident/components/Accident";
|
||||
|
||||
function AccidentContainer(props) {
|
||||
const { corpinfoId, eqAccidentType, eqIncidentType } = useGetUrlQuery();
|
||||
|
||||
return (
|
||||
<Accident
|
||||
type={Number(eqAccidentType)}
|
||||
isSupervise={true}
|
||||
corpinfoId={corpinfoId}
|
||||
eqIncidentType={eqIncidentType}
|
||||
exportPermission="zcloud-accident-supervise-export"
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default AccidentContainer;
|
||||
Loading…
Reference in New Issue