Commit 8192e7ee authored by 黄奎's avatar 黄奎
parents ecc51545 c4550d0a
......@@ -61,7 +61,7 @@
{{HotelLength}}
</span>
</button>
<input type="button" class="normalBtn" value="查询" @click="getList()" />
<input type="button" class="normalBtn" value="查询" @click="getList(),msg.pageIndex=1" />
</li>
</ul>
</div>
......
<template>
<div>
<div style="text-align: center;display: flex;justify-content: center;">
<el-input style="margin-right: 10px;" id="suggestId" v-model="city" placeholder="请输入搜索名称" name="address_detail" />
<input type="button" class="normalBtn sureBtn" value="搜索" @click="search"/>
</div>
<div style="height: 330px;width: 100%;margin-top: 15px;" :id="`allmap_${id}`"></div>
<div class="btnList">
<input type="button" class="normalBtn sureBtn" value="确定" @click="sendMsg"/>
<input type="button" class="hollowFixedBtn" value="取消" @click="closeDialog"/>
</div>
</div>
</template>
<script>
export default {
props: ["Address","id"],
data(){
return{
city: '',
address_detail: null, //详细地址
add_housing_list: [""],
userlocation: null,
dataList: null,
point: {
lng:'',
lat: ''
}
}
},
watch: {
Address: {
handler(newValue) {
this.city = this.Address
this.search()
},
immediate: true
},
},
mounted() {
this.city = this.Address
this.getcity()
},
methods:{
closeDialog() {
this.$emit("refList");
},
sendMsg() {
// if (!this.isdisable) {
// this.tips("请点击选择地址", "info");
// } else {
// this.$emit("headCallBack", this.dataList);
// this.$emit("refList");
// }
},
search(){
var that = this
var map = new BMap.Map(`allmap_${that.id}`)
var local = new BMap.LocalSearch(map, { // 智能搜索
onSearchComplete: function (){
that.userlocation = local.getResults().getPoi(0).point // 获取第一个智能搜索的结果
that.point.lat = that.userlocation.lat
that.point.lng = that.userlocation.lng
map.centerAndZoom(that.userlocation, 15)
map.addOverlay(new BMap.Marker(that.userlocation)) // 添加标注
}
})
local.search(that.city)
map.addEventListener('click', function(e,target) {
var point = new BMap.Point(e.point.lng, e.point.lat) // 创建点坐标,汉得公司的经纬度坐标
map.centerAndZoom(point, 15)
// console.log(e,target)
// // 经度
// console.log(that.userlocation.lng)
// // 纬度
// console.log(that.userlocation.lat)
})
map.addEventListener('mousedown', function(type, target, point,pixel) {
console.log(type, target+'---', point+'---',pixel+'---')
// // 经度
// console.log(that.userlocation.lng)
// // 纬度
// console.log(that.userlocation.lat)
})
},
getcity(){
this.$nextTick(function() {
var that = this
// 创建Map实例
var map = new BMap.Map(`allmap_${that.id}`)
// 初始化地图,设置中心点坐标,
var point = new BMap.Point(120.211877, 30.255194) // 创建点坐标
map.centerAndZoom(point, 15)
map.enableScrollWheelZoom()
that.search()
})
},
// 新增小区 点击的地址增加进list
add_housing() {
this.add_housing_list.push(this.city)
},
// 删除小区
delete_housing(index) {
// console.log(index)
this.add_housing_list.splice(index, 1)
},
}
}
</script>
<style scoped>
.btnList {
margin: 15px 0 0 auto;
text-align: right;
margin-bottom: 15px;
}
</style>
\ No newline at end of file
......@@ -127,7 +127,9 @@
watch: {
ticket: {
handler: function (val, oldVal) {
this.t = JSON.parse(JSON.stringify(this.ticket))
this.images = this.t.PicPathList
this.initMap(this.t.Lng,this.t.Lat,this.t.Name)
},
deep: true
},
......
......@@ -2045,6 +2045,30 @@ export default {
title: '车月统计'
},
},
{
path: '/CharteringProductList', //包车产品
name: 'CharteringProductList',
component: resolve => require(['@/components/busManagement/CharteringManagement/CharteringProductList'], resolve),
meta: {
title: '包车管理'
},
},
{
path: '/CharteringInfoManage', //新增、修改包车产品
name: 'CharteringInfoManage',
component: resolve => require(['@/components/busManagement/CharteringManagement/CharteringInfoManage'], resolve),
meta: {
title: '新增修改产品'
},
},
{
path: '/CharteringQuotation', //包车产品报价
name: 'CharteringQuotation',
component: resolve => require(['@/components/busManagement/CharteringManagement/CharteringQuotation'], resolve),
meta: {
title: '产品报价'
},
},
{
path: '/busAccountInfo', //车控内部核算详情
name: 'busAccountInfo',
......
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