From 0283a327118df5a98ea1185f1c22947796033b00 Mon Sep 17 00:00:00 2001 From: yujia Date: Fri, 5 Dec 2025 14:05:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E8=88=AC=E9=9A=90=E6=82=A3=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E9=9A=90=E6=82=A3=E9=87=8D=E5=A4=8D=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=92=8CAI=E9=9A=90=E6=82=A3=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/average/index.js | 20 ++++++ .../AIHazardIdentification/List/index.js | 45 ++++++++++++++ .../AIHazardIdentification/ListView/index.js | 53 ++++++++++++++++ .../ViewContent/index.js | 36 +++++++++++ .../Average/AIHazardIdentification/index.js | 9 +++ .../Average/DuplicateHazard/List/index.js | 45 ++++++++++++++ .../Average/DuplicateHazard/ListView/index.js | 61 +++++++++++++++++++ .../Average/DuplicateHazard/index.js | 9 +++ 8 files changed, 278 insertions(+) create mode 100644 src/pages/Container/Supervision/Average/AIHazardIdentification/List/index.js create mode 100644 src/pages/Container/Supervision/Average/AIHazardIdentification/ListView/index.js create mode 100644 src/pages/Container/Supervision/Average/AIHazardIdentification/ViewContent/index.js create mode 100644 src/pages/Container/Supervision/Average/AIHazardIdentification/index.js create mode 100644 src/pages/Container/Supervision/Average/DuplicateHazard/List/index.js create mode 100644 src/pages/Container/Supervision/Average/DuplicateHazard/ListView/index.js create mode 100644 src/pages/Container/Supervision/Average/DuplicateHazard/index.js diff --git a/src/api/average/index.js b/src/api/average/index.js index a535517..5f4a884 100644 --- a/src/api/average/index.js +++ b/src/api/average/index.js @@ -8,3 +8,23 @@ export const averageByCorpInfoList = declareRequest( "ignoreLoading", "Post > @/hidden/hidden/generalHiddenList", ); +export const averageAiHiddenRecord = declareRequest( + "ignoreLoading", + "Post > @/hidden/hidden/aiHiddenRecord", +); +export const averageAiHiddenRecordByCorp = declareRequest( + "ignoreLoading", + "Post > @/hidden/hidden/aiHiddenRecordByCorp", +); +export const averageAiHiddenRecordByUser = declareRequest( + "ignoreLoading", + "Post > @/hidden/hidden/aiHiddenRecordByUser", +); +export const averageRepeatHiddenCount = declareRequest( + "ignoreLoading", + "Post > @/hidden/hidden/repeatHiddenCountByCorp", +); +export const averageRepeatHiddenList = declareRequest( + "ignoreLoading", + "Post > @/hidden/hidden/repeatHiddenList", +); diff --git a/src/pages/Container/Supervision/Average/AIHazardIdentification/List/index.js b/src/pages/Container/Supervision/Average/AIHazardIdentification/List/index.js new file mode 100644 index 0000000..0c1a2fd --- /dev/null +++ b/src/pages/Container/Supervision/Average/AIHazardIdentification/List/index.js @@ -0,0 +1,45 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_AVERAGE } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps } = useTable(props["averageAiHiddenRecord"], { + form, + }); + return ( +
+
+ ( + + + + ), + }, + ]} + {...tableProps} + /> + + + + ); +} + +export default Connect([NS_AVERAGE], true)(List); diff --git a/src/pages/Container/Supervision/Average/AIHazardIdentification/ListView/index.js b/src/pages/Container/Supervision/Average/AIHazardIdentification/ListView/index.js new file mode 100644 index 0000000..52a57ed --- /dev/null +++ b/src/pages/Container/Supervision/Average/AIHazardIdentification/ListView/index.js @@ -0,0 +1,53 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Form } from "antd"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Table from "zy-react-library/components/Table"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_AVERAGE } from "~/enumerate/namespace"; + +function ListView(props) { + const query = useGetUrlQuery(); + const [form] = Form.useForm(); + const { tableProps } = useTable(props["averageAiHiddenRecordByCorp"], { + form, + params: { + corpId: query.id, + }, + }); + return ( +
+ +
+
`企业名称:${query.corpName}`} + columns={[ + { title: "使用人", dataIndex: "userName" }, + { title: "使用时间", dataIndex: "useTime" }, + { + title: "生成隐患数", + dataIndex: "hiddenNum", + render: (_, record) => { + return ( + <> + { + props.history.push(`./ViewContent?userId=${record.userId}`); + }} + > + {record.hiddenNum} + + + ); + }, + }, + ]} + {...tableProps} + /> + + + + ); +} + +export default Connect([NS_AVERAGE], true)(ListView); diff --git a/src/pages/Container/Supervision/Average/AIHazardIdentification/ViewContent/index.js b/src/pages/Container/Supervision/Average/AIHazardIdentification/ViewContent/index.js new file mode 100644 index 0000000..cf290d6 --- /dev/null +++ b/src/pages/Container/Supervision/Average/AIHazardIdentification/ViewContent/index.js @@ -0,0 +1,36 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Form } from "antd"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Table from "zy-react-library/components/Table"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_AVERAGE } from "~/enumerate/namespace"; + +function ViewContent(props) { + const query = useGetUrlQuery(); + const [form] = Form.useForm(); + const { tableProps } = useTable(props["averageAiHiddenRecordByUser"], { + form, + params: { + userId: query.userId, + }, + }); + return ( +
+ +
+
+ + + + ); +} + +export default Connect([NS_AVERAGE], true)(ViewContent); diff --git a/src/pages/Container/Supervision/Average/AIHazardIdentification/index.js b/src/pages/Container/Supervision/Average/AIHazardIdentification/index.js new file mode 100644 index 0000000..d274a99 --- /dev/null +++ b/src/pages/Container/Supervision/Average/AIHazardIdentification/index.js @@ -0,0 +1,9 @@ +function AIHazardIdentification(props) { + return ( +
+ {props.children} +
+ ); +} + +export default AIHazardIdentification; diff --git a/src/pages/Container/Supervision/Average/DuplicateHazard/List/index.js b/src/pages/Container/Supervision/Average/DuplicateHazard/List/index.js new file mode 100644 index 0000000..1e9009b --- /dev/null +++ b/src/pages/Container/Supervision/Average/DuplicateHazard/List/index.js @@ -0,0 +1,45 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_AVERAGE } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps } = useTable(props["averageRepeatHiddenCount"], { + form, + }); + return ( +
+
+
( + + + + ), + }, + ]} + {...tableProps} + /> + + + + ); +} + +export default Connect([NS_AVERAGE], true)(List); diff --git a/src/pages/Container/Supervision/Average/DuplicateHazard/ListView/index.js b/src/pages/Container/Supervision/Average/DuplicateHazard/ListView/index.js new file mode 100644 index 0000000..28b62a4 --- /dev/null +++ b/src/pages/Container/Supervision/Average/DuplicateHazard/ListView/index.js @@ -0,0 +1,61 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Table from "zy-react-library/components/Table"; +import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { NS_AVERAGE } from "~/enumerate/namespace"; + +function ListView(props) { + const query = useGetUrlQuery(); + const [form] = Form.useForm(); + const { tableProps } = useTable(props["averageRepeatHiddenList"], { + form, + params: { + corpId: query.id, + }, + }); + return ( +
+ +
+
`企业名称:${query.corpName}`} + columns={[ + { title: "隐患描述", dataIndex: "hiddenDesc" }, + { title: "隐患来源", dataIndex: "source", render: (_, record) => getLabelName({ list: HIDDEN_SOURCE_ENUM, status: record.source }) }, + { title: "隐患级别", dataIndex: "hiddenLevelName" }, + { title: "隐患类型", dataIndex: "hiddenTypeName" }, + { title: "隐患发现部门", dataIndex: "hiddenFindDeptName" }, + { title: "隐患发现人", dataIndex: "createName" }, + { title: "隐患发现时间", dataIndex: "hiddenFindTime" }, + { title: "隐患状态", dataIndex: "state", render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }), }, + { + title: "操作", + width: 100, + fixed: "right", + render: (_, record) => ( + + + + ), + }, + ]} + {...tableProps} + /> + + + + ); +} + +export default Connect([NS_AVERAGE], true)(ListView); diff --git a/src/pages/Container/Supervision/Average/DuplicateHazard/index.js b/src/pages/Container/Supervision/Average/DuplicateHazard/index.js new file mode 100644 index 0000000..650f351 --- /dev/null +++ b/src/pages/Container/Supervision/Average/DuplicateHazard/index.js @@ -0,0 +1,9 @@ +function DuplicateHazard(props) { + return ( +
+ {props.children} +
+ ); +} + +export default DuplicateHazard;