From e91eabcd5598782c5fd7642264f1fce0d2cd4b47 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Wed, 7 Jan 2026 09:55:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(inspection):=20=E4=BF=AE=E5=A4=8D=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E5=92=8C=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E6=89=A7=E8=A1=8C=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复检查时间查询时添加了正确的开始和结束时间格式 (00:00:00 和 23:59:59) - 修复检查时间显示时添加了空值判断,避免显示异常 - 修复检查人员显示时添加了联系电话信息 - 移除了检查视图页面的打印按钮 - 修复计划执行详情页面跳转时传递了正确的类型参数 - 修复计划管理页面的查询参数传递和格式化问题 - 优化了计划执行记录页面的部门选择器配置 - 修复了计划状态判断逻辑和相关显示问题 - 添加了计划管理页面的权限控制参数传递 --- jjb.config.js | 8 +- .../Inspection/Acceptance/List/index.js | 6 +- .../Inspection/Assign/List/index.js | 6 +- .../Inspection/Defense/List/index.js | 46 +++--- .../Inspection/Inspected/List/index.js | 8 +- .../Inspection/Inspection/Add/index.js | 4 + .../Inspection/Inspection/List/index.js | 6 +- .../Inspection/Inspector/List/index.js | 6 +- .../Inspection/Records/List/index.js | 6 +- .../BranchCompany/InspectionView/index.js | 4 +- .../BranchCompany/Plan/Execute/List/index.js | 2 +- .../Plan/Management/List/index.js | 132 +++++++++--------- .../PersonnelExecutionDetails/index.js | 4 +- .../PersonnelExecutionRecords/index.js | 28 ++-- .../Management/PlanExecutionDetails/index.js | 2 +- .../PersonnelExecutionDetails/index.js | 2 +- 16 files changed, 142 insertions(+), 128 deletions(-) diff --git a/jjb.config.js b/jjb.config.js index 6b9539b..764f1e2 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -9,8 +9,8 @@ module.exports = { // 应用后端分支名称,部署上线需要 javaGitBranch: "", // 接口服务地址 - // API_HOST: "http://192.168.20.100:30140", - API_HOST: "https://gbs-gateway.qhdsafety.com", + API_HOST: "http://192.168.20.100:30140", + // API_HOST: "https://gbs-gateway.qhdsafety.com", }, production: { // 应用后端分支名称,部署上线需要 @@ -25,8 +25,8 @@ module.exports = { contextInject: { // 应用Key appKey: "", - // fileUrl: "http://192.168.20.240:9787/mnt/", - fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", + fileUrl: "http://192.168.20.240:9787/mnt/", + // fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", }, // public/index.html注入全局变量 windowInject: { diff --git a/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js b/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js index 4df280a..8c42cba 100644 --- a/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Acceptance/List/index.js @@ -16,8 +16,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "400" }, }); @@ -51,7 +51,7 @@ function List(props) { { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, { title: "检查类型", dataIndex: "typeName" }, - { title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", render: () => "待验收" }, { title: "发现隐患数", dataIndex: "hiddenNumber" }, { diff --git a/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js b/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js index 773e138..b04f089 100644 --- a/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Assign/List/index.js @@ -16,8 +16,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "301" }, }); @@ -51,7 +51,7 @@ function List(props) { { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, { title: "检查类型", dataIndex: "typeName" }, - { title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", render: () => "待指派" }, { title: "发现隐患数", dataIndex: "hiddenNumber" }, { diff --git a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js index 237be35..f330607 100644 --- a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js @@ -28,8 +28,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "700" }, }); @@ -64,7 +64,7 @@ function List(props) { { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, { title: "检查类型", dataIndex: "typeName" }, - { title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", render: () => "被检查单位负责人申辩" }, { title: "发现隐患数", dataIndex: "hiddenNumber" }, { @@ -263,27 +263,31 @@ function DefenseRecordModalComponent(props) { columns={[ { title: "申辩时间", dataIndex: "createTime", width: 200 }, { title: "申辩描述", dataIndex: "content" }, - { title: "申辩状态", dataIndex: "isPass", render: (_, record) => ( - <> -
{record.isPass === 0 && "未审批"}
-
{record.isPass === 1 && "通过"}
-
{record.isPass === 2 && "未通过"}
- - ) }, + { + title: "申辩状态", dataIndex: "isPass", render: (_, record) => ( + <> +
{record.isPass === 0 && "未审批"}
+
{record.isPass === 1 && "通过"}
+
{record.isPass === 2 && "未通过"}
+ + ) + }, { title: "签字图片", dataIndex: "signature", render: (_, record) => (record.signature && ) }, { title: "申辩附件名称", dataIndex: "name", width: 200, render: (_, record) => record.files?.[0]?.fileName || "无" }, - { title: "申辩附件", dataIndex: "url", render: (_, record) => ( - record.files?.[0]?.filePath && ( - + { + title: "申辩附件", dataIndex: "url", render: (_, record) => ( + record.files?.[0]?.filePath && ( + + ) ) - ) }, + }, { title: "检查人签字", dataIndex: "checkSign", render: (_, record) => (record.checkSign && ) }, { title: "检查人意见", dataIndex: "checkRemarks" }, { title: "审批时间", dataIndex: "checkSignTime", width: 200 }, diff --git a/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js b/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js index a5b1e14..d965d5a 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspected/List/index.js @@ -25,8 +25,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "300" }, }); @@ -60,7 +60,7 @@ function List(props) { { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, { title: "检查类型", dataIndex: "typeName" }, - { title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", render: () => "待确认" }, { title: "发现隐患数", dataIndex: "hiddenNumber" }, { @@ -158,7 +158,7 @@ function ConfirmModalComponent(props) { label: "是否申辩", render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: "2", name: "是" }, { bianma: "1", name: "否" }], - componentProps:{ + componentProps: { disabled: props.hiddenNumber === 0, } }, diff --git a/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js b/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js index fb83636..a6327bc 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js @@ -320,6 +320,8 @@ function Add(props) { values={{ planType: query.planId ? 1 : 0, planId: query.planId, + type:query.type, + typeName:query.typeName, situationList: [{ content: undefined }], }} loading={deleteFileLoading || getFileLoading || uploadFileLoading || props.inspection.inspectionLoading} @@ -399,6 +401,7 @@ function Add(props) { dictValue="inspectionType" onlyLastLevel onGetLabel={label => form.setFieldValue("typeName", label)} + disabled={!!query.planId} /> ), formItemProps: { labelCol: { span: 6 } }, @@ -433,6 +436,7 @@ function Add(props) { label: "检查人员部门", render: ( { form.setFieldValue(["inspectorList", field.name, "userId"], ""); form.setFieldValue(["inspectorList", field.name, "userName"], ""); diff --git a/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js b/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js index 056629f..13d85c5 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspection/List/index.js @@ -28,8 +28,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "", planId: query.planId, entrance: query.planId ? "2" : "1", planType: query.planId ? 1 : 0 }, }); @@ -63,7 +63,7 @@ function List(props) { type="primary" icon={} onClick={() => { - props.history.push(`./add?planId=${query.planId || ""}`); + props.history.push(`./add?planId=${query.planId || ""}&type=${query.type || ""}&typeName=${query.typeName || ""}`); }} > 新增 diff --git a/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js b/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js index 53b3504..2b4ddc6 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspector/List/index.js @@ -23,8 +23,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "200" }, }); @@ -58,7 +58,7 @@ function List(props) { { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, { title: "检查类型", dataIndex: "typeName" }, - { title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", render: () => "待核实" }, { title: "发现隐患数", dataIndex: "hiddenNumber" }, { diff --git a/src/pages/Container/BranchCompany/Inspection/Records/List/index.js b/src/pages/Container/BranchCompany/Inspection/Records/List/index.js index e333bb6..78820c0 100644 --- a/src/pages/Container/BranchCompany/Inspection/Records/List/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Records/List/index.js @@ -39,8 +39,8 @@ function List(props) { const { tableProps, getData } = useTable(props["inspectionList"], { form, transform: formData => ({ - checkStartTime: formData.checkTime?.[0], - checkEndTime: formData.checkTime?.[1], + checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "", + checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "", }), params: { status: "", @@ -169,7 +169,7 @@ function List(props) { { title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" }, { title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 }, { title: "检查类型", dataIndex: "typeName" }, - { title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", diff --git a/src/pages/Container/BranchCompany/InspectionView/index.js b/src/pages/Container/BranchCompany/InspectionView/index.js index bbd4f5a..e4ab9a1 100644 --- a/src/pages/Container/BranchCompany/InspectionView/index.js +++ b/src/pages/Container/BranchCompany/InspectionView/index.js @@ -61,7 +61,7 @@ function InspectionView(props) { } } data.inspectorVerificationList.forEach((item) => { - setCurrentInspectorUserName(prev => [...prev, item.userName || ""]); + setCurrentInspectorUserName(prev => [...prev, `${item.userName}(${item.phone})` || ""]); }); setInfo(data); const { data: hiddenList } = await props["hiddenList"]({ foreignKey: query.inspectionId, pageIndex: 1, pageSize: 999 }); @@ -72,7 +72,7 @@ function InspectionView(props) { }, []); return ( - 打印}> +
diff --git a/src/pages/Container/BranchCompany/Plan/Execute/List/index.js b/src/pages/Container/BranchCompany/Plan/Execute/List/index.js index ffd606e..5ff8412 100644 --- a/src/pages/Container/BranchCompany/Plan/Execute/List/index.js +++ b/src/pages/Container/BranchCompany/Plan/Execute/List/index.js @@ -99,7 +99,7 @@ function List(props) { , ]} > - + ); }; diff --git a/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionDetails/index.js b/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionDetails/index.js index dbd671a..78e87d6 100644 --- a/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionDetails/index.js +++ b/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionDetails/index.js @@ -16,7 +16,7 @@ function PersonnelExecutionDetails(props) { return ( 计划信息 - + 人员执行详情 (`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", diff --git a/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js b/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js index cfb759b..0b8eee0 100644 --- a/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js +++ b/src/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionRecords/index.js @@ -1,37 +1,41 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Form } from "antd"; +import {Connect} from "@cqsjjb/jjb-dva-runtime"; +import {Button, Form} 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 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_PLAN } from "~/enumerate/namespace"; +import {NS_PLAN} from "~/enumerate/namespace"; function PersonnelExecutionRecords(props) { const query = useGetUrlQuery(); const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["planUserList"], { + const {tableProps, getData} = useTable(props["planUserList"], { form, - params: { planId: query.planId }, + params: {planId: query.planId}, }); return ( - + }, - { name: "userName", label: "人员" }, + { + name: "departmentId", + label: "部门", + render: + }, + {name: "userName", label: "人员"}, ]} form={form} onFinish={getData} />
(`自${record.timeStart}至${record.timeEnd}止`) }, + { title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") }, { title: "检查状态", dataIndex: "status", diff --git a/src/pages/Container/Supervision/Plan/Management/PersonnelExecutionDetails/index.js b/src/pages/Container/Supervision/Plan/Management/PersonnelExecutionDetails/index.js index 902958a..6b466b7 100644 --- a/src/pages/Container/Supervision/Plan/Management/PersonnelExecutionDetails/index.js +++ b/src/pages/Container/Supervision/Plan/Management/PersonnelExecutionDetails/index.js @@ -1,7 +1,7 @@ import PersonnelExecutionDetailsA from "~/pages/Container/BranchCompany/Plan/Management/PersonnelExecutionDetails"; function PersonnelExecutionDetails(props) { - return ; + return ; } export default PersonnelExecutionDetails;