|
@ -20,7 +20,7 @@ function Index() { |
|
|
const { params: { filter } } = router |
|
|
const { params: { filter } } = router |
|
|
|
|
|
|
|
|
const [isPatrol, setIsPatrol] = useState(true) |
|
|
const [isPatrol, setIsPatrol] = useState(true) |
|
|
const [datePicker, setDatePicker] = useState(moment().format('YYYY-MM-DD')) |
|
|
const [datePicker, setDatePicker] = useState('') |
|
|
const [listData, setListData] = useState([]) |
|
|
const [listData, setListData] = useState([]) |
|
|
const [filterText, setFilterText] = useState('') |
|
|
const [filterText, setFilterText] = useState('') |
|
|
const [systemInfo, setSystemInfo] = useState('') |
|
|
const [systemInfo, setSystemInfo] = useState('') |
|
@ -51,8 +51,8 @@ function Index() { |
|
|
const data = { |
|
|
const data = { |
|
|
limit, |
|
|
limit, |
|
|
page, |
|
|
page, |
|
|
startTime: datePicker + ' 00:00:00', |
|
|
startTime: datePicker ? datePicker + ' 00:00:00' : '', |
|
|
endTime: datePicker + ' 23:59:59', |
|
|
endTime: datePicker ? datePicker + ' 23:59:59' : '', |
|
|
keyword: filterText, |
|
|
keyword: filterText, |
|
|
reportType: isPatrol ? 'patrol' : 'conserve', |
|
|
reportType: isPatrol ? 'patrol' : 'conserve', |
|
|
userId: filter === 'my' ? userInfo.id : '', |
|
|
userId: filter === 'my' ? userInfo.id : '', |
|
|