diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index 3faf376..b5de460 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -534,7 +534,10 @@ mapState.mapData.sendOrderName = hospitalMap.label; mapState.mapData.sendOrderLng = hospitalMap.mapLng; mapState.mapData.sendOrderLat = hospitalMap.mapLat; - } else console.warn('查找不到发单点数据,请检查发单点!'); + } else notification.warn({ + message: '查找不到发单点数据,请检查发单点!', + duration: 2 + }); } @@ -545,7 +548,10 @@ mapState.mapData.courierUserName = courierUserMap.label; mapState.mapData.courierLng = courierUserMap.mapLng; mapState.mapData.courierLat = courierUserMap.mapLat; - } else console.warn('查找不到起点数据,请检查起点!'); + } else notification.warn({ + message: '查找不到起点数据,请检查起点!', + duration: 2 + }); } /** 处理打开任务配置 */ @@ -577,7 +583,10 @@ try { options = eval('(' + options + ')'); } catch (e) { - console.error('非法配置'); + notification.error({ + message: '非法配置', + duration: 2 + }); options = {}; } } @@ -603,11 +612,10 @@ destination && driving.search(new AMap.LngLat(mapState.mapData.courierLng, mapState.mapData.courierLat), destination, { waypoints: lngLats }, function(status, result) { - if (status === 'complete') { - console.log('绘制地图路线完成'); - } else { - console.error('获取地图数据失败:' + result); - } + notification.success({ + message: status === 'complete' ? '绘制地图路线完成!' : `获取地图数据失败:${result}`, + duration: 2 + }); }); }