Commit 16a01c4c authored by youjie's avatar youjie

no message

parent ccd60ee4
...@@ -65,13 +65,13 @@ ...@@ -65,13 +65,13 @@
<div> <div>
<span class="MapImgButtom CancelMapImg" @click="Cancel">取消</span> <span class="MapImgButtom CancelMapImg" @click="Cancel">取消</span>
</div> </div>
<!-- <div style="margin-left: 20px;"> <div style="margin-left: 20px;">
<span <span
class="MapImgButtom setMapImg" class="MapImgButtom setMapImg"
@click="SavePositionStr" @click="SavePositionStr"
>保存坐标</span >保存坐标</span
> >
</div> --> </div>
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
<span <span
class="MapImgButtom setMapImg" class="MapImgButtom setMapImg"
...@@ -427,26 +427,40 @@ export default { ...@@ -427,26 +427,40 @@ export default {
}); });
} }
}, },
// 更新城市标记坐标
setCitiesPosition(){
this.TripMapList.forEach(x => {
x.CityList.forEach(y => {
this.citiesData.forEach(z => {
if (y.MName == z.name) {
y.Lng = z.Lng;
y.Lat = z.Lat;
}
});
});
});
},
// 保存标记坐标 // 保存标记坐标
SavePositionStr() { SavePositionStr() {
this.dataAll.TripMapList = JSON.parse(JSON.stringify(this.TripMapList));
return
this.TripMapList.forEach(x => { this.TripMapList.forEach(x => {
x.CityList.forEach(y => { x.CityList.forEach(y => {
this.citiesData.forEach(z => { this.citiesData.forEach(z => {
if (y.MName == z.name) { if (y.MName == z.name) {
y.Lng = z.Lng; y.Lng = z.Lng;
y.Lat = z.Lat; y.Lat = z.Lat;
} }
});
}); });
// this.countriesData.forEach(y => {
// if (x.MName == y.name) {
// x.Lng = y.Lng;
// x.Lat = y.Lat;
// }
// });
}); });
// this.countriesData.forEach(y => {
// if (x.MName == y.name) {
// x.Lng = y.Lng;
// x.Lat = y.Lat;
// }
// });
});
this.dataAll.TripMapList = JSON.parse(JSON.stringify(this.TripMapList));
}, },
// 导出地图片 // 导出地图片
getResultImg() { getResultImg() {
...@@ -758,7 +772,7 @@ export default { ...@@ -758,7 +772,7 @@ export default {
let currentMarkerLngLat = marker.getLngLat(); let currentMarkerLngLat = marker.getLngLat();
that.citiesData[i].Lng = currentMarkerLngLat.lng; that.citiesData[i].Lng = currentMarkerLngLat.lng;
that.citiesData[i].Lat = currentMarkerLngLat.lat; that.citiesData[i].Lat = currentMarkerLngLat.lat;
that.SavePositionStr() that.setCitiesPosition()
}); });
this.deviceMarkers.push(marker); this.deviceMarkers.push(marker);
...@@ -959,7 +973,6 @@ export default { ...@@ -959,7 +973,6 @@ export default {
TripMapList = that.TripMapList.filter(y=> y.MName==x.MName) TripMapList = that.TripMapList.filter(y=> y.MName==x.MName)
TripMapList[0].Lng = currentMarkerLngLat.lng; TripMapList[0].Lng = currentMarkerLngLat.lng;
TripMapList[0].Lat = currentMarkerLngLat.lat; TripMapList[0].Lat = currentMarkerLngLat.lat;
that.SavePositionStr()
}); });
this.countriesMarkers.push(marker); this.countriesMarkers.push(marker);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment