|
|
@ -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} /> : ''} |
|
|
|