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