From 2bd6f69af33158495145d0e5f309306ce393639e Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 23 Feb 2023 10:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=AE=B0=E5=BD=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../patrolManage/containers/patrolRecord.js | 60 +++++++++++++++++-- .../src/sections/patrolManage/style.less | 5 ++ 2 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 web/client/src/sections/patrolManage/style.less diff --git a/web/client/src/sections/patrolManage/containers/patrolRecord.js b/web/client/src/sections/patrolManage/containers/patrolRecord.js index 2813968..6411413 100644 --- a/web/client/src/sections/patrolManage/containers/patrolRecord.js +++ b/web/client/src/sections/patrolManage/containers/patrolRecord.js @@ -3,8 +3,12 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; -import { Form, Input, Select, Button, Table, Modal, DatePicker, Checkbox, Row, Col } from 'antd'; +import { Form, Input, Select, Button, Table, Modal, DatePicker, Checkbox, Row, Col, Collapse } from 'antd'; import moment from "moment"; +import Uploads from '$components/Uploads'; +import '../style.less' + +const { Panel } = Collapse; const PatrolRecord = (props) => { const { dispatch, actions, } = props @@ -122,7 +126,7 @@ const PatrolRecord = (props) => { ] return ( - <> +
{ open={showDetailModal} onCancel={() => setShowDetail(false)} footer={[]} + className='patrol-record-detail-modal' + width={666} > {(() => { let dataArr = [] @@ -196,15 +202,59 @@ const PatrolRecord = (props) => { dataArr.push( <> - {c.title} : - {c.render('', modelData)} + {c.render('', modelData)} ) } }) + 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} + 现场照片 : + + { + return { + storageUrl: s + } + })} + /> + + + + + } + + + + ) + } + } return dataArr })()} {/* @@ -228,7 +278,7 @@ const PatrolRecord = (props) => { {modelData?.points?.imgs?.map(rs => )} } */} - +
) } diff --git a/web/client/src/sections/patrolManage/style.less b/web/client/src/sections/patrolManage/style.less new file mode 100644 index 0000000..ed39c4f --- /dev/null +++ b/web/client/src/sections/patrolManage/style.less @@ -0,0 +1,5 @@ +.patrol-record-detail-modal { + .ant-collapse>.ant-collapse-item>.ant-collapse-header { + padding: 0 + } +} \ No newline at end of file