diff --git a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js index 918b945a..4fcbd1aa 100644 --- a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js +++ b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js @@ -80,7 +80,7 @@ const DetailForm = (props) => { ]; const renderContent = (data) => { if (data) { - if ( moment(data.time).isAfter(moment('2023-08-03 00:00:00'))) { + if (moment(data.time).isAfter(moment('2023-08-03 00:00:00'))) { return keyList.map(obj => { return
{obj.key} @@ -282,7 +282,7 @@ const MaintenanceSpotCheck = (props) => { const [previewId, setPreviewId] = useState(0) const [reportData, setReportData] = useState([]) const [detailVisible, setDetailVisible] = useState(false) - const [dateRange, setDateRange] = useState(); + const [dateRange, setDateRange] = useState(['1970-1-1', '2099-12-31']); const { RangePicker } = DatePicker //console.log('reportData', reportData) @@ -424,7 +424,7 @@ const MaintenanceSpotCheck = (props) => { } const lookhandler = () => { if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) { - queryData({ startTime: moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'), endTime: moment(dateRange[1]).startOf('day').format('YYYY-MM-DD HH:mm:ss') }) + queryData({ startTime: moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'), endTime: moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss') }) } } return ( @@ -499,7 +499,7 @@ const MaintenanceSpotCheck = (props) => {
) } -function mapStateToProps (state) { +function mapStateToProps(state) { const { auth, spotCheckDetail, reportDetail } = state //('state1', state) return {