diff --git a/super-screen/client/src/sections/fire-control/containers/gis.js b/super-screen/client/src/sections/fire-control/containers/gis.js index fc4219a..3f8a656 100644 --- a/super-screen/client/src/sections/fire-control/containers/gis.js +++ b/super-screen/client/src/sections/fire-control/containers/gis.js @@ -66,7 +66,7 @@ function Map(props) { map && renderAlarms() setMapInitFit() } - }, [delay, alarmList, emergencyList]) + }, [delay, alarmList, emergencyList, propTab]) const renderMarkers = () => { const data = emergencyList['xfjy'] @@ -219,11 +219,8 @@ function Map(props) { if (result.routes && result.routes.length) { // 绘制第一条路线,也可以按需求绘制其它几条路线 drawRoute(result.routes[0]) + props.routeCallback({ routes: result.routes[0] }) - props.alarmOk({ - alarmInfo: { ...alarmInfo, routes: result.routes[0] }, - rescueInfo: rescueInfo - }) } } else { } @@ -315,6 +312,14 @@ function Map(props) { )) const location = list[0]?.location drawDrivings([x.longitude, x.latitude], location.split(','), x, list[0]) + + props.alarmOk({ + alarmInfo: { ...x }, + rescueInfo: list[0] + }) + setTimeout(() => { + drawDrivings([x.longitude, x.latitude], location.split(','), x, list[0]) + }, 200); } }} >一键护航