Browse Source

fix bugs

dev
巴林闲侠 1 year ago
parent
commit
e3dca8af01
  1. 4
      web/client/src/sections/fillion/components/maintenanceTable.js
  2. 7
      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) => {
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 <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
@ -217,7 +217,7 @@ const DetailList = (props) => {
dataIndex: 'projectType',
align: 'center',
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] === 'Y'

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

@ -99,7 +99,10 @@ const DetailForm = (props) => {
if (data) {
// 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 (
@ -295,7 +298,7 @@ const DetailList = (props) => {
dataIndex: 'projectType',
align: 'center',
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] === 'Y'

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

@ -80,7 +80,7 @@ const DetailForm = (props) => {
];
const renderContent = (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 <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>

Loading…
Cancel
Save