From 3e4ed721a2886f3a108aa4e53904c42fc527d3b8 Mon Sep 17 00:00:00 2001 From: "peng.peng" Date: Fri, 20 Oct 2023 10:53:13 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E5=B7=A1=E6=A3=80=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86=20=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/isuue-handle-mdal.js | 98 ++++++----- .../patrolManage/containers/patrolRecord.js | 159 ++++++++++++------ 2 files changed, 168 insertions(+), 89 deletions(-) diff --git a/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js b/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js index 94c5762..ad15fa0 100644 --- a/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js +++ b/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js @@ -70,57 +70,71 @@ export default (props) => {
{"问题详情"}
- + - - + + + { - editData?.points?.inspectContent && Object.keys(editData?.points?.inspectContent).map(key => { - if (editData?.points?.inspectContent[key]?.isNormal == false) { - return - - - - - - - - - - - + editData?.points?.inspectContent && editData?.points?.inspectContent.map(s => { + if (s?.alarm == true) { + return <> + {s?.deviceName && + + + } + { + s?.checkItems?.map(k => { + return + + + + + + + + + + + + - - { - let nextV = [] - for (let s of (editData?.points?.inspectContent[key].imgs || [])) { - if (s) { - nextV.push({ - storageUrl: s - }) + + { + let nextV = [] + for (let s of (k.imgs || [])) { + if (s) { + nextV.push({ + storageUrl: s + }) + } + } + return nextV + })() } - } - return nextV - })() - } - /> + /> + + + + + }) + } + + - - - } }) } diff --git a/web/client/src/sections/patrolManage/containers/patrolRecord.js b/web/client/src/sections/patrolManage/containers/patrolRecord.js index 6fb7668..dedaf8b 100644 --- a/web/client/src/sections/patrolManage/containers/patrolRecord.js +++ b/web/client/src/sections/patrolManage/containers/patrolRecord.js @@ -207,56 +207,121 @@ const PatrolRecord = (props) => { } }) if (modelData && modelData.points && modelData.points.inspectContent) { - let inspectContent = modelData.points.inspectContent - for (let k in inspectContent) { - dataArr.push( - <> - - {k} : - - { - inspectContent[k].isNormal ? '正常' : - - - - 巡查详情 : - {inspectContent[k].msgInp} - 严重等级 : - {inspectContent[k].level} - 现场照片 : - - { - let nextV = [] - for (let s of (inspectContent[k].imgs || [])) { - if (s) { - nextV.push({ - storageUrl: s - }) + if (modelData?.points?.itemData?.pointDevices?.length > 0) { + let inspectContent = modelData.points.inspectContent + inspectContent?.map(s => { + dataArr.push( + <> + + {s?.deviceName} : + + { + !s.alarm ? '正常' : + + + {s?.checkItems?.map(k => { + return <> + {k.name}: + + 巡查详情 : + {k.msgInp} + 严重等级 : + {k.level} + 现场照片 : + + { + let nextV = [] + for (let s of (k.imgs || [])) { + if (s) { + nextV.push({ + storageUrl: s + }) + } + } + return nextV + })() } + /> + + + + + })} + + + + } + + + + ) + }) + + } else { + let inspectContent = modelData.points.inspectContent + for (let v in inspectContent) { + inspectContent[v]?.checkItems?.map(k => { + dataArr.push( + <> + + {k?.name} : + + { + !inspectContent[v].alarm ? '正常' : + + + + 巡查详情 : + {k.msgInp} + 严重等级 : + {k.level} + 现场照片 : + + { + let nextV = [] + for (let s of (k.imgs || [])) { + if (s) { + nextV.push({ + storageUrl: s + }) + } + } + return nextV + })() } - return nextV - })() - } - /> - - - - - } - - - - ) + /> + + + + + } + + + + ) + }) + + } } + } return dataArr })()}