From f4c8a67d8858cae82f43f3855286e0a81d249792 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Wed, 8 Apr 2026 17:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DisclaimerSign/index.js | 60 ++++++ src/components/OpinionSign/index.js | 46 +++++ src/components/SafetyMeasures/index.js | 75 ++++++++ src/css/index.less | 31 ++-- .../BlindBoardWork/Homework/View/index.js | 172 +++++------------- .../ConfinedSpaceWork/Homework/View/index.js | 2 - .../Enterprise/CutWork/Homework/View/index.js | 171 +++++------------ .../Enterprise/DigWork/Homework/View/index.js | 171 +++++------------ .../ElectricWork/Homework/View/index.js | 171 +++++------------ .../HighPlaceWork/Homework/View/index.js | 171 +++++------------ .../Enterprise/HotWork/Homework/View/index.js | 116 ++++-------- .../LiftingWork/Homework/View/index.js | 171 +++++------------ 12 files changed, 526 insertions(+), 831 deletions(-) create mode 100644 src/components/DisclaimerSign/index.js create mode 100644 src/components/OpinionSign/index.js create mode 100644 src/components/SafetyMeasures/index.js diff --git a/src/components/DisclaimerSign/index.js b/src/components/DisclaimerSign/index.js new file mode 100644 index 0000000..c6087c1 --- /dev/null +++ b/src/components/DisclaimerSign/index.js @@ -0,0 +1,60 @@ +import { Image } from "antd"; +import { getFileUrl } from "zy-react-library/utils"; + +function DisclaimerSign({ + colSpan, + firstColSpan, + lastColSpan, + safetyRemarks, + safetySignPath, + safetySignTime, + AcceptRemarks, + AcceptSignPath, + AcceptSignTime, +}) { + const showFirst = safetyRemarks || safetySignPath || safetySignTime; + const showLast = AcceptRemarks || AcceptSignPath || AcceptSignTime; + + return ( + + { + showFirst && ( + +
+
+ 安全交底人: + {safetyRemarks} +
+
+
+ {safetySignPath && } +
+
{safetySignTime}
+
+
+ + ) + } + { + showLast && ( + +
+
+ 接受交底人: + {AcceptRemarks} +
+
+
+ {AcceptSignPath && } +
+
{AcceptSignTime}
+
+
+ + ) + } + + ); +} + +export default DisclaimerSign; diff --git a/src/components/OpinionSign/index.js b/src/components/OpinionSign/index.js new file mode 100644 index 0000000..2d1bd8a --- /dev/null +++ b/src/components/OpinionSign/index.js @@ -0,0 +1,46 @@ +import { Image } from "antd"; +import { Fragment } from "react"; +import { getFileUrl } from "zy-react-library/utils"; + +function OpinionSign({ + title, + colSpan, + remarks, + signPath, + signTime, +}) { + const show = signPath || remarks || signTime; + + return ( + + { + show && ( + + +
+
+ + {title} + : + + {remarks} +
+
+
+ 签字: + + {signPath && } + + {signTime} +
+
+
+ + + ) + } +
+ ); +} + +export default OpinionSign; diff --git a/src/components/SafetyMeasures/index.js b/src/components/SafetyMeasures/index.js new file mode 100644 index 0000000..ff2b5a8 --- /dev/null +++ b/src/components/SafetyMeasures/index.js @@ -0,0 +1,75 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Image } from "antd"; +import { useEffect, useState } from "react"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import { getFileUrl } from "zy-react-library/utils"; +import { NS_EIGHTWORK } from "~/enumerate/namespace"; + +function SafetyMeasures(props) { + const query = useGetUrlQuery(); + + const [safetyMeasures, setSafetyMeasures] = useState([]); + const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); + + const getData = async () => { + const { data } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); + setSafetyMeasures(data.filter(item => item.type === 1)); + setOtherSafetyMeasures(data.filter(item => item.type === 2)); + }; + + useEffect(() => { + getData(); + }, []); + + return ( + + + + + + + + + + + {safetyMeasures.map((item, index) => ( + + + + + + + ))} + { + otherSafetyMeasures.length > 0 && ( + + + + + ) + } + +
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 + {item.signPath && } +
{safetyMeasures.length + 1} + { + otherSafetyMeasures.map((item, index) => ( +
+
+ 其它安全措施: + {item.content} +
+
+ 编制人: + {item.createName} +
+
+ )) + } +
+ + + ); +} + +export default Connect([NS_EIGHTWORK], true)(SafetyMeasures); diff --git a/src/css/index.less b/src/css/index.less index e125fe2..eeb71ac 100644 --- a/src/css/index.less +++ b/src/css/index.less @@ -7,21 +7,28 @@ th, td { border: 1px solid #ddd; padding: 8px; + } - &.title{ - font-weight: 600; - color: #333; - background-color: #f2f2f2; - width: 200px; - } + .title{ + font-weight: 600; + color: #333; + background-color: #f2f2f2; + width: 200px; + } - &.center { - text-align: center; - } + .center { + text-align: center; + } - &.right { - text-align: right; - } + .right { + text-align: right; + } + + .flex { + display: flex; + justify-content: space-between; + align-items: center; + gap: 10px; } } } diff --git a/src/pages/Container/Enterprise/BlindBoardWork/Homework/View/index.js b/src/pages/Container/Enterprise/BlindBoardWork/Homework/View/index.js index 0901e0b..786a212 100644 --- a/src/pages/Container/Enterprise/BlindBoardWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/BlindBoardWork/Homework/View/index.js @@ -6,6 +6,9 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import DisclaimerSign from "~/components/DisclaimerSign"; +import OpinionSign from "~/components/OpinionSign"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,15 +32,10 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const getData = async () => { const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id }); setInfo(basicInfo); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -157,124 +155,52 @@ function View(props) { 实际作业开始时间 {info?.info?.workStartTime} - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - - - 安全交底人 - -
- {info?.info?.step_18?.signPath - && } -
-
{info?.info?.step_18?.signTime}
-
{info?.info?.step_18?.remarks}
- - 接受交底人 - -
- {info?.info?.step_19?.signPath - && } -
-
{info?.info?.step_19?.signTime}
-
{info?.info?.step_19?.remarks}
- - - - 作业负责人意见 - -
- {info?.info?.step_21?.signPath - && } -
-
{info?.info?.step_21?.signTime}
-
{info?.info?.step_21?.remarks}
- - - - 所在单位意见 - -
- {info?.info?.step_22?.signPath - && } -
-
{info?.info?.step_22?.signTime}
-
{info?.info?.step_22?.remarks}
- - - - 审核部门意见 - -
- {info?.info?.step_23?.signPath - && } -
-
{info?.info?.step_23?.signTime}
-
{info?.info?.step_23?.remarks}
- - - - 审批部门意见 - -
- {info?.info?.step_24?.signPath - && } -
-
{info?.info?.step_24?.signTime}
-
{info?.info?.step_24?.remarks}
- - - - 完工验收 - -
- {info?.info?.step_25?.signPath - && } -
-
{info?.info?.step_25?.signTime}
-
{info?.info?.step_25?.remarks}
- - + + + + + + + diff --git a/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/View/index.js b/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/View/index.js index 3f3ab13..edc889e 100644 --- a/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/View/index.js @@ -30,7 +30,6 @@ function View(props) { const [info, setInfo] = useState({}); const [safetyMeasures, setSafetyMeasures] = useState([]); const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); - // const [delayedMonitoringRecord, setDelayedMonitoringRecord] = useState([]); const [gasMonitoringRecord, setGasMonitoringRecord] = useState([]); const getData = async () => { @@ -41,7 +40,6 @@ function View(props) { pageSize: 999, pageIndex: 1, }); - // setDelayedMonitoringRecord(supplementaryInfo.filter(item => item.type === "delay")); setGasMonitoringRecord(supplementaryInfo.filter(item => item.type === "gas")); const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); diff --git a/src/pages/Container/Enterprise/CutWork/Homework/View/index.js b/src/pages/Container/Enterprise/CutWork/Homework/View/index.js index 7ecd510..49ed02b 100644 --- a/src/pages/Container/Enterprise/CutWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/CutWork/Homework/View/index.js @@ -6,6 +6,9 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import DisclaimerSign from "~/components/DisclaimerSign"; +import OpinionSign from "~/components/OpinionSign"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,15 +32,10 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const getData = async () => { const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id }); setInfo(basicInfo); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -141,124 +139,51 @@ function View(props) { 实际作业开始时间 {info?.info?.workStartTime} - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - - - 安全交底人 - -
- {info?.info?.step_18?.signPath - && } -
-
{info?.info?.step_18?.signTime}
-
{info?.info?.step_18?.remarks}
- - 接受交底人 - -
- {info?.info?.step_19?.signPath - && } -
-
{info?.info?.step_19?.signTime}
-
{info?.info?.step_19?.remarks}
- - - - 作业负责人意见 - -
- {info?.info?.step_21?.signPath - && } -
-
{info?.info?.step_21?.signTime}
-
{info?.info?.step_21?.remarks}
- - - - 所在单位意见 - -
- {info?.info?.step_22?.signPath - && } -
-
{info?.info?.step_22?.signTime}
-
{info?.info?.step_22?.remarks}
- - - - 审核部门意见 - -
- {info?.info?.step_23?.signPath - && } -
-
{info?.info?.step_23?.signTime}
-
{info?.info?.step_23?.remarks}
- - - - 审批部门意见 - -
- {info?.info?.step_24?.signPath - && } -
-
{info?.info?.step_24?.signTime}
-
{info?.info?.step_24?.remarks}
- - - - 完工验收 - -
- {info?.info?.step_25?.signPath - && } -
-
{info?.info?.step_25?.signTime}
-
{info?.info?.step_25?.remarks}
- - + + + + + + + diff --git a/src/pages/Container/Enterprise/DigWork/Homework/View/index.js b/src/pages/Container/Enterprise/DigWork/Homework/View/index.js index 3dd2cc5..f880fea 100644 --- a/src/pages/Container/Enterprise/DigWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/DigWork/Homework/View/index.js @@ -6,6 +6,9 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import DisclaimerSign from "~/components/DisclaimerSign"; +import OpinionSign from "~/components/OpinionSign"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,15 +32,10 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const getData = async () => { const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id }); setInfo(basicInfo); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -141,124 +139,51 @@ function View(props) { 实际作业开始时间 {info?.info?.workStartTime} - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - - - 安全交底人 - -
- {info?.info?.step_18?.signPath - && } -
-
{info?.info?.step_18?.signTime}
-
{info?.info?.step_18?.remarks}
- - 接受交底人 - -
- {info?.info?.step_19?.signPath - && } -
-
{info?.info?.step_19?.signTime}
-
{info?.info?.step_19?.remarks}
- - - - 作业负责人意见 - -
- {info?.info?.step_21?.signPath - && } -
-
{info?.info?.step_21?.signTime}
-
{info?.info?.step_21?.remarks}
- - - - 所在单位意见 - -
- {info?.info?.step_22?.signPath - && } -
-
{info?.info?.step_22?.signTime}
-
{info?.info?.step_22?.remarks}
- - - - 审核部门意见 - -
- {info?.info?.step_23?.signPath - && } -
-
{info?.info?.step_23?.signTime}
-
{info?.info?.step_23?.remarks}
- - - - 审批部门意见 - -
- {info?.info?.step_24?.signPath - && } -
-
{info?.info?.step_24?.signTime}
-
{info?.info?.step_24?.remarks}
- - - - 完工验收 - -
- {info?.info?.step_25?.signPath - && } -
-
{info?.info?.step_25?.signTime}
-
{info?.info?.step_25?.remarks}
- - + + + + + + + diff --git a/src/pages/Container/Enterprise/ElectricWork/Homework/View/index.js b/src/pages/Container/Enterprise/ElectricWork/Homework/View/index.js index f19095d..26d3c07 100644 --- a/src/pages/Container/Enterprise/ElectricWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/ElectricWork/Homework/View/index.js @@ -6,6 +6,9 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import DisclaimerSign from "~/components/DisclaimerSign"; +import OpinionSign from "~/components/OpinionSign"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,15 +32,10 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const getData = async () => { const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id }); setInfo(basicInfo); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -146,124 +144,51 @@ function View(props) { 实际作业开始时间 {info?.info?.workStartTime} - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - - - 安全交底人 - -
- {info?.info?.step_18?.signPath - && } -
-
{info?.info?.step_18?.signTime}
-
{info?.info?.step_18?.remarks}
- - 接受交底人 - -
- {info?.info?.step_19?.signPath - && } -
-
{info?.info?.step_19?.signTime}
-
{info?.info?.step_19?.remarks}
- - - - 作业负责人意见 - -
- {info?.info?.step_21?.signPath - && } -
-
{info?.info?.step_21?.signTime}
-
{info?.info?.step_21?.remarks}
- - - - 所在单位意见 - -
- {info?.info?.step_22?.signPath - && } -
-
{info?.info?.step_22?.signTime}
-
{info?.info?.step_22?.remarks}
- - - - 审核部门意见 - -
- {info?.info?.step_23?.signPath - && } -
-
{info?.info?.step_23?.signTime}
-
{info?.info?.step_23?.remarks}
- - - - 审批部门意见 - -
- {info?.info?.step_24?.signPath - && } -
-
{info?.info?.step_24?.signTime}
-
{info?.info?.step_24?.remarks}
- - - - 完工验收 - -
- {info?.info?.step_25?.signPath - && } -
-
{info?.info?.step_25?.signTime}
-
{info?.info?.step_25?.remarks}
- - + + + + + + + diff --git a/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js b/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js index 9f6a3fe..8758b04 100644 --- a/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js @@ -6,6 +6,9 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import DisclaimerSign from "~/components/DisclaimerSign"; +import OpinionSign from "~/components/OpinionSign"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,15 +32,10 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const getData = async () => { const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id }); setInfo(basicInfo); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -138,124 +136,51 @@ function View(props) { 作业实施时间 {`${info?.info?.workStartTime} 至 ${info?.info?.workEndTime} 止`} - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - - - 安全交底人 - -
- {info?.info?.step_18?.signPath - && } -
-
{info?.info?.step_18?.signTime}
-
{info?.info?.step_18?.remarks}
- - 接受交底人 - -
- {info?.info?.step_19?.signPath - && } -
-
{info?.info?.step_19?.signTime}
-
{info?.info?.step_19?.remarks}
- - - - 作业负责人意见 - -
- {info?.info?.step_21?.signPath - && } -
-
{info?.info?.step_21?.signTime}
-
{info?.info?.step_21?.remarks}
- - - - 所在单位意见 - -
- {info?.info?.step_22?.signPath - && } -
-
{info?.info?.step_22?.signTime}
-
{info?.info?.step_22?.remarks}
- - - - 审核部门意见 - -
- {info?.info?.step_23?.signPath - && } -
-
{info?.info?.step_23?.signTime}
-
{info?.info?.step_23?.remarks}
- - - - 审批部门意见 - -
- {info?.info?.step_24?.signPath - && } -
-
{info?.info?.step_24?.signTime}
-
{info?.info?.step_24?.remarks}
- - - - 完工验收 - -
- {info?.info?.step_25?.signPath - && } -
-
{info?.info?.step_25?.signTime}
-
{info?.info?.step_25?.remarks}
- - + + + + + + + diff --git a/src/pages/Container/Enterprise/HotWork/Homework/View/index.js b/src/pages/Container/Enterprise/HotWork/Homework/View/index.js index 764e9be..14662b0 100644 --- a/src/pages/Container/Enterprise/HotWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/HotWork/Homework/View/index.js @@ -6,6 +6,7 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,8 +30,6 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const [delayedMonitoringRecord, setDelayedMonitoringRecord] = useState([]); const [gasMonitoringRecord, setGasMonitoringRecord] = useState([]); @@ -44,9 +43,6 @@ function View(props) { }); setDelayedMonitoringRecord(supplementaryInfo.filter(item => item.type === "delay")); setGasMonitoringRecord(supplementaryInfo.filter(item => item.type === "gas")); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -115,75 +111,33 @@ function View(props) { 动火监火人 {info?.info?.workMonitor} - {gasMonitoringRecord.length > 0 && ( - - 可燃气体分析(运行的生产装置、罐区和具有火灾爆炸危险场所) - - )} + + 可燃气体分析(运行的生产装置、罐区和具有火灾爆炸危险场所) + { - gasMonitoringRecord.map(item => ( - - - 分析时间 - {item?.details?.analysisTime} - 分析点 - {item?.details?.analysisPointName} - - - 可燃气体检测结果 - {item?.details?.analysisResult} - 分析人 - {item?.details?.analysisUserName} - - - )) + gasMonitoringRecord.length > 0 + ? gasMonitoringRecord.map(item => ( + + + 分析时间 + {item?.details?.analysisTime} + 分析点 + {item?.details?.analysisPointName} + + + 可燃气体检测结果 + {item?.details?.analysisResult} + 分析人 + {item?.details?.analysisUserName} + + + )) + : 暂无数据 } 动火要求安全措施安全提示 - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - + 动火单位(部门)负责人意见 @@ -256,16 +210,20 @@ function View(props) { 时间 签字照片 - {delayedMonitoringRecord.map((item, index) => ( - - {item?.details?.actUserName} - {item?.details?.delayHotTime} - - {item?.details?.delayHotPhoto - && } - - - ))} + { + delayedMonitoringRecord.length > 0 + ? delayedMonitoringRecord.map((item, index) => ( + + {item?.details?.actUserName} + {item?.details?.delayHotTime} + + {item?.details?.delayHotPhoto + && } + + + )) + : 暂无数据 + } diff --git a/src/pages/Container/Enterprise/LiftingWork/Homework/View/index.js b/src/pages/Container/Enterprise/LiftingWork/Homework/View/index.js index c0e1cd6..1ab9334 100644 --- a/src/pages/Container/Enterprise/LiftingWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/LiftingWork/Homework/View/index.js @@ -6,6 +6,9 @@ import { useReactToPrint } from "react-to-print"; import Page from "zy-react-library/components/Page"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; +import DisclaimerSign from "~/components/DisclaimerSign"; +import OpinionSign from "~/components/OpinionSign"; +import SafetyMeasures from "~/components/SafetyMeasures"; import { NS_EIGHTWORK } from "~/enumerate/namespace"; import "~/css/index.less"; @@ -29,15 +32,10 @@ function View(props) { }); const [info, setInfo] = useState({}); - const [safetyMeasures, setSafetyMeasures] = useState([]); - const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]); const getData = async () => { const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id }); setInfo(basicInfo); - const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId }); - setSafetyMeasures(measuresLogs.filter(item => item.type === 1)); - setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2)); }; useEffect(() => { @@ -150,124 +148,51 @@ function View(props) { 作业实施时间 {`${info?.info?.workStartTime} 至 ${info?.info?.workEndTime} 止`} - - - - - - - - - - - {safetyMeasures.map((item, index) => ( - - - - - - - ))} - - - - - -
序号安全措施是否涉及确认人
{index + 1}{item.content}符合 - {item.signPath && } -
{safetyMeasures.length + 1} - { - otherSafetyMeasures.map((item, index) => ( -
-
- 其它安全措施: - {item.content} -
-
- 编制人: - {item.createName} -
-
- )) - } -
- - - - 安全交底人 - -
- {info?.info?.step_18?.signPath - && } -
-
{info?.info?.step_18?.signTime}
-
{info?.info?.step_18?.remarks}
- - 接受交底人 - -
- {info?.info?.step_19?.signPath - && } -
-
{info?.info?.step_19?.signTime}
-
{info?.info?.step_19?.remarks}
- - - - 作业指挥负责人意见 - -
- {info?.info?.step_21?.signPath - && } -
-
{info?.info?.step_21?.signTime}
-
{info?.info?.step_21?.remarks}
- - - - 所在单位意见 - -
- {info?.info?.step_22?.signPath - && } -
-
{info?.info?.step_22?.signTime}
-
{info?.info?.step_22?.remarks}
- - - - 审核部门意见 - -
- {info?.info?.step_23?.signPath - && } -
-
{info?.info?.step_23?.signTime}
-
{info?.info?.step_23?.remarks}
- - - - 审批部门意见 - -
- {info?.info?.step_24?.signPath - && } -
-
{info?.info?.step_24?.signTime}
-
{info?.info?.step_24?.remarks}
- - - - 完工验收 - -
- {info?.info?.step_25?.signPath - && } -
-
{info?.info?.step_25?.signTime}
-
{info?.info?.step_25?.remarks}
- - + + + + + + +