Browse Source

fix bugs

dev
巴林闲侠 1 year ago
parent
commit
e3dca8af01
  1. 4
      web/client/src/sections/fillion/components/maintenanceTable.js
  2. 19
      web/client/src/sections/fillion/components/patrolTable.js
  3. 2
      web/client/src/sections/fillion/containers/maintenanceSpotCheck.js

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

@ -62,7 +62,7 @@ const DetailForm = (props) => {
]; ];
const renderContent = (data) => { const renderContent = (data) => {
if (data) { if (data) {
if (new Date(data.time) > new Date('2023-08-03')) { if ( moment(data.time).isAfter(moment('2023-08-03 00:00:00'))) {
return keyList.map(obj => { return keyList.map(obj => {
return <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}> return <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span> <span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
@ -217,7 +217,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 && record.codeRoad.length > 0)
? record.codeRoad[0] === 'X' ? record.codeRoad[0] === 'X'
? '县道' ? '县道'
: record.codeRoad[0] === 'Y' : record.codeRoad[0] === 'Y'

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

@ -99,7 +99,10 @@ const DetailForm = (props) => {
if (data) { if (data) {
// Object.keys(data).map(key => { // Object.keys(data).map(key => {
// }) // })
if ((new Date(data.time + '') > new Date('2023-8-3'))) { if (
moment(data.time).isAfter(moment('2023-08-03 00:00:00'))
// (new Date(data.time + '') > new Date('2023-8-3'))
) {
return keyList.map(obj => { return keyList.map(obj => {
return ( return (
@ -295,13 +298,13 @@ 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 && record.codeRoad.length > 0)
? record.codeRoad[0] === 'X' ? record.codeRoad[0] === 'X'
? '县道' ? '县道'
: record.codeRoad[0] === 'Y' : record.codeRoad[0] === 'Y'
? '乡道' ? '乡道'
: '村道' : '村道'
: '' : ''
} }
} : '', } : '',
isRoad ? isRoad ?

2
web/client/src/sections/fillion/containers/maintenanceSpotCheck.js

@ -80,7 +80,7 @@ const DetailForm = (props) => {
]; ];
const renderContent = (data) => { const renderContent = (data) => {
if (data) { if (data) {
if (new Date(data.time) > new Date('2023-08-03')) { if ( moment(data.time).isAfter(moment('2023-08-03 00:00:00'))) {
return keyList.map(obj => { return keyList.map(obj => {
return <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}> return <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span> <span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>

Loading…
Cancel
Save