|
|
@ -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 ( |
|
|
|
<> |
|
|
|
<div id='patrol-record'> |
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', padding: '0 10px' }}> |
|
|
|
<Form |
|
|
|
style={{ display: 'flex', }} |
|
|
@ -188,6 +192,8 @@ const PatrolRecord = (props) => { |
|
|
|
open={showDetailModal} |
|
|
|
onCancel={() => setShowDetail(false)} |
|
|
|
footer={[<Button onClick={() => setShowDetail(false)}>关闭</Button>]} |
|
|
|
className='patrol-record-detail-modal' |
|
|
|
width={666} |
|
|
|
> |
|
|
|
{(() => { |
|
|
|
let dataArr = [] |
|
|
@ -196,15 +202,59 @@ const PatrolRecord = (props) => { |
|
|
|
dataArr.push( |
|
|
|
<> |
|
|
|
<Row> |
|
|
|
<Col span={6} style={{ |
|
|
|
<Col span={5} style={{ |
|
|
|
// textAlign: 'justify', textAlignLast: 'justify'
|
|
|
|
}}>{c.title} :</Col> |
|
|
|
<Col span={18}>{c.render('', modelData)}</Col> |
|
|
|
<Col span={19}>{c.render('', modelData)}</Col> |
|
|
|
</Row> |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (modelData && modelData.points && modelData.points.inspectContent) { |
|
|
|
let inspectContent = modelData.points.inspectContent |
|
|
|
for (let k in inspectContent) { |
|
|
|
dataArr.push( |
|
|
|
<> |
|
|
|
<Row> |
|
|
|
<Col span={4} style={{}}>{k} :</Col> |
|
|
|
<Col span={20}> |
|
|
|
{ |
|
|
|
inspectContent[k].isNormal ? '正常' : |
|
|
|
<Collapse ghost style={{ padding: 0 }}> |
|
|
|
<Panel header="异常" key="1" style={{ padding: 0 }}> |
|
|
|
<Row> |
|
|
|
<Col span={4} style={{}}>巡查详情 :</Col> |
|
|
|
<Col span={20}>{inspectContent[k].msgInp}</Col> |
|
|
|
<Col span={4} style={{}}>严重等级 :</Col> |
|
|
|
<Col span={20}>{inspectContent[k].level}</Col> |
|
|
|
<Col span={4} style={{}}>现场照片 :</Col> |
|
|
|
<Col span={20}> |
|
|
|
<Uploads |
|
|
|
listType='picture-card' |
|
|
|
uploadType='project' |
|
|
|
maxFilesNum={1} |
|
|
|
maxFileSize={10} |
|
|
|
isQiniu={true} |
|
|
|
disabled={true} |
|
|
|
fileTypes={["png", "jpg"]} |
|
|
|
defaultValue={(inspectContent[k].imgs || []).map(s => { |
|
|
|
return { |
|
|
|
storageUrl: s |
|
|
|
} |
|
|
|
})} |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Panel> |
|
|
|
</Collapse> |
|
|
|
} |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
return dataArr |
|
|
|
})()} |
|
|
|
{/* <Row align='middle' justify='center' style={{ marginBottom: 10 }}> |
|
|
@ -228,7 +278,7 @@ const PatrolRecord = (props) => { |
|
|
|
{modelData?.points?.imgs?.map(rs => <img key={rs} src={`/_file-server/${rs}`} style={{ display: 'inline-block', width: 260, marginBottom: 10 }} />)} |
|
|
|
</Row>} */} |
|
|
|
</Modal> |
|
|
|
</> |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|