From 17600d7e2220eb0bbbc3080fb8e544d52f756252 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Fri, 2 Sep 2022 22:10:21 +0800 Subject: [PATCH] =?UTF-8?q?:rocket:=20=E4=BC=98=E9=9B=85=E7=9A=84=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AMap/src/AMapDesigner/index.vue | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) 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 + }); }); }