Browse Source

🚀 地图设计器调整完毕

master
wangxiang 3 years ago
parent
commit
91826d33bc
  1. 26
      src/components/AMap/src/AMapDesigner/index.vue

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

@ -685,9 +685,35 @@ @@ -685,9 +685,35 @@
const mapData = toRaw(mapState.mapData);
mapData.fileId = (mapData.fileId as [] || []).join(',');
mapData.mapTask.forEach(item => {
const hospital = mapState.hospitalList.find(e => e.value == item.hospitalId),
org = mapState.orgList.find(e => e.value == item.orgId);
item.courierUserId = mapData.courierUserId;
hospital && Object.assign(item,{
hospitalName: hospital.label,
hospitalLng: hospital.mapLng,
hospitalLat: hospital.mapLat
});
org && Object.assign(item,{
orgName: org.label,
orgLng: org.mapLng,
orgLat: org.mapLat
});
item.fileId = (item.fileId as [] || []).join(',');
if (~~item.taskType == 1) {
item?.mapTaskPreset?.forEach(childItem => {
const childHospital = mapState.hospitalList.find(e => e.value == childItem.hospitalId),
childOrg = mapState.orgList.find(e => e.value == childItem.orgId);
childItem.courierUserId = mapData.courierUserId;
childHospital && Object.assign(item,{
orgin_preset_name: childHospital.label,
orgin_preset_lng: childHospital.mapLng,
orgin_preset_lat: childHospital.mapLat
});
childOrg && Object.assign(item,{
destination_preset_name: childOrg.label,
destination_preset_lng: childOrg.mapLng,
destination_preset_lat: childOrg.mapLat
});
childItem.fileId = (childItem.fileId as [] || [])?.join(',');
});
}

Loading…
Cancel
Save