dev_1.2
luotaiqian 2026-07-30 11:41:13 +08:00
parent 3ef5e8c6a8
commit 04dbd12a10
1 changed files with 2 additions and 16 deletions

View File

@ -1,5 +1,4 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import dayjs from "dayjs";
import { import {
Row, Row,
Col, Col,
@ -96,21 +95,14 @@ const SurveyMonitor = (props) => {
useEffect(() => { useEffect(() => {
searchForm.setFieldsValue({ searchForm.setFieldsValue({
...router.query, ...router.query,
dateRange:
router.query.startTime && router.query.endTime
? [dayjs(router.query.startTime), dayjs(router.query.endTime)]
: undefined,
}); });
getStat(); getStat();
getData(); getData();
}, []); }, []);
const handleSearch = (values) => { const handleSearch = (values) => {
const { dateRange, ...rest } = values;
router.query = { router.query = {
...rest, ...values,
startTime: dateRange?.[0]?.format?.("YYYY-MM-DD") || undefined,
endTime: dateRange?.[1]?.format?.("YYYY-MM-DD") || undefined,
current: 1, current: 1,
size: 10, size: 10,
}; };
@ -119,7 +111,7 @@ const SurveyMonitor = (props) => {
const handleReset = (values) => { const handleReset = (values) => {
searchForm.resetFields(); searchForm.resetFields();
router.query = { ...values, current: 1, size: 10, startTime: undefined, endTime: undefined }; router.query = { ...values, current: 1, size: 10 };
getData(); getData();
}; };
@ -306,12 +298,6 @@ const SurveyMonitor = (props) => {
allowClear allowClear
/> />
</Form.Item>, </Form.Item>,
<Form.Item key="dateRange" name="dateRange">
<ControlWrapper.DatePicker.RangePicker
label="踏勘日期"
style={{ width: "100%" }}
/>
</Form.Item>,
<Form.Item key="clockInStatus" name="clockInStatus"> <Form.Item key="clockInStatus" name="clockInStatus">
<ControlWrapper.Select <ControlWrapper.Select
label="打卡状态" label="打卡状态"