From cd3642057122ba87d4584109b2e3949619facc1b Mon Sep 17 00:00:00 2001 From: LUCAS Date: Sat, 30 Jul 2022 18:26:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=97=A5=E6=9C=9F=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/fillion/components/gis/patrolGis.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ? : ''}