|
@ -1,6 +1,6 @@ |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
import './protable.less' |
|
|
import './protable.less' |
|
|
import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover, Select, Tree, Form } from 'antd'; |
|
|
import { Card, Button, Popconfirm, Checkbox, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover, Select, Tree, Form, Descriptions } from 'antd'; |
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
import { DownOutlined, RightOutlined, CaretDownOutlined, CaretRightOutlined, MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'; |
|
|
import { DownOutlined, RightOutlined, CaretDownOutlined, CaretRightOutlined, MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'; |
|
|
import { getReportList, getReportDetail, handleReport, getAnspectionNotificationPhone, addAnspectionNotificationPhone } from '../actions/patrol'; |
|
|
import { getReportList, getReportDetail, handleReport, getAnspectionNotificationPhone, addAnspectionNotificationPhone } from '../actions/patrol'; |
|
@ -14,6 +14,7 @@ import NominateModal from '../components/feedback/nominateModal' //指派的模 |
|
|
import styles from './protable.less'; |
|
|
import styles from './protable.less'; |
|
|
import moment from 'moment'; |
|
|
import moment from 'moment'; |
|
|
import NominateModalcopy from './feedback/nominateModalcopy';//指派的模块
|
|
|
import NominateModalcopy from './feedback/nominateModalcopy';//指派的模块
|
|
|
|
|
|
import './maintenanceTable.less' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -42,31 +43,60 @@ const DetailForm = (props) => { |
|
|
//('record12s', isAnomaly)
|
|
|
//('record12s', isAnomaly)
|
|
|
const [qndmn] = useState(localStorage.getItem('qndmn')); |
|
|
const [qndmn] = useState(localStorage.getItem('qndmn')); |
|
|
|
|
|
|
|
|
const keyList = [ |
|
|
// const keyList = [
|
|
|
// { key: '编号', name: 'id' },
|
|
|
// // { key: '编号', name: 'id' },
|
|
|
// isPatrol ?'巡查管理详情' :isRoad ? '建设上报详情' : '异常反馈详情'
|
|
|
// // isPatrol ?'巡查管理详情' :isRoad ? '建设上报详情' : '异常反馈详情'
|
|
|
{ key: '工程类型', name: 'projectType', skip: !isPatrol }, |
|
|
// { key: '工程类型', name: 'projectType', skip: !isPatrol },
|
|
|
|
|
|
// { key: '反馈类型', name: 'projectType', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '工程名称', name: 'projectName', skip: !isRoad },
|
|
|
|
|
|
// { key: '所在路段', name: 'road', skip: isPatrol },
|
|
|
|
|
|
// { key: '具体位置', name: 'address', skip: isPatrol },
|
|
|
|
|
|
// { key: '建设内容', name: 'content', skip: isPatrol },
|
|
|
|
|
|
// { key: '路线代码', name: 'codeRoad', },
|
|
|
|
|
|
// { key: '现场照片', name: 'scenePic', skip: isPatrol },
|
|
|
|
|
|
// { key: '处理意见', name: 'handleOpinions', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '处理详情', name: 'handleContent', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '处理图片', name: 'handlePic', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '处理人', name: 'performerName', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '道路类型', name: 'reportType', skip: !isPatrol },
|
|
|
|
|
|
// { key: '其他', name: 'projectType', skip: !isPatrol },
|
|
|
|
|
|
// { key: '路线名称', name: 'road', skip: !isPatrol },
|
|
|
|
|
|
// { key: '巡查路段', name: 'roadSectionStart', skip: !isPatrol },
|
|
|
|
|
|
// { key: '具体位置', name: 'address', skip: !isPatrol },
|
|
|
|
|
|
// { key: '巡查结果无异常', name: 'inspectionNoException', skip: !isPatrol },
|
|
|
|
|
|
// // insectionNoException
|
|
|
|
|
|
// { key: '路面损坏', name: 'roadDamage', skip: !isPatrol },
|
|
|
|
|
|
// { key: '安防损坏', name: 'securityDamage', skip: !isPatrol },
|
|
|
|
|
|
// { key: '桥梁损坏', name: 'bridgeDamage', skip: !isPatrol },
|
|
|
|
|
|
// { key: '涵洞损坏', name: 'culvertDamage', skip: !isPatrol },
|
|
|
|
|
|
// { key: '安防缺失', name: 'ecurityDeficiency', skip: !isPatrol },
|
|
|
|
|
|
// { key: '路域环境', name: 'encounteredEnvironment', skip: !isPatrol },
|
|
|
|
|
|
// { key: '其他内容', name: 'otherDescription', skip: !isPatrol },
|
|
|
|
|
|
// //{ key: '路线代码', name: 'codeRoad', skip: !isPatrol },
|
|
|
|
|
|
// { key: '上报图片', name: 'scenePic', skip: !isPatrol },
|
|
|
|
|
|
// { key: '上报视频', name: 'videoUrl', skip: !isPatrol },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const info = [ |
|
|
{ key: '反馈类型', name: 'projectType', skip: !isAnomaly }, |
|
|
{ key: '反馈类型', name: 'projectType', skip: !isAnomaly }, |
|
|
{ key: '工程名称', name: 'projectName', skip: !isRoad }, |
|
|
{ key: '所在道路', name: 'road', skip: isRoad }, |
|
|
{ key: '所在路段', name: 'road', skip: isPatrol }, |
|
|
|
|
|
{ key: '具体位置', name: 'address', skip: isPatrol }, |
|
|
|
|
|
{ key: '巡查内容', name: 'content', skip: isPatrol }, |
|
|
|
|
|
{ key: '路线代码', name: 'codeRoad', skip: !isAnomaly && isPatrol }, |
|
|
|
|
|
{ key: '现场照片', name: 'scenePic', skip: isPatrol }, |
|
|
|
|
|
{ key: '处理意见', name: 'handleOpinions', skip: !isAnomaly }, |
|
|
|
|
|
{ key: '处理详情', name: 'handleContent', skip: !isAnomaly }, |
|
|
|
|
|
{ key: '处理图片', name: 'handlePic', skip: !isAnomaly }, |
|
|
|
|
|
{ key: '处理人', name: 'performerName', skip: !isAnomaly }, |
|
|
|
|
|
{ key: '路线代码', name: 'codeRoad', skip: !isPatrol }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ key: '道路类型', name: 'reportType', skip: !isPatrol }, |
|
|
{ key: '道路类型', name: 'reportType', skip: !isPatrol }, |
|
|
{ key: '其他', name: 'projectType', skip: !isPatrol }, |
|
|
{ key: '其他', name: 'projectType', skip: !isPatrol }, |
|
|
|
|
|
{ key: '路线代码', name: 'codeRoad', skip: isRoad }, |
|
|
{ key: '路线名称', name: 'road', skip: !isPatrol }, |
|
|
{ key: '路线名称', name: 'road', skip: !isPatrol }, |
|
|
|
|
|
{ key: '所属路段', name: 'roadSectionStart', skip: !isAnomaly }, |
|
|
{ key: '巡查路段', name: 'roadSectionStart', skip: !isPatrol }, |
|
|
{ key: '巡查路段', name: 'roadSectionStart', skip: !isPatrol }, |
|
|
{ key: '具体位置', name: 'address', skip: !isPatrol }, |
|
|
{ key: '项目名称', name: 'projectName', skip: !isRoad }, |
|
|
|
|
|
{ key: '具体位置', name: 'address', }, |
|
|
|
|
|
{ key: '施工内容', name: 'content', skip: !isRoad }, |
|
|
|
|
|
{ key: '反馈内容', name: 'content', skip: !isAnomaly }, |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
const patrolContent = [ |
|
|
{ key: '巡查结果无异常', name: 'inspectionNoException', skip: !isPatrol }, |
|
|
{ key: '巡查结果无异常', name: 'inspectionNoException', skip: !isPatrol }, |
|
|
// insectionNoException
|
|
|
|
|
|
{ key: '路面损坏', name: 'roadDamage', skip: !isPatrol }, |
|
|
{ key: '路面损坏', name: 'roadDamage', skip: !isPatrol }, |
|
|
{ key: '安防损坏', name: 'securityDamage', skip: !isPatrol }, |
|
|
{ key: '安防损坏', name: 'securityDamage', skip: !isPatrol }, |
|
|
{ key: '桥梁损坏', name: 'bridgeDamage', skip: !isPatrol }, |
|
|
{ key: '桥梁损坏', name: 'bridgeDamage', skip: !isPatrol }, |
|
@ -74,127 +104,348 @@ const DetailForm = (props) => { |
|
|
{ key: '安防缺失', name: 'ecurityDeficiency', skip: !isPatrol }, |
|
|
{ key: '安防缺失', name: 'ecurityDeficiency', skip: !isPatrol }, |
|
|
{ key: '路域环境', name: 'encounteredEnvironment', skip: !isPatrol }, |
|
|
{ key: '路域环境', name: 'encounteredEnvironment', skip: !isPatrol }, |
|
|
{ key: '其他内容', name: 'otherDescription', skip: !isPatrol }, |
|
|
{ key: '其他内容', name: 'otherDescription', skip: !isPatrol }, |
|
|
//{ key: '路线代码', name: 'codeRoad', skip: !isPatrol },
|
|
|
] |
|
|
{ key: '上报图片', name: 'scenePic', skip: !isPatrol }, |
|
|
const pic = [ |
|
|
{ key: '上报视频', name: 'videoUrl', skip: !isPatrol }, |
|
|
{ key: '现场图片', name: 'scenePic' }, |
|
|
|
|
|
] |
|
|
]; |
|
|
const video = [ |
|
|
const keyListOld = [ |
|
|
{ key: '视频', name: 'videoUrl' }, |
|
|
// { key: '编号', name: 'id' },
|
|
|
|
|
|
// isPatrol ?'巡查管理详情' :isRoad ? '建设上报详情' : '异常反馈详情'
|
|
|
] |
|
|
{ key: '工程类型', name: 'projectType', skip: !isPatrol }, |
|
|
|
|
|
{ key: '反馈类型', name: 'projectType', skip: !isAnomaly }, |
|
|
// const keyListOld = [
|
|
|
{ key: '工程名称', name: 'projectName', skip: !isRoad }, |
|
|
// // { key: '编号', name: 'id' },
|
|
|
{ key: '所在路段', name: 'road', skip: isRoad }, |
|
|
// // isPatrol ?'巡查管理详情' :isRoad ? '建设上报详情' : '异常反馈详情'
|
|
|
{ key: '具体位置', name: 'address' }, |
|
|
// { key: '工程类型', name: 'projectType', skip: !isPatrol },
|
|
|
{ key: '巡查内容', name: 'content' }, |
|
|
// { key: '反馈类型', name: 'projectType', skip: !isAnomaly },
|
|
|
{ key: '路线代码', name: 'codeRoad', skip: !isAnomaly && !isPatrol }, |
|
|
// { key: '工程名称', name: 'projectName', skip: !isRoad },
|
|
|
{ key: '现场照片', name: 'scenePic' }, |
|
|
// { key: '所在路段', name: 'road', skip: isRoad },
|
|
|
{ key: '处理意见', name: 'handleAdvice', skip: !isAnomaly }, |
|
|
// { key: '具体位置', name: 'address' },
|
|
|
{ key: '处理详情', name: 'handleContent', skip: !isAnomaly }, |
|
|
// { key: '建设内容', name: 'content' },
|
|
|
{ key: '处理图片', name: 'handlePic', skip: !isAnomaly }, |
|
|
// { key: '路线代码', name: 'codeRoad', skip: !isAnomaly && !isPatrol },
|
|
|
{ key: '处理人', name: 'performerName', skip: !isAnomaly } |
|
|
// { key: '现场照片', name: 'scenePic' },
|
|
|
]; |
|
|
// { key: '处理意见', name: 'handleAdvice', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '处理详情', name: 'handleContent', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '处理图片', name: 'handlePic', skip: !isAnomaly },
|
|
|
|
|
|
// { key: '处理人', name: 'performerName', skip: !isAnomaly }
|
|
|
|
|
|
// ];
|
|
|
|
|
|
|
|
|
const changeBoolean = (bool) => { |
|
|
const changeBoolean = (bool) => { |
|
|
return bool ? '无异常' : '有异常' |
|
|
return bool ? '无异常' : '有异常' |
|
|
} |
|
|
} |
|
|
const renderContent = (data) => { |
|
|
const renderContent = (data) => { |
|
|
if (data) { |
|
|
if (data) { |
|
|
// Object.keys(data).map(key => {
|
|
|
if (moment(data.time).isAfter(moment('2023-08-03 00:00:00'))) { |
|
|
// })
|
|
|
return <div className='maintenanceNew'> |
|
|
if ( |
|
|
{isPatrol ? <Descriptions title="基础信息" bordered style={{ marginBottom: 20 }}> |
|
|
moment(data.time).isAfter(moment('2023-08-03 00:00:00')) |
|
|
{info.map(obj => { |
|
|
// (new Date(data.time + '') > new Date('2023-8-3'))
|
|
|
return ( |
|
|
) { |
|
|
obj.skip ? null : <Descriptions.Item label={obj.key} span={obj.name === 'roadSectionStart' ? 3 : 1}> {obj.name === 'projectType' ? |
|
|
|
|
|
reportTypeText(data[obj.name]) : obj.name === 'reportType' ? |
|
|
return keyList.map(obj => { |
|
|
data['codeRoad'] && data['codeRoad'].length ? data['codeRoad'][0] === 'X' ? '县道' : data['codeRoad'][0] === 'Y' ? '乡道' : '村道' : '' |
|
|
return ( |
|
|
: obj.name === 'roadSectionStart' ? data[obj.name] + '-' + data['roadSectionEnd'] || '' : data[obj.name] || ''}</Descriptions.Item> |
|
|
obj.skip ? null : |
|
|
) |
|
|
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}> |
|
|
})} |
|
|
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span> |
|
|
</Descriptions> : null} |
|
|
{ |
|
|
{isAnomaly ? <Descriptions title="反馈信息" bordered style={{ marginBottom: 20 }} column={2}> |
|
|
obj.name != 'handlePic' && obj.name != 'scenePic' && obj.name != 'roadSectionStart' && obj.name != 'videoUrl' && obj.name.indexOf('conserve') == -1 ? |
|
|
{info.map(obj => { |
|
|
<Input |
|
|
return ( |
|
|
style={{ width: '70%' }} |
|
|
obj.skip ? null : <Descriptions.Item label={obj.key} span={obj.name === 'projectType' || obj.name === 'content' ? 2 : 1}> { |
|
|
value={ |
|
|
obj.name === 'roadSectionStart' ? data[obj.name] + '-' + data['roadSectionEnd'] || '' : |
|
|
obj.name == 'id' ? |
|
|
obj.name === 'projectType' ? reportTypeText(data[obj.name]) |
|
|
moment(data.time).format("YYYYMMDD") * 10000 + data.id |
|
|
: data[obj.name] || ''}</Descriptions.Item> |
|
|
: |
|
|
) |
|
|
obj.name === 'projectType' ? |
|
|
})} |
|
|
|
|
|
</Descriptions> : null} |
|
|
reportTypeText(data[obj.name]) |
|
|
{isRoad ? <Descriptions title="建设信息" bordered style={{ marginBottom: 20 }} column={1}> |
|
|
// : obj.name === 'inspectionNoException' ? changeBoolean(data[])
|
|
|
{info.map(obj => { |
|
|
: obj.name === 'reportType' ? data['codeRoad'] && data['codeRoad'].length ? data['codeRoad'][0] === 'X' ? '县道' |
|
|
return ( |
|
|
: data['codeRoad'][0] === 'Y' ? '乡道' : '村道' : '' : |
|
|
obj.skip ? null : <Descriptions.Item label={obj.key} > { |
|
|
data[obj.name] |
|
|
data[obj.name] || ''}</Descriptions.Item> |
|
|
} |
|
|
) |
|
|
disabled |
|
|
})} |
|
|
/> |
|
|
</Descriptions> : null} |
|
|
: obj.name != 'roadSectionStart' && obj.name != 'videoUrl' ? |
|
|
{isPatrol ? <Descriptions title="巡查内容" bordered style={{ marginBottom: 20 }} > |
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
{ |
|
|
{ |
|
|
patrolContent.map(obj => { |
|
|
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => { |
|
|
return ( |
|
|
return <div style={{ width: '44%', margin: 6 }}> |
|
|
obj.skip ? null : <Descriptions.Item label={obj.key}> |
|
|
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
{obj.name === 'inspectionNoException' ? <Checkbox checked={data['inspectionNoException']} disabled></Checkbox> : data[obj.name] || ''} |
|
|
</div> |
|
|
</Descriptions.Item> |
|
|
}) : '暂无图片' |
|
|
) |
|
|
} |
|
|
}) |
|
|
</div> : obj.name != 'videoUrl' ? <div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
} |
|
|
<Input style={{ width: '100%' }} disabled value={data[obj.name] + '-' + data['roadSectionEnd']} /> |
|
|
</Descriptions> : null |
|
|
|
|
|
} |
|
|
</div> : <div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
<Descriptions title={isPatrol ? '巡查图片' : '现场图片'} bordered style={{ marginBottom: 20 }}> |
|
|
{ |
|
|
{ |
|
|
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(videoUrl => { |
|
|
pic.map(obj => { |
|
|
return <div style={{ width: '44%', margin: 6 }}> |
|
|
return ( |
|
|
<video controls width={'100%'} style={{ marginBottom: 4 }} > |
|
|
obj.skip ? null : <Descriptions.Item label={obj.key}> |
|
|
<source src={qndmn + '/' + videoUrl} type="video/mp4" /> |
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
</video> |
|
|
{data[obj.name] && data[obj.name] instanceof Array && data[obj.name].length ? data[obj.name]?.map(videoSrc => { |
|
|
</div> |
|
|
return <div style={{ width: '50px', margin: 6 }}> |
|
|
}) : '暂无视频' |
|
|
<Image src={qndmn + '/' + videoSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
}) : '暂无图片'} |
|
|
} |
|
|
</div> |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
</Descriptions> |
|
|
|
|
|
{/* <Descriptions title={isPatrol ? '巡查图片' : '现场图片'} bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
{ |
|
|
|
|
|
pic.map(obj => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<Descriptions.Item label='是是是'> |
|
|
|
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
|
|
|
{data[obj.name] && data[obj.name] instanceof Array && data[obj.name].length ? |
|
|
|
|
|
<div style={{ width: '50px', margin: 6 }}> |
|
|
|
|
|
<Image src='http://resources-test.anxinyun.cn/report/38f4ba4f-ba8b-4d05-9d60-b10adb72cc42/tmp_29704a54feb465ffe9645f8909e178e8.jpg' width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
|
|
|
</div> |
|
|
|
|
|
: '暂无图片'} |
|
|
|
|
|
</div> |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
</Descriptions> */} |
|
|
|
|
|
<Descriptions title={isPatrol ? '巡查视频' : isAnomaly ? '反馈视频' : '施工视频'} bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
{ |
|
|
|
|
|
video.map(obj => { |
|
|
|
|
|
return ( |
|
|
|
|
|
obj.skip ? null : <Descriptions.Item > |
|
|
|
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
|
|
|
|
|
|
|
|
|
{data[obj.name] && data[obj.name] instanceof Array ? data[obj.name]?.map(videoUrl => { |
|
|
|
|
|
return <div style={{ width: '44%', margin: 6 }}> |
|
|
|
|
|
<video controls width={'100%'} style={{ marginBottom: 4 }} > |
|
|
|
|
|
<source src={qndmn + '/' + videoUrl} type="video/mp4" /> |
|
|
|
|
|
</video> |
|
|
|
|
|
</div> |
|
|
|
|
|
}) : '暂无视频'} |
|
|
|
|
|
</div> |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
</Descriptions> |
|
|
|
|
|
{isAnomaly ? <Descriptions title='处理意见' bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
<Descriptions.Item label='处理意见' span={3}> |
|
|
|
|
|
{data['handleAdvice'] || ''} |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
</Descriptions> : ''} |
|
|
|
|
|
{isAnomaly ? <Descriptions title='处理详情' bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
<Descriptions.Item label='责任人' span={3}> |
|
|
|
|
|
{data['performerName'] || ''} |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
<Descriptions.Item label='处理内容' span={3}> |
|
|
|
|
|
{data['handleContent'] || ''} |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
</Descriptions> : ''} |
|
|
|
|
|
{isAnomaly ? <Descriptions title='处理图片' bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
<Descriptions.Item label='处理图片' span={3}> |
|
|
|
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
|
|
|
{data['handlePic'] && data['handlePic'] instanceof Array && data['handlePic'].length ? data['handlePic']?.map(imgSrc => { |
|
|
|
|
|
return <div style={{ width: '50px', margin: 6 }}> |
|
|
|
|
|
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
|
|
|
</div> |
|
|
|
|
|
}) : '暂无图片'} |
|
|
</div> |
|
|
</div> |
|
|
) |
|
|
</Descriptions.Item> |
|
|
}) |
|
|
</Descriptions> : ''} |
|
|
|
|
|
</div > |
|
|
|
|
|
|
|
|
|
|
|
// return keyList.map(obj => {
|
|
|
|
|
|
// return (
|
|
|
|
|
|
// obj.skip ? null :
|
|
|
|
|
|
|
|
|
|
|
|
// <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
|
|
|
|
|
|
// <span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
|
|
|
|
|
|
// {
|
|
|
|
|
|
// obj.name != 'handlePic' && obj.name != 'scenePic' && obj.name != 'roadSectionStart' && obj.name != 'videoUrl' && obj.name.indexOf('conserve') == -1 ?
|
|
|
|
|
|
// <Input
|
|
|
|
|
|
// style={{ width: '70%' }}
|
|
|
|
|
|
// value={
|
|
|
|
|
|
// obj.name == 'id' ?
|
|
|
|
|
|
// moment(data.time).format("YYYYMMDD") * 10000 + data.id
|
|
|
|
|
|
// :
|
|
|
|
|
|
// obj.name === 'projectType' ?
|
|
|
|
|
|
|
|
|
|
|
|
// reportTypeText(data[obj.name])
|
|
|
|
|
|
// // : obj.name === 'inspectionNoException' ? changeBoolean(data[])
|
|
|
|
|
|
// : obj.name === 'reportType' ? data['codeRoad'] && data['codeRoad'].length ? data['codeRoad'][0] === 'X' ? '县道'
|
|
|
|
|
|
// : data['codeRoad'][0] === 'Y' ? '乡道' : '村道' : '' :
|
|
|
|
|
|
// data[obj.name]
|
|
|
|
|
|
// }
|
|
|
|
|
|
// disabled
|
|
|
|
|
|
// />
|
|
|
|
|
|
// : obj.name != 'roadSectionStart' && obj.name != 'videoUrl' ?
|
|
|
|
|
|
// <div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}>
|
|
|
|
|
|
// {
|
|
|
|
|
|
// data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => {
|
|
|
|
|
|
// return <div style={{ width: '44%', margin: 6 }}>
|
|
|
|
|
|
// <Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// }) : '暂无图片'
|
|
|
|
|
|
// }
|
|
|
|
|
|
// </div> : obj.name != 'videoUrl' ? <div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}>
|
|
|
|
|
|
// <Input style={{ width: '100%' }} disabled value={data[obj.name] + '-' + data['roadSectionEnd']} />
|
|
|
|
|
|
|
|
|
|
|
|
// </div> : <div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}>
|
|
|
|
|
|
// {
|
|
|
|
|
|
// data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(videoUrl => {
|
|
|
|
|
|
// return <div style={{ width: '44%', margin: 6 }}>
|
|
|
|
|
|
// <video controls width={'100%'} style={{ marginBottom: 4 }} >
|
|
|
|
|
|
// <source src={qndmn + '/' + videoUrl} type="video/mp4" />
|
|
|
|
|
|
// </video>
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// }) : '暂无视频'
|
|
|
|
|
|
// }
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// )
|
|
|
|
|
|
// })
|
|
|
} else { |
|
|
} else { |
|
|
return keyListOld.map(obj => { |
|
|
return <div className='maintenanceNew'> |
|
|
return ( |
|
|
{isAnomaly ? <Descriptions title="反馈信息" bordered style={{ marginBottom: 20 }} column={3}> |
|
|
obj.skip ? null : |
|
|
{[{ key: '反馈类型', name: 'projectType' }, |
|
|
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}> |
|
|
{ key: '所属路段', name: 'roadSectionStart' }, |
|
|
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span> |
|
|
{ key: '路线代码', name: 'codeRoad' }, |
|
|
{ |
|
|
{ key: '具体位置', name: 'address' }, |
|
|
obj.name != 'scenePic' && obj.name != 'handlePic' ? |
|
|
{ key: '反馈内容', name: 'content' }].map(obj => { |
|
|
<Input |
|
|
return ( |
|
|
style={{ width: '70%' }} |
|
|
<Descriptions.Item label={obj.key} span={obj.name === 'address' || obj.name === 'content' ? 3 : 1}> { |
|
|
value={ |
|
|
obj.name === 'roadSectionStart' ? data[obj.name] + '-' + data['roadSectionEnd'] || '' : obj.name === 'projectType' ? reportTypeText(data[obj.name]) : data[obj.name] || ''}</Descriptions.Item> |
|
|
obj.name == 'id' ? |
|
|
) |
|
|
moment(data.time).format("YYYYMMDD") * 10000 + data.id |
|
|
})} |
|
|
: |
|
|
</Descriptions> : null} |
|
|
obj.name == 'projectType' ? |
|
|
{isPatrol ? <Descriptions title="巡查信息" bordered style={{ marginBottom: 20 }} > |
|
|
reportTypeText(data[obj.name]) : |
|
|
{[{ key: '道路类型', name: 'reportType' }, |
|
|
data[obj.name] || null |
|
|
{ key: '巡查路段', name: 'roadSectionStart' }, |
|
|
} |
|
|
{ key: '路线代码', name: 'codeRoad' }, |
|
|
disabled |
|
|
{ key: '具体位置', name: 'address' }, |
|
|
/> |
|
|
{ key: '巡查内容', name: 'content' } |
|
|
: |
|
|
].map(obj => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<Descriptions.Item label={obj.key} span={obj.name === 'address' || obj.name === 'content' ? 3 : 1}> { |
|
|
|
|
|
obj.name === 'roadSectionStart' ? data[obj.name] + '-' + data['roadSectionEnd'] || '' : |
|
|
|
|
|
obj.name === 'reportType' ? data['codeRoad'] && data['codeRoad'].length ? data['codeRoad'][0] === 'X' ? '县道' |
|
|
|
|
|
: data['codeRoad'][0] === 'Y' ? '乡道' : '村道' : '' |
|
|
|
|
|
: data[obj.name] || ''}</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
</Descriptions> : null} |
|
|
|
|
|
{isRoad ? <Descriptions title="建设信息" bordered style={{ marginBottom: 20 }} column={1}> |
|
|
|
|
|
{info.map(obj => { |
|
|
|
|
|
return ( |
|
|
|
|
|
obj.skip ? null : <Descriptions.Item label={obj.key} > { |
|
|
|
|
|
data[obj.name] || ''}</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
})} |
|
|
|
|
|
</Descriptions> : null} |
|
|
|
|
|
<Descriptions title={isPatrol ? '巡查图片' : '现场图片'} bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
{ |
|
|
|
|
|
pic.map(obj => { |
|
|
|
|
|
return ( |
|
|
|
|
|
obj.skip ? null : <Descriptions.Item label={obj.key}> |
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
{ |
|
|
{data[obj.name] && data[obj.name] instanceof Array && data[obj.name].length ? data[obj.name]?.map(videoSrc => { |
|
|
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => { |
|
|
return <div style={{ width: '50px', margin: 6 }}> |
|
|
return <div style={{ width: '44%', margin: 6 }}> |
|
|
<Image src={qndmn + '/' + videoSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
</div> |
|
|
</div> |
|
|
}) : '暂无图片'} |
|
|
}) |
|
|
|
|
|
: '暂无图片' |
|
|
|
|
|
} |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
</Descriptions> |
|
|
|
|
|
<Descriptions title={isPatrol ? '巡查视频' : isAnomaly ? '反馈视频' : '施工视频'} bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
{ |
|
|
|
|
|
video.map(obj => { |
|
|
|
|
|
return ( |
|
|
|
|
|
obj.skip ? null : <Descriptions.Item > |
|
|
|
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
|
|
|
|
|
|
} |
|
|
{data[obj.name] && data[obj.name] instanceof Array ? data[obj.name]?.map(videoUrl => { |
|
|
|
|
|
return <div style={{ width: '44%', margin: 6 }}> |
|
|
|
|
|
<video controls width={'100%'} style={{ marginBottom: 4 }} > |
|
|
|
|
|
<source src={qndmn + '/' + videoUrl} type="video/mp4" /> |
|
|
|
|
|
</video> |
|
|
|
|
|
</div> |
|
|
|
|
|
}) : '暂无视频'} |
|
|
|
|
|
</div> |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
</Descriptions> |
|
|
|
|
|
{isAnomaly ? <Descriptions title='处理意见' bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
<Descriptions.Item label='处理意见' span={3}> |
|
|
|
|
|
{data['handleAdvice'] || ''} |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
</Descriptions> : ''} |
|
|
|
|
|
{isAnomaly ? <Descriptions title='处理详情' bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
<Descriptions.Item label='责任人' span={3}> |
|
|
|
|
|
{data['performerName'] || ''} |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
<Descriptions.Item label='处理内容' span={3}> |
|
|
|
|
|
{data['handleContent'] || ''} |
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
</Descriptions> : ''} |
|
|
|
|
|
{isAnomaly ? <Descriptions title='处理图片' bordered style={{ marginBottom: 20 }}> |
|
|
|
|
|
<Descriptions.Item label='处理图片' span={3}> |
|
|
|
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
|
|
|
{data['handlePic'] && data['handlePic'] instanceof Array && data['handlePic'].length ? data['handlePic']?.map(imgSrc => { |
|
|
|
|
|
return <div style={{ width: '50px', margin: 6 }}> |
|
|
|
|
|
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
|
|
|
</div> |
|
|
|
|
|
}) : '暂无图片'} |
|
|
</div> |
|
|
</div> |
|
|
) |
|
|
</Descriptions.Item> |
|
|
}) |
|
|
</Descriptions> : ''} |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
// return keyListOld.map(obj => {
|
|
|
|
|
|
// return (
|
|
|
|
|
|
// obj.skip ? null :
|
|
|
|
|
|
// <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
|
|
|
|
|
|
// <span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
|
|
|
|
|
|
// {
|
|
|
|
|
|
// obj.name != 'scenePic' && obj.name != 'handlePic' ?
|
|
|
|
|
|
// <Input
|
|
|
|
|
|
// style={{ width: '70%' }}
|
|
|
|
|
|
// value={
|
|
|
|
|
|
// obj.name == 'id' ?
|
|
|
|
|
|
// moment(data.time).format("YYYYMMDD") * 10000 + data.id
|
|
|
|
|
|
// :
|
|
|
|
|
|
// obj.name == 'projectType' ?
|
|
|
|
|
|
// reportTypeText(data[obj.name]) :
|
|
|
|
|
|
// data[obj.name] || null
|
|
|
|
|
|
// }
|
|
|
|
|
|
// disabled
|
|
|
|
|
|
// />
|
|
|
|
|
|
// :
|
|
|
|
|
|
// <div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}>
|
|
|
|
|
|
// {
|
|
|
|
|
|
// data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => {
|
|
|
|
|
|
// return <div style={{ width: '44%', margin: 6 }}>
|
|
|
|
|
|
// <Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// })
|
|
|
|
|
|
// : '暂无图片'
|
|
|
|
|
|
// }
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// )
|
|
|
|
|
|
// })
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
@ -206,6 +457,7 @@ const DetailForm = (props) => { |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Modal |
|
|
<Modal |
|
|
|
|
|
width={'60%'} |
|
|
visible={visible} |
|
|
visible={visible} |
|
|
footer={null} |
|
|
footer={null} |
|
|
onCancel={handleClose} |
|
|
onCancel={handleClose} |
|
@ -302,7 +554,7 @@ const DetailList = (props) => { |
|
|
dataIndex: 'projectType', |
|
|
dataIndex: 'projectType', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
render: (text, record) => { |
|
|
render: (text, record) => { |
|
|
return record.projectType?.length > 0 ? reportTypeText(text) : (record.codeRoad && record.codeRoad.length > 0) |
|
|
return record.projectType?.length > 0 ? reportTypeText(text) : (record.codeRoad && !isAnomaly && record.codeRoad.length > 0) |
|
|
? record.codeRoad[0] === 'X' |
|
|
? record.codeRoad[0] === 'X' |
|
|
? '县道' |
|
|
? '县道' |
|
|
: record.codeRoad[0] === 'Y' |
|
|
: record.codeRoad[0] === 'Y' |
|
@ -335,12 +587,18 @@ const DetailList = (props) => { |
|
|
return `${record.roadSectionStart || ''}-${record.roadSectionEnd || ''}` |
|
|
return `${record.roadSectionStart || ''}-${record.roadSectionEnd || ''}` |
|
|
} |
|
|
} |
|
|
} : '', |
|
|
} : '', |
|
|
{ |
|
|
isPatrol || isAnomaly ? { |
|
|
title: '具体位置', |
|
|
title: '具体位置', |
|
|
key: 'address', |
|
|
key: 'address', |
|
|
dataIndex: 'address', |
|
|
dataIndex: 'address', |
|
|
align: 'center' |
|
|
align: 'center' |
|
|
}, |
|
|
} : '', |
|
|
|
|
|
isRoad ? { |
|
|
|
|
|
title: '建设内容', |
|
|
|
|
|
key: 'content', |
|
|
|
|
|
dataIndex: 'content', |
|
|
|
|
|
align: 'center' |
|
|
|
|
|
} : '', |
|
|
{ |
|
|
{ |
|
|
title: '上报人', |
|
|
title: '上报人', |
|
|
width: 100, |
|
|
width: 100, |
|
@ -702,6 +960,7 @@ const PatrolNameList = (props) => { |
|
|
const PatrolTable = (props) => { |
|
|
const PatrolTable = (props) => { |
|
|
const { allDepUsers, clientHeight, user, userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports, pathname, anspectionNotificationPhoneList } = props; |
|
|
const { allDepUsers, clientHeight, user, userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports, pathname, anspectionNotificationPhoneList } = props; |
|
|
const [record, setRecord] = useState(1); |
|
|
const [record, setRecord] = useState(1); |
|
|
|
|
|
// const [recordCopy, setRecordCopy] = useState();
|
|
|
const [dateRange, setDateRange] = useState(); |
|
|
const [dateRange, setDateRange] = useState(); |
|
|
const [selectProjectType, setSelectProjectType] = useState(''); |
|
|
const [selectProjectType, setSelectProjectType] = useState(''); |
|
|
const [detailVisible, setDetailVisible] = useState(false) |
|
|
const [detailVisible, setDetailVisible] = useState(false) |
|
@ -724,6 +983,7 @@ const PatrolTable = (props) => { |
|
|
if (userList && userList instanceof Array && reportDetail && reportDetail instanceof Object) { |
|
|
if (userList && userList instanceof Array && reportDetail && reportDetail instanceof Object) { |
|
|
setReportDetailCopy(Object.assign(reportDetail, { performerName: userList.find(item => item.id === reportDetail.performerId)?.name })) |
|
|
setReportDetailCopy(Object.assign(reportDetail, { performerName: userList.find(item => item.id === reportDetail.performerId)?.name })) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, [userList, reportDetail]) |
|
|
}, [userList, reportDetail]) |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
@ -761,7 +1021,6 @@ const PatrolTable = (props) => { |
|
|
// setRecord(userList[0]);
|
|
|
// setRecord(userList[0]);
|
|
|
} |
|
|
} |
|
|
}, [activeTabKey1]) |
|
|
}, [activeTabKey1]) |
|
|
|
|
|
|
|
|
const handelRefresh = () => { |
|
|
const handelRefresh = () => { |
|
|
let query = { userId: record.id, reportType: reportType, asc: true } |
|
|
let query = { userId: record.id, reportType: reportType, asc: true } |
|
|
dispatch(getReportList(query)); |
|
|
dispatch(getReportList(query)); |
|
|