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 [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) {
<div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}>
<RangePicker
onChange={(date, dateString) => { setDateRange(dateString) }}
defaultValue={dateRange}
/>
</div>
{mapObj ? <Bounds map={mapObj} /> : ''}

Loading…
Cancel
Save