添加事故详情页面

dev
853931625@qq.com 2026-06-13 15:23:31 +08:00
parent bd5bb63a51
commit 560ba2a9bc
5 changed files with 36 additions and 6 deletions

View File

@ -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",
// 是否自动打开浏览器

View File

@ -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",

View File

@ -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`) : "",

View File

@ -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>
),
})),
]}

View File

@ -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;