|
|
|
@ -118,7 +118,8 @@ const App: React.FC = () => { |
|
|
|
|
|
|
|
|
|
const onFinish = (values: object) => { |
|
|
|
|
const form = formRef.current; |
|
|
|
|
const safeQuery = query ?? {page: 1, num: 20}; |
|
|
|
|
const safeQuery = {page: 1, num: query? query.num : 20}; |
|
|
|
|
setQuery(safeQuery); |
|
|
|
|
getListApi({ |
|
|
|
|
dateFilter: form.getFieldValue('dateFilter'), |
|
|
|
|
startDate: form.getFieldValue('selectDateTime') ? formatDate(form.getFieldValue('selectDateTime')[0]) : null, |
|
|
|
@ -142,10 +143,10 @@ const App: React.FC = () => { |
|
|
|
|
const year = date.getFullYear(); |
|
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); |
|
|
|
|
const day = String(date.getDate()).padStart(2, '0'); |
|
|
|
|
const hours = String(date.getHours()).padStart(2, '0'); |
|
|
|
|
const minutes = String(date.getMinutes()).padStart(2, '0'); |
|
|
|
|
const seconds = String(date.getSeconds()).padStart(2, '0'); |
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
|
|
// const hours = String(date.getHours()).padStart(2, '0');
|
|
|
|
|
// const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
|
|
|
// const seconds = String(date.getSeconds()).padStart(2, '0');
|
|
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -179,7 +180,8 @@ const App: React.FC = () => { |
|
|
|
|
return ( |
|
|
|
|
<div className="container"> |
|
|
|
|
<div> |
|
|
|
|
<div className="list-filter" style={{display: 'flex'}}> |
|
|
|
|
<div className="header-filter"> |
|
|
|
|
<div className="list-filter" style={{display: 'flex', padding: 15}}> |
|
|
|
|
<Form |
|
|
|
|
form={form} |
|
|
|
|
ref={formRef} |
|
|
|
@ -196,7 +198,7 @@ const App: React.FC = () => { |
|
|
|
|
</Radio.Group> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item label="保单数据日期" name="selectDateTime"> |
|
|
|
|
<RangePicker showTime style={{ width: 350 }} onChange={(value, dateString) => {}}/> |
|
|
|
|
<RangePicker style={{ width: 300 }} onChange={(value, dateString) => {}}/> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item label="事故预防状态" name="serviceStatus"> |
|
|
|
|
<Select |
|
|
|
@ -216,6 +218,7 @@ const App: React.FC = () => { |
|
|
|
|
</Form.Item> |
|
|
|
|
</Form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<Button type="primary" style={{ marginBottom: 10, float: 'right' }} onClick={goExport}>导出</Button> |
|
|
|
|
{loading ? ( |
|
|
|
|
<Spin tip="Loading..." /> |
|
|
|
|