Browse Source

🚑 交接点没有地图数据也能展示处理

master
wangxiang 3 years ago
parent
commit
1c76be6ed9
  1. 8
      src/components/AMap/src/AMapDesigner/index.vue

8
src/components/AMap/src/AMapDesigner/index.vue

@ -708,7 +708,6 @@ @@ -708,7 +708,6 @@
}
});
setTableData(mapState.mapData.mapTask);
console.log(1111111111);
drawMapNavigate(concat(mapState.mapData.mapLogisticPoint, mapState.mapData.mapTaskPresetLogisticPoint));
});
}
@ -747,9 +746,10 @@ @@ -747,9 +746,10 @@
/** 绘制地图导航路线 */
function drawMapNavigate(points: MapLogisticPoint[] = []) {
console.log(222222222222);
if (isEmpty(points) && mapState.mapData.courierUserId && mapState.mapData.courierLng && mapState.mapData.courierLat)
throw console.warn('检查到当前起点数据为空或标记点集合为空,请选择起点!');
if (isEmpty(points) && mapState.mapData.courierUserId && mapState.mapData.courierLng && mapState.mapData.courierLat) return notification.warn({
message: '检查到当前起点数据为空或标记点集合为空,请选择起点!',
duration: 2
});
points = points.filter(item => item.lng && item.lat);
const lngLats = points.map(item => new AMap.LngLat(item.lng, item.lat));
const destination = lngLats.pop();

Loading…
Cancel
Save