diff --git a/kicc-ui/src/components/AMap/src/Amap.vue b/kicc-ui/src/components/AMap/src/Amap.vue
index 78c741c8..fb05dd86 100644
--- a/kicc-ui/src/components/AMap/src/Amap.vue
+++ b/kicc-ui/src/components/AMap/src/Amap.vue
@@ -18,15 +18,25 @@
:wrapperCol="{ style: { width: '100%', 'margin-right': '10px' } }"
:model="mapState.modelRef"
>
+
+
+
-
+
@@ -56,7 +66,7 @@
let map;
let largeHospitalMarkerCluster;
let smallHospitalMarkerCluster;
- let specimenMarkerCluster;
+ let takeSpecimenCluster;
const instance = getCurrentInstance();
const mapState = reactive({
loading: false,
@@ -67,9 +77,10 @@
},
toggleStatus: true,
modelRef: {
+ smallHospitalTakeId: '',
largeHospitalId: '',
smallHospitalId: '',
- specimenMarkerId: ''
+ takeSpecimenId: ''
}
});
const AForm = Form;
@@ -79,12 +90,10 @@
title: '地图任务列表',
rowKey: 'id',
dataSource: [{
+ id: '001',
taskName: '测试任务1'
},{
- taskName: '测试任务2'
- },{
- taskName: '测试任务2'
- },{
+ id: '002',
taskName: '测试任务2'
}],
columns,
@@ -234,7 +243,7 @@
smallHospitalMarkerCluster?.setData(smallHospitalPoints);
// 收样员标记点
- specimenMarkerCluster = new AMap.MarkerCluster(map, [], {
+ takeSpecimenCluster = new AMap.MarkerCluster(map, [], {
gridSize: 80,
maxZoom: 14,
renderMarker(ctx) {
@@ -268,7 +277,7 @@
marker.setOffset(new AMap.Pixel(-18, -10));
}
});
- specimenMarkerCluster.on('click', ctx => {
+ takeSpecimenCluster.on('click', ctx => {
const { lnglat } = ctx;
map.setZoomAndCenter(18, lnglat);
});
@@ -276,7 +285,7 @@
lnglat: [v.lng, v.lat],
...v
}));
- specimenMarkerCluster?.setData(specimenPoints);
+ takeSpecimenCluster?.setData(specimenPoints);
// 构造路线导航类
const driving = new AMap.Driving({
@@ -333,6 +342,19 @@
}
}
+ /** 处理收取标本收养员搜索 */
+ function handleTakeSpecimenSearch (value) {
+ // 查找当前下级医院数据
+ const smallHospitalMap = smallHospitalMapList.find(item => item.id == value);
+ if (smallHospitalMap) {
+ // 定位当前发单点位置
+ map.setZoomAndCenter(18, [smallHospitalMap.lng, smallHospitalMap.lat]);
+
+ } else {
+ throw '查找不到发单点数据,请检查发单点!';
+ }
+ }
+