Commit 0fefd939 authored by youjie's avatar youjie

优化包车地图

parent c62338a3
......@@ -836,30 +836,30 @@
<template v-if="addMsg.CarType == 2">送机</template>
<template v-if="addMsg.CarType == 3">包车</template>
<template v-if="!addMsg.CarType">-</template>
(上车信息)
({{addMsg.CarType == 1?'下车':addMsg.CarType == 2?'上车':'上下车'}}信息)
<span style="float: right;margin-right: 206px;color: #6e6e6e;cursor: pointer;" @click="clickShow(2)">
{{ PlaceShow?'收起': '展开' }}
</span>
</span>
<template v-for="(item, index) in addMsg.PlaceList">
<div v-show="PlaceShow">
<el-form-item :label="`上车地址${index + 1}`" :prop="`PlaceList.${index}.Name`" :rules="rules.Name3">
<el-form-item :label="`地址${index + 1}`" :prop="`PlaceList.${index}.Name`" :rules="rules.Name3">
<div style="position: relative;">
<el-input maxlength="100" placeholder="请输入上车地址" class="w300 addAddress"
<el-input maxlength="100" placeholder="请输入地址" class="w300 addAddress"
v-model="item.Name"></el-input>
<i v-if="index == 0" class="el-icon-circle-plus addlist" @click="clickPlace(index, 1)"></i>
<i v-else class="el-icon-delete addlist" @click="clickPlace(index)"></i>
</div>
</el-form-item>
<el-form-item :label="`上车详细地址${index + 1}`" :prop="`PlaceList.${index}.Address`" :rules="rules.Address">
<el-input maxlength="300" placeholder="请输入上车详细地址" class="w300 addAddress" v-model="item.Address">
<el-form-item :label="`详细地址${index + 1}`" :prop="`PlaceList.${index}.Address`" :rules="rules.Address">
<el-input maxlength="300" placeholder="请输入详细地址" class="w300 addAddress" v-model="item.Address">
<el-button slot="append" @click="clickMapAddress(2, index, item.Address)"
icon="iconfont icon-img_dw"></el-button>
</el-input>
</el-form-item>
<div class="toolOne" style="margin: 0 0 28px 13px;">
<span class="fanbili">上车地理位置{{ index+ 1}}</span>
<span class="fanbili" style="width: 80px;text-align: right;"> 地理位置{{ index+ 1}}</span>
<div class="RabateDiv clearfix">
<div class="RebateCount reOne">
<div class="leftPnum">经度</div>
......@@ -872,7 +872,7 @@
</div>
</div>
<el-form-item :label="`距离中心范围${index + 1}`" :prop="`PlaceList.${index}.Range`" :rules="rules.Range">
<el-input type="Number" placeholder="上车距离中心范围" class="w300 addAddress" v-model="item.Range">
<el-input type="Number" placeholder="距离中心范围" class="w300 addAddress" v-model="item.Range">
<i slot="suffix"> m</i>
</el-input>
</el-form-item>
......
......@@ -55,6 +55,7 @@
height: '100%'
},
center: {lng: 116.404, lat: 39.915},
newCenter: {lng: '', lat: ''},
zoom: 20,
nearby: {
center: {
......@@ -124,21 +125,26 @@
})
this.center.lng = e.point.lng
this.center.lat = e.point.lat
this.newCenter.lng = e.point.lng
this.newCenter.lat = e.point.lat
},
syncCenterAndZoom (e) {
if(this.GetOff) return
const {lng, lat} = e.target.getCenter()
this.center.lng = lng
this.center.lat = lat
this.newCenter.lng = lng
this.newCenter.lat = lat
this.zoom = e.target.getZoom()
},
// 经纬度
determineLngLat(){
if(this.center.lng){
this.$emit("headCallBack", this.center, this.type, this.index, this.keyword);
if(this.newCenter.lng){
this.$emit("headCallBack", this.newCenter, this.type, this.index, this.keyword);
this.$emit("refList");
this.newCenter = {lng: '', lat: ''}
}else{
this.Error("请搜索您需要选择的地址");
this.Error("请搜索并选择您需要的地址");
}
},
}
......
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