dengyinhuan 2 years ago
parent
commit
ba2bdf1639
  1. 8
      web/client/src/sections/fillion/components/fileTable.js
  2. 17
      web/client/src/sections/fillion/components/maintenanceTable.js
  3. 2
      web/client/src/sections/fillion/containers/maintenance.js

8
web/client/src/sections/fillion/components/fileTable.js

@ -281,7 +281,11 @@ const RoadNameList = (props) => {
return { return {
onClick: () => { onClick: () => {
if (record) { if (record) {
setSelectRoad(record.rId); let id = record.rId
if(selectRoad == record.rId){
id = null
}
setSelectRoad(id);
onChange(record); onChange(record);
} }
}, },
@ -413,7 +417,7 @@ const FileTable = (props) => {
}} }}
> >
<Row> <Row>
<Button onClick={() => { setUploadVisible(true) }} type="primary" style={{ width: 160, marginBottom: 8 }} >上传</Button> <Button onClick={() => { setUploadVisible(true) }} type="primary" style={{ width: 160, marginBottom: 8, visibility: record ? 'visible': "hidden" }} >上传</Button>
</Row> </Row>
<Card style={{ flex: 1 }}> <Card style={{ flex: 1 }}>
<DetailList fileList={fileList} record={record} loading={fileListLoading} dispatch={dispatch} handelRefresh={handelRefresh} onPageChange={onPageChange} /> <DetailList fileList={fileList} record={record} loading={fileListLoading} dispatch={dispatch} handelRefresh={handelRefresh} onPageChange={onPageChange} />

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

@ -303,7 +303,11 @@ const MaintenanceTable = (props) => {
useEffect(() => { useEffect(() => {
if (record) { if (record) {
let query = { userId: record.id, reportType: 'conserve' , asc: true} let query = {
userId: record.id,
reportType: 'conserve',
asc: true
}
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) { if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss') query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss') query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
@ -320,7 +324,11 @@ const MaintenanceTable = (props) => {
} }
const handelRefresh = () => { const handelRefresh = () => {
let query = { userId: record.id, reportType: 'patrol', asc: true } let query = {
userId: record.id,
reportType: 'conserve',
asc: true
}
dispatch(getReportList(query)); dispatch(getReportList(query));
} }
@ -343,7 +351,10 @@ const MaintenanceTable = (props) => {
<Button style={{ marginLeft: 20 }} onClick={handleExport}>导出</Button> <Button style={{ marginLeft: 20 }} onClick={handleExport}>导出</Button>
</div> </div>
<Card style={{ flex: 1 }}> <Card style={{ flex: 1 }}>
<DetailList reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen} /> <DetailList
reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen}
handelRefresh={handelRefresh}
/>
</Card> </Card>
<DetailForm <DetailForm
visible={detailVisible} visible={detailVisible}

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

@ -25,7 +25,7 @@ const Maintenance = (props) => {
let reportIds = ids.toString(); let reportIds = ids.toString();
window.open( window.open(
'/_api/' + '/_api/' +
`data/export?exp=patrol&ids=${reportIds}&token=${user.token}`) `data/export?exp=maintenance&ids=${reportIds}&token=${user.token}`)
} }
return ( return (
<> <MaintenanceTable data={data} exports={exports} /> <> <MaintenanceTable data={data} exports={exports} />

Loading…
Cancel
Save