Browse Source

养护管理的道路类型展示

dev
巴林闲侠 2 years ago
parent
commit
0368aee8a2
  1. 24
      web/client/src/sections/fillion/components/maintenanceTable.js
  2. 2
      web/client/src/sections/fillion/components/patrolTable.js

24
web/client/src/sections/fillion/components/maintenanceTable.js

@ -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) => {

2
web/client/src/sections/fillion/components/patrolTable.js

@ -11,7 +11,7 @@ import PatrolGis from './gis/patrolGis';
import styles from './protable.less';
import moment from 'moment';
const reportTypeText = (text) => {
export const reportTypeText = (text) => {
switch (text) {
case 'road': return '道路';
//

Loading…
Cancel
Save