|
@@ -24,12 +24,9 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-amap ref="map" vid="container" :zoom="zoom" :center="center" style="height: 600px;" class="amap-demo">
|
|
|
|
|
|
+ <el-amap ref="map" vid="container" :zoom="zoom" :plugins="plugin" :center="center" style="height: 600px;" class="amap-demo">
|
|
<el-amap-marker v-for="(marker,index) in markers" :key="index" :position="marker.position" :icon="marker.icon"></el-amap-marker>
|
|
<el-amap-marker v-for="(marker,index) in markers" :key="index" :position="marker.position" :icon="marker.icon"></el-amap-marker>
|
|
<el-amap-text v-for="text in texts" :key="text.id" :text="text.text" :offset="text.offset" :position="text.position" :events="text.events"></el-amap-text>
|
|
<el-amap-text v-for="text in texts" :key="text.id" :text="text.text" :offset="text.offset" :position="text.position" :events="text.events"></el-amap-text>
|
|
- <!-- <el-amap-polyline :path="polyline.path"></el-amap-polyline> -->
|
|
|
|
- <!-- <el-amap-info-window v-if="window" :position="window.position" :visible="window.visible"
|
|
|
|
- :content="window.content"></el-amap-info-window> -->
|
|
|
|
</el-amap>
|
|
</el-amap>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</template>
|
|
</template>
|
|
@@ -117,7 +114,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
init(data, mapData) {
|
|
init(data, mapData) {
|
|
- console.log("地图数据:", data, mapData);
|
|
|
|
let sendM = {
|
|
let sendM = {
|
|
id: 1,
|
|
id: 1,
|
|
position: [data.sendLng, data.sendLat],
|
|
position: [data.sendLng, data.sendLat],
|
|
@@ -149,7 +145,7 @@ export default {
|
|
|
|
|
|
let orderDistance =
|
|
let orderDistance =
|
|
mapData.orderDistance > 1000
|
|
mapData.orderDistance > 1000
|
|
- ? mapData.orderDistance / 1000 + "公里"
|
|
|
|
|
|
+ ? (mapData.orderDistance / 1000).toFixed(1) + "公里"
|
|
: mapData.orderDistance + "米";
|
|
: mapData.orderDistance + "米";
|
|
this.texts = [
|
|
this.texts = [
|
|
{
|
|
{
|
|
@@ -162,7 +158,7 @@ export default {
|
|
if (mapData.shipperLng && mapData.shipperLat && mapData.shipperDistance) {
|
|
if (mapData.shipperLng && mapData.shipperLat && mapData.shipperDistance) {
|
|
let distance =
|
|
let distance =
|
|
mapData.shipperDistance > 1000
|
|
mapData.shipperDistance > 1000
|
|
- ? mapData.shipperDistance / 1000 + "公里"
|
|
|
|
|
|
+ ? (mapData.shipperDistance / 1000).toFixed(1) + "公里"
|
|
: mapData.shipperDistance + "米";
|
|
: mapData.shipperDistance + "米";
|
|
this.texts.push({
|
|
this.texts.push({
|
|
id: 5,
|
|
id: 5,
|
|
@@ -202,6 +198,7 @@ export default {
|
|
},
|
|
},
|
|
chooseLocation() {
|
|
chooseLocation() {
|
|
this.dialogTableVisible = true;
|
|
this.dialogTableVisible = true;
|
|
|
|
+
|
|
this.showSearch = true;
|
|
this.showSearch = true;
|
|
this.searchKey = "";
|
|
this.searchKey = "";
|
|
this.lat = "";
|
|
this.lat = "";
|