|
|
@ -267,7 +267,7 @@ const PatrolNameList = (props) => { |
|
|
|
|
|
|
|
|
|
|
|
const PatrolTable = (props) => { |
|
|
|
const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading } = props; |
|
|
|
const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports } = props; |
|
|
|
const [record, setRecord] = useState(); |
|
|
|
const [dateRange, setDateRange] = useState(); |
|
|
|
const [detailVisible, setDetailVisible] = useState(false) |
|
|
@ -345,6 +345,13 @@ const PatrolTable = (props) => { |
|
|
|
setRecord(target); |
|
|
|
} |
|
|
|
|
|
|
|
const handleExport = () => { |
|
|
|
if (reportList && reportList instanceof Array && reportList.length) { |
|
|
|
let ids = reportList.map(item => item.id); |
|
|
|
exports(ids); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<div className='card-protable'> |
|
|
|
<Card > |
|
|
@ -366,7 +373,7 @@ const PatrolTable = (props) => { |
|
|
|
activeTabKey1 == 'tab1' ? <div style={{ marginBottom: 20 }}> |
|
|
|
<RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} /> |
|
|
|
<Button style={{ marginLeft: 20 }}>查询</Button> |
|
|
|
<Button style={{ marginLeft: 20 }}>导出</Button> |
|
|
|
<Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button> |
|
|
|
</div> : '' |
|
|
|
} |
|
|
|
{contentList[activeTabKey1]} |
|
|
|