diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index e74e44d..4f2cb4e 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -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(','); }); }