Browse Source

feat:抽查的查询优化

dev
zhaobing 1 year ago
parent
commit
b440605225
  1. 8
      web/client/src/sections/fillion/containers/maintenanceSpotCheck.js

8
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 ( 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 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>
@ -282,7 +282,7 @@ const MaintenanceSpotCheck = (props) => {
const [previewId, setPreviewId] = useState(0) const [previewId, setPreviewId] = useState(0)
const [reportData, setReportData] = useState([]) const [reportData, setReportData] = useState([])
const [detailVisible, setDetailVisible] = useState(false) const [detailVisible, setDetailVisible] = useState(false)
const [dateRange, setDateRange] = useState(); const [dateRange, setDateRange] = useState(['1970-1-1', '2099-12-31']);
const { RangePicker } = DatePicker const { RangePicker } = DatePicker
//console.log('reportData', reportData) //console.log('reportData', reportData)
@ -424,7 +424,7 @@ const MaintenanceSpotCheck = (props) => {
} }
const lookhandler = () => { const lookhandler = () => {
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) { 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 ( return (
@ -499,7 +499,7 @@ const MaintenanceSpotCheck = (props) => {
</div> </div>
) )
} }
function mapStateToProps (state) { function mapStateToProps(state) {
const { auth, spotCheckDetail, reportDetail } = state const { auth, spotCheckDetail, reportDetail } = state
//('state1', state) //('state1', state)
return { return {

Loading…
Cancel
Save