From 589dbbe3ef429198b0f9d65c84d6230f5babfd44 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 3 Mar 2026 10:24:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E6=A3=80=E6=9F=A5=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=A3=80=E6=9F=A5=E6=89=A7=E8=A1=8C=E6=83=85?= =?UTF-8?q?=E5=86=B5=E8=BF=9B=E5=85=A5=E7=9A=84=EF=BC=8C=E8=A2=AB=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=8D=95=E4=BD=8D=E5=8F=AA=E6=9F=A5=E8=AF=A2=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=9A=84=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Inspection/Records/List/index.js | 90 +++++++++---------- .../Statistics/InspectionRecordsList/index.js | 2 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/pages/Container/BranchCompany/Inspection/Records/List/index.js b/src/pages/Container/BranchCompany/Inspection/Records/List/index.js index e8bdf2c..1da10fb 100644 --- a/src/pages/Container/BranchCompany/Inspection/Records/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Records/List/index.js @@ -1,24 +1,24 @@ -import {Permission} from "@cqsjjb/jjb-common-decorator/permission"; +import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; -import {Connect} from "@cqsjjb/jjb-dva-runtime"; -import {Button, Form, message, Modal, Space, Spin} from "antd"; -import {useEffect, useState} from "react"; +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, message, Modal, Space, Spin } from "antd"; +import { useEffect, useState } from "react"; import ExportIcon from "zy-react-library/components/Icon/ExportIcon"; import Page from "zy-react-library/components/Page"; import Search from "zy-react-library/components/Search"; import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj"; import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary"; import Table from "zy-react-library/components/Table"; -import {FORM_ITEM_RENDER_ENUM} from "zy-react-library/enum/formItemRender"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import useDownloadBlob from "zy-react-library/hooks/useDownloadBlob"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useTable from "zy-react-library/hooks/useTable"; import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria"; -import {getLabelName} from "zy-react-library/utils"; -import {formatDate} from "~/utils/dateFormat"; +import { getLabelName } from "zy-react-library/utils"; import InspectionFlowModal from "~/components/InspectionFlowModal"; -import {INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM} from "~/enumerate/constant"; -import {NS_INSPECTION} from "~/enumerate/namespace"; +import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant"; +import { NS_INSPECTION } from "~/enumerate/namespace"; +import { formatDate } from "~/utils/dateFormat"; import "@xyflow/react/dist/style.css"; function List(props) { @@ -26,8 +26,8 @@ function List(props) { const [flowModalOpen, setFlowModalOpen] = useState(false); const [currentId, setCurrentId] = useState(""); - const {getUrlCriteriaQuery} = useUrlQueryCriteria(); - const {loading, downloadBlob} = useDownloadBlob(); + const { getUrlCriteriaQuery } = useUrlQueryCriteria(); + const { loading, downloadBlob } = useDownloadBlob(); const [count, setCount] = useState({ inspectCount: 0, hiddenCount: 0, @@ -36,7 +36,7 @@ function List(props) { }); const [form] = Form.useForm(); - const {tableProps, getData} = useTable(props["inspectionList"], { + const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ checkStartTime: formData.checkTime?.[0] ? (`${formData.checkTime[0]} 00:00:00`) : "", @@ -48,10 +48,10 @@ function List(props) { }, onSuccess: () => { getCount(); - } + }, }); const getCount = async () => { - const {data} = await props["inspectionCount"]({ + const { data } = await props["inspectionCount"]({ menuPath: window.location.pathname, status: "", entrance: "0", @@ -59,7 +59,7 @@ function List(props) { checkStartTime: query.checkStartTime || form.getFieldValue("checkTime")?.[0], checkEndTime: query.checkEndTime || form.getFieldValue("checkTime").checkTime?.[1], planType: query.planType, - ...form.getFieldsValue() + ...form.getFieldsValue(), }); setCount(data); }; @@ -72,7 +72,7 @@ function List(props) { title: "删除确认", content: "是否确认删除?删除后连带隐患同时删除。", onOk: async () => { - const {success} = await props["inspectionDelete"]({id}); + const { success } = await props["inspectionDelete"]({ id }); if (success) { message.success("删除成功"); getData(); @@ -84,7 +84,7 @@ function List(props) { return ( }, - {name: "inspectionUserName", label: "检查人"}, - {name: "type", label: "检查类型", render: }, + { name: "inspectionOriginatorUserName", label: "检查发起人" }, + { name: "inspectionDeptId", label: "检查部门", render: }, + { name: "inspectionUserName", label: "检查人" }, + { name: "type", label: "检查类型", render: }, { name: "inspectedDepartmentId", label: "被检查单位", - render: + render: , }, - {name: "inspectedUserName", label: "被检查单位现场负责人"}, - {name: "status", label: "检查状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: INSPECTION_STATE_ENUM}, - {name: "checkYear", label: "检查年度", render: FORM_ITEM_RENDER_ENUM.DATE_YEAR}, - {name: "checkTime", label: "检查时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE}, - {name: "planType", label: "计划属性", render: FORM_ITEM_RENDER_ENUM.SELECT, items: PLAN_ENUM}, + { name: "inspectedUserName", label: "被检查单位现场负责人" }, + { name: "status", label: "检查状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: INSPECTION_STATE_ENUM }, + { name: "checkYear", label: "检查年度", render: FORM_ITEM_RENDER_ENUM.DATE_YEAR }, + { name: "checkTime", label: "检查时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, + { name: "planType", label: "计划属性", render: FORM_ITEM_RENDER_ENUM.SELECT, items: PLAN_ENUM }, ]} form={form} onFinish={getData} @@ -130,19 +130,19 @@ function List(props) { >
安全检查总数: - {count.safetyCount} + {count.safetyCount}
环保检查总数: - {count.environmentalCount} + {count.environmentalCount}
综合检查总数: - {count.comprehensiveCount} + {count.comprehensiveCount}
涉及隐患总数: - {count.hiddenCount} + {count.hiddenCount}
@@ -154,15 +154,15 @@ function List(props) { type="primary" ghost loading={loading} - icon={} + icon={} onClick={async () => { const exportParams = getUrlCriteriaQuery("searchFormKeys", "searchFormValues"); await downloadBlob("/inspection/safetyEnvironmentalInspection/exportList", { params: { ...exportParams, - menuPath: window.location.pathname - } + menuPath: window.location.pathname, + }, }); }} > @@ -172,29 +172,29 @@ function List(props) { )} columns={[ - {title: "检查题目", dataIndex: "subject"}, - {title: "检查发起人", dataIndex: "inspectionOriginatorUserName"}, - {title: "检查部门", dataIndex: "inspectionDepartmentName"}, - {title: "检查人", dataIndex: "inspectionInspectorUserName"}, - {title: "被检查单位", dataIndex: "inspectionSiteDepartmentName"}, - {title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200}, - {title: "检查类型", dataIndex: "typeName"}, + { title: "检查题目", dataIndex: "subject" }, + { title: "检查发起人", dataIndex: "inspectionOriginatorUserName" }, + { title: "检查部门", dataIndex: "inspectionDepartmentName" }, + { title: "检查人", dataIndex: "inspectionInspectorUserName" }, + { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, + { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, + { title: "检查类型", dataIndex: "typeName" }, { title: "检查时间", width: 200, - render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") + render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : ""), }, { title: "检查状态", dataIndex: "status", - render: (_, record) => (getLabelName({list: INSPECTION_STATE_ENUM, status: record.status})), + render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })), }, { title: "计划属性", dataIndex: "planType", - render: (_, record) => getLabelName({list: PLAN_ENUM, status: record.planType}) + render: (_, record) => getLabelName({ list: PLAN_ENUM, status: record.planType }), }, - {title: "发现隐患数", dataIndex: "hiddenNumber"}, + { title: "发现隐患数", dataIndex: "hiddenNumber" }, { title: "操作", fixed: "right", diff --git a/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js b/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js index 447f910..4af0ab1 100644 --- a/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js +++ b/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js @@ -1,7 +1,7 @@ import RecordsList from "~/pages/Container/Supervision/Inspection/Records/List"; function InspectionRecordsList(props) { - return ; + return ; } export default InspectionRecordsList;