|
|
|
@ -67,6 +67,7 @@
@@ -67,6 +67,7 @@
|
|
|
|
|
let largeHospitalMarkerCluster; |
|
|
|
|
let smallHospitalMarkerCluster; |
|
|
|
|
let takeSpecimenCluster; |
|
|
|
|
let scanTakeSpecimenCircleRange; |
|
|
|
|
const instance = getCurrentInstance(); |
|
|
|
|
const mapState = reactive({ |
|
|
|
|
loading: false, |
|
|
|
@ -124,8 +125,9 @@
@@ -124,8 +125,9 @@
|
|
|
|
|
AMapLoader.load({ |
|
|
|
|
key: mapConfig.amapKey, |
|
|
|
|
version: '2.0', |
|
|
|
|
plugins: ['AMap.MarkerCluster', 'AMap.RectangleEditor', 'AMap.Driving'] |
|
|
|
|
plugins: ['AMap.MarkerCluster', 'AMap.Driving'] |
|
|
|
|
}).then(AMap => { |
|
|
|
|
|
|
|
|
|
// 创建地图实例 |
|
|
|
|
map = new AMap.Map(instance.refs.mapview, mapConfig.options); |
|
|
|
|
map.plugin(['AMap.ToolBar', 'AMap.MapType', 'AMap.ControlBar', 'AMap.Scale'], () => { |
|
|
|
@ -292,6 +294,21 @@
@@ -292,6 +294,21 @@
|
|
|
|
|
map: map, |
|
|
|
|
panel: instance.refs.mapPanel |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 扫描收样员园形范围 |
|
|
|
|
scanTakeSpecimenCircleRange = new AMap.Circle({ |
|
|
|
|
radius: 2000, |
|
|
|
|
borderWeight: 3, |
|
|
|
|
strokeColor: '#3600ff', |
|
|
|
|
strokeOpacity: 0.2, |
|
|
|
|
strokeWeight: 6, |
|
|
|
|
fillOpacity: 0.4, |
|
|
|
|
strokeStyle: 'dashed', |
|
|
|
|
strokeDasharray: [8, 8], |
|
|
|
|
fillColor: '#1791fc', |
|
|
|
|
zIndex: 50 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 根据起终点经纬度规划驾车导航路线 |
|
|
|
|
driving.search(new AMap.LngLat(112.913864, 28.295114), new AMap.LngLat(112.918119, 28.282891), { |
|
|
|
|
waypoints:[new AMap.LngLat(112.919165, 28.289924)] |
|
|
|
@ -347,8 +364,17 @@
@@ -347,8 +364,17 @@
|
|
|
|
|
// 查找当前下级医院数据 |
|
|
|
|
const smallHospitalMap = smallHospitalMapList.find(item => item.id == value); |
|
|
|
|
if (smallHospitalMap) { |
|
|
|
|
// 定位当前发单点位置 |
|
|
|
|
map.setZoomAndCenter(18, [smallHospitalMap.lng, smallHospitalMap.lat]); |
|
|
|
|
// 绘制20公里,园形矢量图,并且检测这个范围内是否有收样员 |
|
|
|
|
map.remove(scanTakeSpecimenCircleRange); |
|
|
|
|
scanTakeSpecimenCircleRange.setCenter([smallHospitalMap.lng, smallHospitalMap.lat]); |
|
|
|
|
map.add(scanTakeSpecimenCircleRange); |
|
|
|
|
map.setFitView([ scanTakeSpecimenCircleRange ]); |
|
|
|
|
// 查找园圈内的收样员 |
|
|
|
|
const specimenLngLat = new AMap.LngLat(116.403984,39.907535); |
|
|
|
|
|
|
|
|
|
if (scanTakeSpecimenCircleRange.contains()) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
throw '查找不到发单点数据,请检查发单点!'; |
|
|
|
|