Commit d423b62c authored by youjie's avatar youjie

no message

parent b802d08f
......@@ -1162,7 +1162,7 @@
this.addMsg.AirportList&&this.addMsg.AirportList.forEach(x=>{
// x.Id=0,
// x.ProductId= 0//产品id
x.AirportId= 0//机场id
x.AirportId= ''//机场id
// x.Lng= ''
// x.Lat= ''
x.Name= ''//机场名称 包含IATA
......@@ -1253,6 +1253,14 @@
this.addimg = false;
},
saveResource() {
this.addMsg.CityList.forEach(x=>{
this.addMsg.AirportList.forEach(y=>{
y.Country = x.Country
y.Province = x.Province
y.City = x.City
y.District = x.District
})
})
console.log(this.addMsg,'======')
if (this.ID != "undefined") {
this.addMsg.Id = this.ID;
......@@ -1399,12 +1407,16 @@
})
}else{
dataInfo.CityList.forEach(x=>{
this.addMsg.CityList2.push({
let dataS = {
Country: x.Country,
Province: x.Province,//产品id
City: x.City,//机场id
District: x.District,
Province: '',
City: '',
District: '',
}
x.City.forEach(y=>{
dataS.Province = y.City
})
this.addMsg.CityList.push(dataS)
})
}
if (this.addMsg.CityList[0].Country > 0) {
......@@ -1537,7 +1549,7 @@
handleInputConfirm() {
let inputValue = this.inputValue;
if (inputValue) {
this.tipsList.push(inputValue);
this.addMsg.PriceIncludeList.push(inputValue);
}
this.inputVisible = false;
this.inputValue = "";
......@@ -1556,7 +1568,7 @@
handleInputConfirm2() {
let inputValue = this.inputValue2;
if (inputValue) {
this.Geographic.push(inputValue);
this.addMsg.PriceNotIncludeList.push(inputValue);
}
this.inputVisible2 = false;
this.inputValue2 = "";
......@@ -1569,7 +1581,11 @@
// this.addMsg.QProvince = msg.province;
// this.addMsg.QCity = msg.city;
// this.addMsg.Address = msg.address;
this.addMsg.Lng = msg.lng;
this.addMsg.AirportList.forEach(x=>{
x.Lng = msg.lng;
x.Lat = msg.lat;
})
this.addMsg.Lat = msg.lat;
},
//获取国家
......
......@@ -251,7 +251,7 @@
<button class="hollowFixedBtn" type="button"
@click="resetPageIndex(),selectResource()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" type="button"
@click="$router.push('scenicSpotInfoManage')">{{$t('pub.addBtn')}}</button>
@click="$router.push('CharteringInfoManage')">{{$t('pub.addBtn')}}</button>
<button class="hollowFixedBtn" type="button" @click="DownLoadFile()">{{$t('adm.adm_download')}}</button>
</li>
</ul>
......
<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" />
<el-input class="w300" 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>
......@@ -46,24 +46,26 @@ export default {
this.$emit("refList");
},
sendMsg() {
// if (!this.isdisable) {
// this.tips("请点击选择地址", "info");
// } else {
// this.$emit("headCallBack", this.dataList);
// this.$emit("refList");
// }
if (!this.point.lng) {
this.tips("请搜索选择", "info");
} else {
this.$emit("headCallBack", this.point);
this.$emit("refList");
}
},
search(){
var that = this
var map = new BMap.Map(`allmap_${that.id}`)
var local = new BMap.LocalSearch(map, { // 智能搜索
onSearchComplete: function (){
if(local.getResults()&&local.getResults().getPoi(0)&&local.getResults().getPoi(0).point){
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) {
......@@ -76,11 +78,7 @@ export default {
// 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)
console.log(type.point, target+'---', point+'---',pixel+'---')
})
},
getcity(){
......
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