|
|
@ -9,6 +9,7 @@ import { PinyinHelper } from '@peace/utils'; |
|
|
|
// @ts-ignore
|
|
|
|
import styles from './protable.less'; |
|
|
|
import moment from 'moment'; |
|
|
|
import { reportTypeText } from './patrolTable' |
|
|
|
|
|
|
|
const DetailForm = (props) => { |
|
|
|
const { visible, data, handleClose, loading } = props; |
|
|
@ -32,7 +33,18 @@ const DetailForm = (props) => { |
|
|
|
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span> |
|
|
|
{ |
|
|
|
obj.name != 'scenePic' && obj.name.indexOf('conserve') == -1 ? |
|
|
|
<Input style={{ width: '70%' }} value={obj.name == 'id' ? moment(data.time).format("YYYYMMDD") * 10000 + data.id : data[obj.name]} disabled /> |
|
|
|
<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] |
|
|
|
} |
|
|
|
disabled |
|
|
|
/> |
|
|
|
: |
|
|
|
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}> |
|
|
|
{ |
|
|
@ -120,13 +132,7 @@ const DetailList = (props) => { |
|
|
|
dataIndex: 'projectType', |
|
|
|
align: 'center', |
|
|
|
render: (text, record) => { |
|
|
|
switch (text) { |
|
|
|
case 'road': return '道路'; |
|
|
|
case 'bridge': return '桥梁'; |
|
|
|
case 'culvert': return '涵洞'; |
|
|
|
case 'other': return '其他'; |
|
|
|
default: return text; |
|
|
|
} |
|
|
|
return reportTypeText(text) |
|
|
|
} |
|
|
|
}, { |
|
|
|
title: '所属道路', |
|
|
@ -380,7 +386,7 @@ const MaintenanceTable = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
function mapStateToProps(state) { |
|
|
|
function mapStateToProps (state) { |
|
|
|
const { auth, depMessage, userList, reportList, reportDetail } = state; |
|
|
|
const pakData = (dep) => { |
|
|
|
return dep.map((d) => { |
|
|
|