diff --git a/web/client/src/sections/fillion/components/gis/patrolGis.js b/web/client/src/sections/fillion/components/gis/patrolGis.js index 2d15fbc5..cf422dde 100644 --- a/web/client/src/sections/fillion/components/gis/patrolGis.js +++ b/web/client/src/sections/fillion/components/gis/patrolGis.js @@ -11,9 +11,11 @@ function PatrolGis(props) { const { reportList, userId, dispatch } = props; const [mapComplete, setMapComplete] = useState(false); const [mapObj, setMapObj] = useState(); - const [dateRange, setDateRange] = useState(); + const [dateRange, setDateRange] = useState([moment().add(-6, 'day'), + moment()]); let markers = []; let PATH = []; + useEffect(() => { if (AMap) loadMap(); return () => { @@ -147,6 +149,7 @@ function PatrolGis(props) {
{ setDateRange(dateString) }} + defaultValue={dateRange} />
{mapObj ? : ''}