Compare commits

...

2 Commits

  1. 5
      web/client/src/sections/fillion/components/gis/patrolGis.js

5
web/client/src/sections/fillion/components/gis/patrolGis.js

@ -11,9 +11,11 @@ function PatrolGis(props) {
const { reportList, userId, dispatch } = props; const { reportList, userId, dispatch } = props;
const [mapComplete, setMapComplete] = useState(false); const [mapComplete, setMapComplete] = useState(false);
const [mapObj, setMapObj] = useState(); const [mapObj, setMapObj] = useState();
const [dateRange, setDateRange] = useState(); const [dateRange, setDateRange] = useState([moment().add(-6, 'day'),
moment()]);
let markers = []; let markers = [];
let PATH = []; let PATH = [];
useEffect(() => { useEffect(() => {
if (AMap) loadMap(); if (AMap) loadMap();
return () => { return () => {
@ -147,6 +149,7 @@ function PatrolGis(props) {
<div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}> <div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}>
<RangePicker <RangePicker
onChange={(date, dateString) => { setDateRange(dateString) }} onChange={(date, dateString) => { setDateRange(dateString) }}
defaultValue={dateRange}
/> />
</div> </div>
{mapObj ? <Bounds map={mapObj} /> : ''} {mapObj ? <Bounds map={mapObj} /> : ''}

Loading…
Cancel
Save