|
|
@ -12,6 +12,7 @@ import moment from 'moment'; |
|
|
|
|
|
|
|
const DetailForm = (props) => { |
|
|
|
const { visible, data, handleClose, loading } = props; |
|
|
|
const [qndmn] = useState(localStorage.getItem('qndmn')); |
|
|
|
const keyList = [ |
|
|
|
{ key: '编号', name: 'id' }, |
|
|
|
{ key: '工程类型', name: 'projectType' }, |
|
|
@ -37,7 +38,7 @@ const DetailForm = (props) => { |
|
|
|
{ |
|
|
|
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => { |
|
|
|
return <div style={{ width: '44%', margin: 6 }}> |
|
|
|
<Image src={imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
|
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> |
|
|
|
</div> |
|
|
|
}) : '暂无图片' |
|
|
|
} |
|
|
@ -118,7 +119,7 @@ const DetailList = (props) => { |
|
|
|
switch (text) { |
|
|
|
case 'road': return '道路'; |
|
|
|
case 'bridge': return '桥梁'; |
|
|
|
case 'culvert ': return '涵洞'; |
|
|
|
case 'culvert': return '涵洞'; |
|
|
|
case 'other': return '其他'; |
|
|
|
default: return text; |
|
|
|
} |
|
|
@ -150,7 +151,7 @@ const DetailList = (props) => { |
|
|
|
dataIndex: 'userName', |
|
|
|
align: 'center', |
|
|
|
render: (text, record) => { |
|
|
|
return record.user.name |
|
|
|
return record?.user?.name |
|
|
|
} |
|
|
|
}, { |
|
|
|
title: '上报时间', |
|
|
|