From c2b0e5c99f27187d7fa1d71162f361ba3b9520dd Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Mon, 29 Dec 2025 11:39:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../BranchCompany/HiddenView/index.js | 5 +- .../Inspection/Acceptance/Acceptance/index.js | 9 +- .../Inspection/Acceptance/HiddenList/index.js | 71 ++- .../Inspection/Acceptance/List/index.js | 5 +- .../Inspection/Assign/Assign/index.js | 9 +- .../Inspection/Assign/HiddenList/index.js | 71 ++- .../Inspection/Assign/List/index.js | 5 +- .../Inspection/Defense/List/index.js | 83 +-- .../Inspection/Inspected/List/index.js | 12 +- .../Add/components/HiddenAdd/index.js | 7 +- .../Inspection/Inspection/Add/index.js | 539 +++++++++--------- .../Inspection/Inspection/List/index.js | 5 +- .../Inspection/Inspector/List/index.js | 12 +- .../Inspection/Records/List/index.js | 11 +- .../BranchCompany/InspectionView/index.js | 29 +- .../Plan/Execute/InspectionRecords/index.js | 10 +- .../BranchCompany/Plan/Execute/List/index.js | 9 +- .../Plan/Management/List/index.js | 12 +- .../PersonnelExecutionDetails/index.js | 93 ++- .../PersonnelExecutionRecords/index.js | 83 ++- .../Management/PlanExecutionDetails/index.js | 91 ++- .../Container/Supervision/HiddenView/index.js | 5 +- .../Plan/Execute/InspectionRecords/index.js | 10 +- .../Supervision/Plan/ViewInfo/index.js | 4 +- .../Statistics/InspectionRecordsList/index.js | 7 + .../Supervision/Statistics/List/index.js | 15 +- .../Supervision/Statistics/PlanList/index.js | 7 + 28 files changed, 603 insertions(+), 618 deletions(-) create mode 100644 src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js create mode 100644 src/pages/Container/Supervision/Statistics/PlanList/index.js diff --git a/package.json b/package.json index 65954c8..82d0275 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-to-print": "^3.2.0", - "zy-react-library": "^1.0.175" + "zy-react-library": "^1.1.10" }, "devDependencies": { "@antfu/eslint-config": "^5.4.1", diff --git a/src/pages/Container/BranchCompany/HiddenView/index.js b/src/pages/Container/BranchCompany/HiddenView/index.js index 41db77d..aa91bb4 100644 --- a/src/pages/Container/BranchCompany/HiddenView/index.js +++ b/src/pages/Container/BranchCompany/HiddenView/index.js @@ -1,10 +1,11 @@ import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; +import Page from "zy-react-library/components/Page"; function HiddenView() { return ( -
+ -
+ ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Acceptance/Acceptance/index.js b/src/pages/Container/BranchCompany/Inspection/Acceptance/Acceptance/index.js index 008deff..986d09f 100644 --- a/src/pages/Container/BranchCompany/Inspection/Acceptance/Acceptance/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Acceptance/Acceptance/index.js @@ -1,8 +1,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Divider, Form, message } from "antd"; import FormBuilder from "zy-react-library/components/FormBuilder"; -import HeaderBack from "zy-react-library/components/HeaderBack"; import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; +import Page from "zy-react-library/components/Page"; import Upload from "zy-react-library/components/Upload"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; @@ -29,9 +29,8 @@ function Acceptance(props) { }; return ( -
- - + + 安全环保检查验收 ) }, ]} /> -
+ ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Acceptance/HiddenList/index.js b/src/pages/Container/BranchCompany/Inspection/Acceptance/HiddenList/index.js index 4b91a61..8369252 100644 --- a/src/pages/Container/BranchCompany/Inspection/Acceptance/HiddenList/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Acceptance/HiddenList/index.js @@ -1,6 +1,6 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Space } from "antd"; -import HeaderBack from "zy-react-library/components/HeaderBack"; +import Page from "zy-react-library/components/Page"; import Table from "zy-react-library/components/Table"; import { HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; @@ -15,42 +15,39 @@ function HiddenList(props) { }); return ( -
- -
- getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) }, - { - title: "操作", - width: 150, - render: (_, record) => ( - - - - - ), - }, - ]} - {...tableProps} - /> - - + +
getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) }, + { + title: "操作", + width: 150, + render: (_, record) => ( + + + + + ), + }, + ]} + {...tableProps} + /> + ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js b/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js index 5fd1a79..4df280a 100644 --- a/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js @@ -1,6 +1,7 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form, Space } from "antd"; +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"; @@ -22,7 +23,7 @@ function List(props) { }); return ( -
+ -
+ ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Assign/Assign/index.js b/src/pages/Container/BranchCompany/Inspection/Assign/Assign/index.js index 9419da5..025bd92 100644 --- a/src/pages/Container/BranchCompany/Inspection/Assign/Assign/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Assign/Assign/index.js @@ -2,8 +2,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Divider, Form, message } from "antd"; import { useEffect, useState } from "react"; import FormBuilder from "zy-react-library/components/FormBuilder"; -import HeaderBack from "zy-react-library/components/HeaderBack"; import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; +import Page from "zy-react-library/components/Page"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { NS_INSPECTION } from "~/enumerate/namespace"; @@ -29,9 +29,8 @@ function Assign(props) { }; return ( -
- - + + 隐患确认 -
+ ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Assign/HiddenList/index.js b/src/pages/Container/BranchCompany/Inspection/Assign/HiddenList/index.js index 01f0650..c023576 100644 --- a/src/pages/Container/BranchCompany/Inspection/Assign/HiddenList/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Assign/HiddenList/index.js @@ -1,6 +1,6 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Space } from "antd"; -import HeaderBack from "zy-react-library/components/HeaderBack"; +import Page from "zy-react-library/components/Page"; import Table from "zy-react-library/components/Table"; import { HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; @@ -15,42 +15,39 @@ function HiddenList(props) { }); return ( -
- -
-
getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) }, - { - title: "操作", - width: 150, - render: (_, record) => ( - - - - - ), - }, - ]} - {...tableProps} - /> - - + +
getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) }, + { + title: "操作", + width: 150, + render: (_, record) => ( + + + + + ), + }, + ]} + {...tableProps} + /> + ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js b/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js index e4664d5..2fdbb34 100644 --- a/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js @@ -1,6 +1,7 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form, Space } from "antd"; +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"; @@ -22,7 +23,7 @@ function List(props) { }); return ( -
+ -
+ ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js index 76fa838..3e35220 100644 --- a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js @@ -1,8 +1,9 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Form, Image, message, Modal, Space } from "antd"; +import { Button, Form, Image, message, Modal, Space, Spin } from "antd"; import { useEffect, useState } from "react"; import FormBuilder from "zy-react-library/components/FormBuilder"; +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"; @@ -33,7 +34,7 @@ function List(props) { }); return ( -
+ )} -
+ ); } @@ -152,17 +153,18 @@ function DefenseHandlingModalComponent(props) { return ( { for (let i = 0; i < list.length; i++) { @@ -242,40 +244,41 @@ function DefenseRecordModalComponent(props) { footer={[ , ]} - loading={downloadFileLoading || downloadGetFileLoading} > -
( - <> -
{record.isPass === 0 && "未审批"}
-
{record.isPass === 1 && "通过"}
-
{record.isPass === 2 && "未通过"}
- - ) }, - { title: "签字图片", dataIndex: "signature", render: (_, record) => (record.signature && ) }, - { title: "申辩附件名称", dataIndex: "name", width: 200 }, - { title: "申辩附件", dataIndex: "url", render: (_, record) => ( - record.url && ( - - ) - ) }, - { title: "检查人签字", dataIndex: "checkSign", render: (_, record) => (record.checkSign && ) }, - { title: "检查人意见", dataIndex: "checkRemarks" }, - { title: "审批时间", dataIndex: "checkSignTime", width: 200 }, - ]} - {...tableProps} - dataSource={list} - /> + +
( + <> +
{record.isPass === 0 && "未审批"}
+
{record.isPass === 1 && "通过"}
+
{record.isPass === 2 && "未通过"}
+ + ) }, + { title: "签字图片", dataIndex: "signature", render: (_, record) => (record.signature && ) }, + { title: "申辩附件名称", dataIndex: "name", width: 200 }, + { title: "申辩附件", dataIndex: "url", render: (_, record) => ( + record.url && ( + + ) + ) }, + { title: "检查人签字", dataIndex: "checkSign", render: (_, record) => (record.checkSign && ) }, + { title: "检查人意见", dataIndex: "checkRemarks" }, + { title: "审批时间", dataIndex: "checkSignTime", width: 200 }, + ]} + {...tableProps} + dataSource={list} + /> + ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js b/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js index 87a38ed..2a5ba23 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js @@ -3,6 +3,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form, message, Modal, Space } from "antd"; import { useState } from "react"; import FormBuilder from "zy-react-library/components/FormBuilder"; +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"; @@ -30,7 +31,7 @@ function List(props) { }); return ( -
+ )} -
+ ); } @@ -131,20 +132,21 @@ function ConfirmModalComponent(props) { return ( , span: 24 }, { name: "positionDesc", label: "隐患位置描述", required: false, span: 24 }, { diff --git a/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js b/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js index 288e6da..e6a08d2 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js @@ -3,7 +3,7 @@ import { Button, Form, message, Modal, Space } from "antd"; import { cloneDeep } from "lodash-es"; import { useEffect, useRef, useState } from "react"; import FormBuilder from "zy-react-library/components/FormBuilder"; -import HeaderBack from "zy-react-library/components/HeaderBack"; +import Page from "zy-react-library/components/Page"; import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj"; import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj"; import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary"; @@ -198,7 +198,7 @@ function Add(props) { }); }; - // 更新现有隐患 + // 保存隐患 const handleHiddenSubmit = async (traceId, isDraft, index) => { await deleteFile({ single: false, @@ -224,7 +224,7 @@ function Add(props) { files: hiddenList[index].hiddenVideoFiles, params: { type: UPLOAD_FILE_TYPE_ENUM["102"], - foreignKey: hiddenList[index].hiddenId, + foreignKey: id, }, }); @@ -237,9 +237,9 @@ function Add(props) { eqForeignKey: id, }); - await props["hiddenEdit"]({ + await props[!hiddenList[index].hiddenId ? "hiddenAdd" : "hiddenEdit"]({ ...hiddenList[index], - source: 5, + source: props.source || "5", hiddenId: id, state: isDraft === 0 ? 102 : 98, foreignKey: traceId, @@ -307,283 +307,280 @@ function Add(props) { }; useEffect(() => { - // if (isIdle) - // onSubmit(form.getFieldsValue(), 1); + if (isIdle) + onSubmit(form.getFieldsValue(), 1); }, [isIdle]); return ( -
- -
- onSubmit(values, 0)} - extraActionButtons={[ - , - ]} - options={[ - { - name: "subject", - label: "检查题目", - render: FORM_ITEM_RENDER_ENUM.RADIO, - items: INSPECTION_QUESTION_ENUM, - span: 24, - }, - { - name: "planType", - label: "计划属性", - render: FORM_ITEM_RENDER_ENUM.RADIO, - items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })), - span: planType === 0 ? 24 : 12, - componentProps: { disabled: query.planId }, - }, - { - name: "planId", - label: "计划名称", - render: FORM_ITEM_RENDER_ENUM.SELECT, - items: planList, - itemsField: { labelKey: "planName", valueKey: "id" }, - dependencies: ["planType"], - hidden: formValues => !(formValues.planType === 1), - componentProps: { disabled: query.planId }, - }, - { - name: ["personUnderInspection", "departmentId"], - label: "被检查单位", - render: ( - form.setFieldValue(["personUnderInspection", "departmentName"], label)} - onChange={() => { - form.setFieldValue(["personUnderInspection", "userId"], ""); - form.setFieldValue(["personUnderInspection", "userName"], ""); - }} - /> - ), - }, - { name: ["personUnderInspection", "departmentName"], label: "被检查单位名称", onlyForLabel: true }, - { - name: ["personUnderInspection", "userId"], - label: "被检查单位现场负责人", - render: ( - form.setFieldValue(["personUnderInspection", "userName"], label)} - /> - ), - formItemProps: { labelCol: { span: 8 } }, - }, - { name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true }, - { name: "place", label: "检查场所", span: 24 }, - { - name: "type", - label: "检查类型", - span: 8, - render: ( - form.setFieldValue("typeName", label)} - /> - ), - formItemProps: { labelCol: { span: 6 } }, - }, - { name: "typeName", label: "检查类型名称", onlyForLabel: true }, - { - name: "timeStart", - label: "检查开始时间", - span: 8, - render: FORM_ITEM_RENDER_ENUM.DATETIME, - formItemProps: { labelCol: { span: 6 } }, - }, - { - name: "timeEnd", - label: "检查结束时间", - span: 8, - render: FORM_ITEM_RENDER_ENUM.DATETIME, - formItemProps: { labelCol: { span: 6 } }, - rules: [validatorEndTime(timeStart)], - }, - { label: "检查人员", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, - { - name: "inspectorList", - span: 24, - render: FORM_ITEM_RENDER_ENUM.FORM_LIST, - formListUniqueProps: { - addButtonText: "添加检查人员", - options: field => ( - [ - { - name: [field.name, "departmentId"], - label: "检查人员部门", - render: ( - { - form.setFieldValue(["inspectorList", field.name, "userId"], ""); - form.setFieldValue(["inspectorList", field.name, "userName"], ""); - }} - onGetLabel={(label) => { - form.setFieldValue(["inspectorList", field.name, "departmentName"], label); - }} - /> - ), - }, - { name: [field.name, "departmentName"], label: "检查人员部门名称", onlyForLabel: true }, - { name: [field.name, "userName"], label: "检查人员名称", onlyForLabel: true }, - { - name: [field.name, "userId"], - label: "检查人员", - render: ( - form.setFieldValue(["inspectorList", field.name, "userName"], label)} - /> - ), - }, - ] - ), - }, - }, - { label: "检查情况", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, - { - name: "situationList", - span: 24, - render: FORM_ITEM_RENDER_ENUM.FORM_LIST, - formListUniqueProps: { - addButtonText: "添加检查情况", - options: field => ([ - { name: [field.name, "content"], label: "检查情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, - { name: [field.name, "deleteFiles"], label: "删除的图片", onlyForLabel: true }, + + onSubmit(values, 0)} + extraActionButtons={[ + , + ]} + options={[ + { + name: "subject", + label: "检查题目", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: INSPECTION_QUESTION_ENUM, + span: 24, + }, + { + name: "planType", + label: "计划属性", + render: FORM_ITEM_RENDER_ENUM.RADIO, + items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })), + span: planType === 0 ? 24 : 12, + componentProps: { disabled: query.planId }, + }, + { + name: "planId", + label: "计划名称", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: planList, + itemsField: { labelKey: "planName", valueKey: "id" }, + dependencies: ["planType"], + hidden: formValues => !(formValues.planType === 1), + componentProps: { disabled: query.planId }, + }, + { + name: ["personUnderInspection", "departmentId"], + label: "被检查单位", + render: ( + form.setFieldValue(["personUnderInspection", "departmentName"], label)} + onChange={() => { + form.setFieldValue(["personUnderInspection", "userId"], ""); + form.setFieldValue(["personUnderInspection", "userName"], ""); + }} + /> + ), + }, + { name: ["personUnderInspection", "departmentName"], label: "被检查单位名称", onlyForLabel: true }, + { + name: ["personUnderInspection", "userId"], + label: "被检查单位现场负责人", + render: ( + form.setFieldValue(["personUnderInspection", "userName"], label)} + /> + ), + formItemProps: { labelCol: { span: 8 } }, + }, + { name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true }, + { name: "place", label: "检查场所", span: 24 }, + { + name: "type", + label: "检查类型", + span: 8, + render: ( + form.setFieldValue("typeName", label)} + /> + ), + formItemProps: { labelCol: { span: 6 } }, + }, + { name: "typeName", label: "检查类型名称", onlyForLabel: true }, + { + name: "timeStart", + label: "检查开始时间", + span: 8, + render: FORM_ITEM_RENDER_ENUM.DATETIME, + formItemProps: { labelCol: { span: 6 } }, + }, + { + name: "timeEnd", + label: "检查结束时间", + span: 8, + render: FORM_ITEM_RENDER_ENUM.DATETIME, + formItemProps: { labelCol: { span: 6 } }, + rules: [validatorEndTime(timeStart)], + }, + { label: "检查人员", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, + { + name: "inspectorList", + span: 24, + render: FORM_ITEM_RENDER_ENUM.FORM_LIST, + formListUniqueProps: { + addButtonText: "添加检查人员", + options: field => ( + [ { - name: [field.name, "files"], - label: "图片", + name: [field.name, "departmentId"], + label: "检查人员部门", render: ( - { - form.setFieldValue( - ["situationList", field.name, "deleteFiles"], - [...(form.getFieldValue(["situationList", field.name, "deleteFiles"]) || []), file], - ); + { + form.setFieldValue(["inspectorList", field.name, "userId"], ""); + form.setFieldValue(["inspectorList", field.name, "userName"], ""); + }} + onGetLabel={(label) => { + form.setFieldValue(["inspectorList", field.name, "departmentName"], label); }} /> ), }, - ]), - }, + { name: [field.name, "departmentName"], label: "检查人员部门名称", onlyForLabel: true }, + { name: [field.name, "userName"], label: "检查人员名称", onlyForLabel: true }, + { + name: [field.name, "userId"], + label: "检查人员", + render: ( + form.setFieldValue(["inspectorList", field.name, "userName"], label)} + /> + ), + }, + ] + ), }, - { label: "发现问题", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, - { - key: "hiddenList", - customizeRender: true, - span: 24, - render: ( -
( - - )} - dataSource={hiddenList} - columns={[ - { title: "问题描述", dataIndex: "hiddenDesc" }, - { - title: "操作", - width: 120, - render: (_, record, index) => ( - - - - - ), - }, - ]} - /> - ), + /> + ), + }, + ]), }, - { name: ["initiator", "userRemarks"], label: "检查人意见", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, - { - name: ["initiator", "signature"], - label: "检查人", - span: 24, - required: false, - rules: [{ required: true, message: "请签名" }], - render: ( - { - const signature = form.getFieldValue(["initiator", "signature"]); - if (query.id && typeof signature === "string") { - form.setFieldValue("deleteSignature", signature); - } - form.setFieldValue(["initiator", "signature"], value.file); - form.setFieldValue(["initiator", "signatureTime"], value.time); - }} - /> - ), - }, - { name: ["initiator", "signatureTime"], label: "签字时间", onlyForLabel: true }, - { name: "deleteSignature", label: "删除的签字图片", onlyForLabel: true }, - ]} - /> - + }, + { label: "发现问题", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, + { + key: "hiddenList", + customizeRender: true, + span: 24, + render: ( +
( + + )} + dataSource={hiddenList} + columns={[ + { title: "问题描述", dataIndex: "hiddenDesc" }, + { + title: "操作", + width: 120, + render: (_, record, index) => ( + + + + + ), + }, + ]} + /> + ), + }, + { name: ["initiator", "userRemarks"], label: "检查人意见", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, + { + name: ["initiator", "signature"], + label: "检查人", + span: 24, + required: false, + rules: [{ required: true, message: "请签名" }], + render: ( + { + const signature = form.getFieldValue(["initiator", "signature"]); + if (query.id && typeof signature === "string") { + form.setFieldValue("deleteSignature", signature); + } + form.setFieldValue(["initiator", "signature"], value.file); + form.setFieldValue(["initiator", "signatureTime"], value.time); + }} + /> + ), + }, + { name: ["initiator", "signatureTime"], label: "签字时间", onlyForLabel: true }, + { name: "deleteSignature", label: "删除的签字图片", onlyForLabel: true }, + ]} + /> { hiddenAddModalOpen && ( ) } - + ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js b/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js index 4e1424f..088aa3c 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js @@ -4,6 +4,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form, Space } from "antd"; import { useState } from "react"; import AddIcon from "zy-react-library/components/Icon/AddIcon"; +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"; @@ -34,7 +35,7 @@ function List(props) { }); return ( -
+ ) } -
+ ); } diff --git a/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js b/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js index 99e8fff..53b3504 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js @@ -3,6 +3,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form, message, Modal, Space } from "antd"; import { useState } from "react"; import FormBuilder from "zy-react-library/components/FormBuilder"; +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"; @@ -29,7 +30,7 @@ function List(props) { }); return ( -
+ )} -
+ ); } @@ -125,20 +126,21 @@ function VerifyModalComponent(props) { return ( + { const exportParams = getUrlCriteriaQuery("searchFormKeys", "searchFormValues"); - await downloadBlob("/accident/accident/export", { params: { ...exportParams, eqType: props.type } }) + await downloadBlob("/accident/accident/export", { params: { ...exportParams, eqType: props.type } }); }} > 导出 @@ -228,7 +229,7 @@ function List(props) { /> ) } - + ); } diff --git a/src/pages/Container/BranchCompany/InspectionView/index.js b/src/pages/Container/BranchCompany/InspectionView/index.js index c901b2a..1662047 100644 --- a/src/pages/Container/BranchCompany/InspectionView/index.js +++ b/src/pages/Container/BranchCompany/InspectionView/index.js @@ -2,14 +2,13 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Descriptions, Divider, Modal, Space, Spin } from "antd"; import { useEffect, useRef, useState } from "react"; import { useReactToPrint } from "react-to-print"; -import HeaderBack from "zy-react-library/components/HeaderBack"; import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; +import Page from "zy-react-library/components/Page"; import PreviewImg from "zy-react-library/components/PreviewImg"; import Table from "zy-react-library/components/Table"; import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; import useGetFile from "zy-react-library/hooks/useGetFile"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; -import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo"; import { getFileUrl, getLabelName } from "zy-react-library/utils"; import HiddenFlowModal from "~/components/HiddenFlowModal"; import { PLAN_ENUM } from "~/enumerate/constant"; @@ -19,7 +18,6 @@ import "./index.less"; function InspectionView(props) { const query = useGetUrlQuery(); const { loading: getFileLoading, getFile } = useGetFile(); - const { getUserInfo } = useGetUserInfo(); const [info, setInfo] = useState({ inspectedPartyConfirmation: {}, @@ -53,7 +51,6 @@ function InspectionView(props) { }); const getData = async () => { - const userInfo = await getUserInfo(); const { data } = await props["inspectionView"]({ inspectionId: query.id }); for (let i = 0; i < data.content.length; i++) { const files = await getFile({ @@ -62,12 +59,12 @@ function InspectionView(props) { }); data.content[i].files = files; } - data.inspector.forEach(item => { - setCurrentInspectorDepartmentName(prev => [...prev, item.departmentName || ""]) - }) - data.inspectorVerificationList.forEach(item => { - setCurrentInspectorUserName(prev => [...prev, item.userName || ""]) - }) + data.inspector.forEach((item) => { + setCurrentInspectorDepartmentName(prev => [...prev, item.departmentName || ""]); + }); + data.inspectorVerificationList.forEach((item) => { + setCurrentInspectorUserName(prev => [...prev, item.userName || ""]); + }); setInfo(data); const { data: hiddenList } = await props["hiddenList"]({ foreignKey: query.inspectionId, pageIndex: 1, pageSize: 999 }); setHiddenList(hiddenList); @@ -77,10 +74,9 @@ function InspectionView(props) { }, []); return ( -
- + -
+
{info.subject} 现场安全检查记录 @@ -127,7 +123,8 @@ function InspectionView(props) { { title: "隐患描述", dataIndex: "hiddenDesc" }, { title: "隐患部位", dataIndex: "hiddenPartName" }, { - title: "操作", render: (_, record) => ( + title: "操作", + render: (_, record) => (
+ ); } diff --git a/src/pages/Container/BranchCompany/Plan/Execute/InspectionRecords/index.js b/src/pages/Container/BranchCompany/Plan/Execute/InspectionRecords/index.js index e31b9f1..67ec78d 100644 --- a/src/pages/Container/BranchCompany/Plan/Execute/InspectionRecords/index.js +++ b/src/pages/Container/BranchCompany/Plan/Execute/InspectionRecords/index.js @@ -1,15 +1,7 @@ -import HeaderBack from "zy-react-library/components/HeaderBack"; import InspectionList from "../../../Inspection/Inspection/List"; function InspectionRecords(props) { - return ( -
- -
- -
-
- ); + return (); } export default InspectionRecords; diff --git a/src/pages/Container/BranchCompany/Plan/Execute/List/index.js b/src/pages/Container/BranchCompany/Plan/Execute/List/index.js index 90855df..c060357 100644 --- a/src/pages/Container/BranchCompany/Plan/Execute/List/index.js +++ b/src/pages/Container/BranchCompany/Plan/Execute/List/index.js @@ -3,6 +3,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form, Modal, Space } from "antd"; import dayjs from "dayjs"; import { useState } from "react"; +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"; @@ -21,7 +22,7 @@ function List(props) { }); return ( -
+ ) } -
+ ); } @@ -144,14 +145,14 @@ const PlanExecutionPersonnelModalComponent = (props) => { title="计划执行人员" open maskClosable={false} - width={1000} + width={800} onCancel={props.onCancel} footer={[ , ]} > }, { name: "userName", label: "人员" }, diff --git a/src/pages/Container/BranchCompany/Plan/Management/List/index.js b/src/pages/Container/BranchCompany/Plan/Management/List/index.js index f202567..057b5b2 100644 --- a/src/pages/Container/BranchCompany/Plan/Management/List/index.js +++ b/src/pages/Container/BranchCompany/Plan/Management/List/index.js @@ -5,6 +5,7 @@ import dayjs from "dayjs"; import { useEffect, useState } from "react"; import FormBuilder from "zy-react-library/components/FormBuilder"; import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import Page from "zy-react-library/components/Page"; import Search from "zy-react-library/components/Search"; import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj"; import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary"; @@ -49,7 +50,7 @@ function List(props) { }; return ( -
+ )} -
+ ); } @@ -271,17 +272,18 @@ const AddModalComponent = (props) => { return ( - -
- 计划信息 - - 人员执行详情 -
(`自${record.timeStart}至${record.timeEnd}止`) }, - { - title: "检查状态", - dataIndex: "status", - render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })), - }, - { title: "发现隐患数", dataIndex: "hiddenNumber" }, - { - title: "操作", - fixed: "right", - width: 100, - render: (_, record) => ( - - - - ), - }, - ]} - disabledResizer={true} - options={false} - {...tableProps} - /> - - + + 计划信息 + + 人员执行详情 +
(`自${record.timeStart}至${record.timeEnd}止`) }, + { + title: "检查状态", + dataIndex: "status", + render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })), + }, + { title: "发现隐患数", dataIndex: "hiddenNumber" }, + { + title: "操作", + fixed: "right", + width: 100, + render: (_, record) => ( + + + + ), + }, + ]} + disabledResizer={true} + options={false} + {...tableProps} + /> + ); } diff --git a/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js b/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js index 4da9d35..cfb759b 100644 --- a/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js +++ b/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js @@ -1,6 +1,6 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form } from "antd"; -import HeaderBack from "zy-react-library/components/HeaderBack"; +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 Table from "zy-react-library/components/Table"; @@ -17,48 +17,45 @@ function PersonnelExecutionRecords(props) { }); return ( -
- -
- }, - { name: "userName", label: "人员" }, - ]} - form={form} - onFinish={getData} - /> -
(`${record.actualExecCount}/${record.planExecuteNum}`), - }, - { - title: "操作", - fixed: "right", - width: 150, - render: (_, record) => ( - - ), - }, - ]} - {...tableProps} - /> - - + + }, + { name: "userName", label: "人员" }, + ]} + form={form} + onFinish={getData} + /> +
(`${record.actualExecCount}/${record.planExecuteNum}`), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + ), + }, + ]} + {...tableProps} + /> + ); } diff --git a/src/pages/Container/BranchCompany/Plan/Management/PlanExecutionDetails/index.js b/src/pages/Container/BranchCompany/Plan/Management/PlanExecutionDetails/index.js index 1632e09..bb49e66 100644 --- a/src/pages/Container/BranchCompany/Plan/Management/PlanExecutionDetails/index.js +++ b/src/pages/Container/BranchCompany/Plan/Management/PlanExecutionDetails/index.js @@ -1,6 +1,6 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Divider, Space } from "antd"; -import HeaderBack from "zy-react-library/components/HeaderBack"; +import Page from "zy-react-library/components/Page"; import Table from "zy-react-library/components/Table"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useTable from "zy-react-library/hooks/useTable"; @@ -16,52 +16,49 @@ function PlanExecutionDetails(props) { }); return ( -
- -
- 计划信息 - - 计划执行详情 -
(`自${record.timeStart}至${record.timeEnd}止`) }, - { - title: "检查状态", - dataIndex: "status", - render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })), - }, - { title: "发现隐患数", dataIndex: "hiddenNumber" }, - { - title: "操作", - fixed: "right", - width: 100, - render: (_, record) => ( - - - - ), - }, - ]} - disabledResizer={true} - options={false} - {...tableProps} - /> - - + + 计划信息 + + 计划执行详情 +
(`自${record.timeStart}至${record.timeEnd}止`) }, + { + title: "检查状态", + dataIndex: "status", + render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })), + }, + { title: "发现隐患数", dataIndex: "hiddenNumber" }, + { + title: "操作", + fixed: "right", + width: 100, + render: (_, record) => ( + + + + ), + }, + ]} + disabledResizer={true} + options={false} + {...tableProps} + /> + ); } diff --git a/src/pages/Container/Supervision/HiddenView/index.js b/src/pages/Container/Supervision/HiddenView/index.js index 41db77d..aa91bb4 100644 --- a/src/pages/Container/Supervision/HiddenView/index.js +++ b/src/pages/Container/Supervision/HiddenView/index.js @@ -1,10 +1,11 @@ import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; +import Page from "zy-react-library/components/Page"; function HiddenView() { return ( -
+ -
+ ); } diff --git a/src/pages/Container/Supervision/Plan/Execute/InspectionRecords/index.js b/src/pages/Container/Supervision/Plan/Execute/InspectionRecords/index.js index 5b58234..224fe38 100644 --- a/src/pages/Container/Supervision/Plan/Execute/InspectionRecords/index.js +++ b/src/pages/Container/Supervision/Plan/Execute/InspectionRecords/index.js @@ -1,15 +1,7 @@ -import HeaderBack from "zy-react-library/components/HeaderBack"; import InspectionList from "../../../Inspection/Inspection/List"; function InspectionRecords(props) { - return ( -
- -
- -
-
- ); + return (); } export default InspectionRecords; diff --git a/src/pages/Container/Supervision/Plan/ViewInfo/index.js b/src/pages/Container/Supervision/Plan/ViewInfo/index.js index a4c514d..25a24c8 100644 --- a/src/pages/Container/Supervision/Plan/ViewInfo/index.js +++ b/src/pages/Container/Supervision/Plan/ViewInfo/index.js @@ -1,9 +1,7 @@ import ViewInfoA from "~/pages/Container/BranchCompany/Plan/ViewInfo"; function ViewInfo(props) { - return ( - - ); + return (); } export default ViewInfo; diff --git a/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js b/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js new file mode 100644 index 0000000..447f910 --- /dev/null +++ b/src/pages/Container/Supervision/Statistics/InspectionRecordsList/index.js @@ -0,0 +1,7 @@ +import RecordsList from "~/pages/Container/Supervision/Inspection/Records/List"; + +function InspectionRecordsList(props) { + return ; +} + +export default InspectionRecordsList; diff --git a/src/pages/Container/Supervision/Statistics/List/index.js b/src/pages/Container/Supervision/Statistics/List/index.js index 886cf98..2c8308d 100644 --- a/src/pages/Container/Supervision/Statistics/List/index.js +++ b/src/pages/Container/Supervision/Statistics/List/index.js @@ -1,6 +1,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Form } from "antd"; import dayjs from "dayjs"; +import Page from "zy-react-library/components/Page"; import Search from "zy-react-library/components/Search"; import Table from "zy-react-library/components/Table"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; @@ -39,7 +40,7 @@ function List(props) { }); return ( -
+ { const dates = getDate(); - props.history.push(`../plan/management/list?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics`); + props.history.push(`./planList?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics&headerTitle=计划总数`); }} > {record.planTotal} @@ -86,7 +87,7 @@ function List(props) { type="link" onClick={() => { const dates = getDate(); - props.history.push(`../plan/management/list?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics&completedOnly=1`); + props.history.push(`./planList?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics&completedOnly=1&headerTitle=已完成计划数`); }} > {record.completedPlanCount} @@ -106,7 +107,7 @@ function List(props) { type="link" onClick={() => { const dates = getDate(); - props.history.push(`../inspection/records/list?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics`); + props.history.push(`./inspectionRecordsList?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&headerTitle=检查总数`); }} > {record.inspectionTotal} @@ -121,7 +122,7 @@ function List(props) { type="link" onClick={() => { const dates = getDate(); - props.history.push(`../inspection/records/list?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=1`); + props.history.push(`./inspectionRecordsList?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=1&headerTitle=计划内检查数`); }} > {record.planInCount} @@ -136,7 +137,7 @@ function List(props) { type="link" onClick={() => { const dates = getDate(); - props.history.push(`../inspection/records/list?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=0`); + props.history.push(`./inspectionRecordsList?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=0&headerTitle=计划外检查数`); }} > {record.planOutCount} @@ -148,7 +149,7 @@ function List(props) { ]} {...tableProps} /> -
+ ); } diff --git a/src/pages/Container/Supervision/Statistics/PlanList/index.js b/src/pages/Container/Supervision/Statistics/PlanList/index.js new file mode 100644 index 0000000..3684393 --- /dev/null +++ b/src/pages/Container/Supervision/Statistics/PlanList/index.js @@ -0,0 +1,7 @@ +import ManagementList from "~/pages/Container/Supervision/Plan/Management/List"; + +function PlanList(props) { + return ; +} + +export default PlanList;