|
@@ -128,6 +128,16 @@
|
|
|
@reload="reload"
|
|
@reload="reload"
|
|
|
:key="baiduMapKey"
|
|
:key="baiduMapKey"
|
|
|
ref="myMap">
|
|
ref="myMap">
|
|
|
|
|
+ <!-- 地图中心坐标 -->
|
|
|
|
|
+ <bm-marker
|
|
|
|
|
+ v-if="touchmoveTrue"
|
|
|
|
|
+ :position="{ lng: currentCenter.lng, lat: currentCenter.lat }"
|
|
|
|
|
+ class="aaaa"
|
|
|
|
|
+ :icon="{
|
|
|
|
|
+ url: require('@/assets/mapLocation.png'),
|
|
|
|
|
+ size: { width: 32, height: 60 },
|
|
|
|
|
+ }">
|
|
|
|
|
+ </bm-marker>
|
|
|
<!-- :minClusterSize="minClusterSize"-->
|
|
<!-- :minClusterSize="minClusterSize"-->
|
|
|
<bml-marker-clusterer :averageCenter="false" :styles="styless">
|
|
<bml-marker-clusterer :averageCenter="false" :styles="styless">
|
|
|
<bm-marker
|
|
<bm-marker
|
|
@@ -137,8 +147,6 @@
|
|
|
@click="infoShow(marker, index)"
|
|
@click="infoShow(marker, index)"
|
|
|
:icon="{ url: mpFn(marker, 2), size: { width: 34, height: 40 } }"></bm-marker>
|
|
:icon="{ url: mpFn(marker, 2), size: { width: 34, height: 40 } }"></bm-marker>
|
|
|
</bml-marker-clusterer>
|
|
</bml-marker-clusterer>
|
|
|
- <bm-marker :position="{ lng: lonmy, lat: latmy }"></bm-marker>
|
|
|
|
|
- <!-- +0.00003-->
|
|
|
|
|
<bm-marker
|
|
<bm-marker
|
|
|
:position="{ lng: info.lon, lat: info.lat }"
|
|
:position="{ lng: info.lon, lat: info.lat }"
|
|
|
:top="true"
|
|
:top="true"
|
|
@@ -162,10 +170,15 @@
|
|
|
lineHeight: '50px',
|
|
lineHeight: '50px',
|
|
|
}"
|
|
}"
|
|
|
:offset="{ width: -10, height: -10 }" />
|
|
:offset="{ width: -10, height: -10 }" />
|
|
|
- <!-- <bm-geolocation @locationSuccess="locationSuccess" anchor="BMAP_ANCHOR_BOTTOM_RIGHT" :showAddressBar="true" :autoLocation="true" :offset="{width:5,height:280}"></bm-geolocation>-->
|
|
|
|
|
</baidu-map>
|
|
</baidu-map>
|
|
|
- <img src="./../../assets/list.png" @click="onClickLeft" class="mapimg" />
|
|
|
|
|
- <img src="./../../assets/sbpm.png" @click="onMaps" class="mapimg" style="bottom: 286px" />
|
|
|
|
|
|
|
+ <img src="./../../assets/sbpm.png" @click="onMaps" class="mapimg" style="bottom: 340px" />
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="./../../assets/list.png"
|
|
|
|
|
+ @click="onClickLeft"
|
|
|
|
|
+ class="mapimg"
|
|
|
|
|
+ style="bottom: 286px" />
|
|
|
|
|
+ <!-- 获取当前中心位置数据 -->
|
|
|
|
|
+ <img src="./../../assets/searchLocation.png" @click="getLocationData" class="mapimg" />
|
|
|
<div v-if="show" class="mapStoreList">
|
|
<div v-if="show" class="mapStoreList">
|
|
|
<van-icon
|
|
<van-icon
|
|
|
name="close"
|
|
name="close"
|
|
@@ -859,6 +872,11 @@ export default {
|
|
|
baiduMapKey: new Date().getTime(),
|
|
baiduMapKey: new Date().getTime(),
|
|
|
isCompetingStores: true,
|
|
isCompetingStores: true,
|
|
|
postType: '',
|
|
postType: '',
|
|
|
|
|
+ currentCenter: {
|
|
|
|
|
+ lng: '',
|
|
|
|
|
+ lat: '',
|
|
|
|
|
+ }, //地图中心位置
|
|
|
|
|
+ touchmoveTrue: false, //移动后在线式中心图标
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -874,6 +892,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
|
this.postType = localStorage.getItem('postType');
|
|
this.postType = localStorage.getItem('postType');
|
|
|
|
|
+ this.touchmoveTrue = false;
|
|
|
this.listData = [];
|
|
this.listData = [];
|
|
|
this.baiduMapKey = new Date().getTime();
|
|
this.baiduMapKey = new Date().getTime();
|
|
|
this.closeFn();
|
|
this.closeFn();
|
|
@@ -981,6 +1000,16 @@ export default {
|
|
|
// this.mapk.clearOverlays()
|
|
// this.mapk.clearOverlays()
|
|
|
this.getposition();
|
|
this.getposition();
|
|
|
},
|
|
},
|
|
|
|
|
+ getLocationData() {
|
|
|
|
|
+ // let currentCenter = this.CJ02BD(34.62200241805427, 112.45384320079718);
|
|
|
|
|
+ // this.lon = currentCenter.lon;
|
|
|
|
|
+ // this.lat = currentCenter.lat;
|
|
|
|
|
+
|
|
|
|
|
+ this.lon = this.currentCenter.lng;
|
|
|
|
|
+ this.lat = this.currentCenter.lat;
|
|
|
|
|
+ console.log(this.lon, this.lat);
|
|
|
|
|
+ this.getUserOutPlaList();
|
|
|
|
|
+ },
|
|
|
getStoreTypeList() {
|
|
getStoreTypeList() {
|
|
|
getStoreTypeListlp({}).then((res) => {
|
|
getStoreTypeListlp({}).then((res) => {
|
|
|
this.storeTypeLists = res.data;
|
|
this.storeTypeLists = res.data;
|
|
@@ -1096,9 +1125,7 @@ export default {
|
|
|
this.listData = this.list;
|
|
this.listData = this.list;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- reload() {
|
|
|
|
|
- debugger;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ reload() {},
|
|
|
handler({ BMap, map }) {
|
|
handler({ BMap, map }) {
|
|
|
this.mapk = map;
|
|
this.mapk = map;
|
|
|
this.mapks = BMap;
|
|
this.mapks = BMap;
|
|
@@ -1123,18 +1150,21 @@ export default {
|
|
|
this.geocoder = new TMap.service.Geocoder();
|
|
this.geocoder = new TMap.service.Geocoder();
|
|
|
},
|
|
},
|
|
|
dragend(e) {
|
|
dragend(e) {
|
|
|
- this.getMapposition(e, '2', this.$route.query.tabVal);
|
|
|
|
|
|
|
+ this.touchmoveTrue = true;
|
|
|
|
|
+ // const currentCenter = this.mapk.getCenter();
|
|
|
|
|
+ // console.log(`当前中心点纬度: ${currentCenter.lat}, 经度: ${currentCenter.lng}`);
|
|
|
|
|
+ // this.getMapposition(e, '2', this.$route.query.tabVal);
|
|
|
|
|
+ var input = [e.target.re.lat, e.target.re.lng];
|
|
|
|
|
+ this.currentCenter = new TMap.LatLng(Number(input[0]), Number(input[1]));
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ console.log(`当前中心点纬度: ${this.currentCenter.lat}, 经度: ${this.currentCenter.lng}`);
|
|
|
},
|
|
},
|
|
|
zoomend(e) {
|
|
zoomend(e) {
|
|
|
this.getMapposition(e, '1', this.$route.query.tabVal);
|
|
this.getMapposition(e, '1', this.$route.query.tabVal);
|
|
|
},
|
|
},
|
|
|
getMapposition(e, type, listType) {
|
|
getMapposition(e, type, listType) {
|
|
|
- debugger;
|
|
|
|
|
var that = this;
|
|
var that = this;
|
|
|
var typeList = -1;
|
|
var typeList = -1;
|
|
|
- var input = [e.target.re.lat, e.target.re.lng];
|
|
|
|
|
- var location = new TMap.LatLng(Number(input[0]), Number(input[1]));
|
|
|
|
|
-
|
|
|
|
|
var Zoom = e.target.getZoom();
|
|
var Zoom = e.target.getZoom();
|
|
|
if (listType == 1) {
|
|
if (listType == 1) {
|
|
|
typeList = 1;
|
|
typeList = 1;
|
|
@@ -1159,11 +1189,11 @@ export default {
|
|
|
var PointSum = that.twoPointSum(lat, lon, that.latsave, that.lonsave).toFixed(2);
|
|
var PointSum = that.twoPointSum(lat, lon, that.latsave, that.lonsave).toFixed(2);
|
|
|
this.lon = this.mapk.getCenter().lng;
|
|
this.lon = this.mapk.getCenter().lng;
|
|
|
this.lat = this.mapk.getCenter().lat;
|
|
this.lat = this.mapk.getCenter().lat;
|
|
|
- if (PointSum > 3000) {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.getUserOutPlaList();
|
|
|
|
|
- }, 1000);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (PointSum > 3000) {
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // this.getUserOutPlaList();
|
|
|
|
|
+ // }, 1000);
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
getStoreMapInfo(val) {
|
|
getStoreMapInfo(val) {
|
|
@@ -1336,6 +1366,8 @@ export default {
|
|
|
that.lon1 = location.lon;
|
|
that.lon1 = location.lon;
|
|
|
that.latmy = location.lat;
|
|
that.latmy = location.lat;
|
|
|
that.lonmy = location.lon;
|
|
that.lonmy = location.lon;
|
|
|
|
|
+ that.currentCenter.lat = that.latmy;
|
|
|
|
|
+ that.currentCenter.lng = that.lonmy;
|
|
|
that.mapk.centerAndZoom(new BMap.Point(location.lon, location.lat), 18);
|
|
that.mapk.centerAndZoom(new BMap.Point(location.lon, location.lat), 18);
|
|
|
that.onSearch();
|
|
that.onSearch();
|
|
|
// that.getUserOutPlaList('2');
|
|
// that.getUserOutPlaList('2');
|
|
@@ -1385,7 +1417,6 @@ export default {
|
|
|
this.getpointList(row);
|
|
this.getpointList(row);
|
|
|
},
|
|
},
|
|
|
getpointList(val) {
|
|
getpointList(val) {
|
|
|
- debugger;
|
|
|
|
|
var that = this;
|
|
var that = this;
|
|
|
let loading3 = this.$toast.loading({
|
|
let loading3 = this.$toast.loading({
|
|
|
duration: 0,
|
|
duration: 0,
|
|
@@ -1556,11 +1587,9 @@ export default {
|
|
|
this.$toast('附近无客户信息');
|
|
this.$toast('附近无客户信息');
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
}
|
|
}
|
|
|
- if (res.total > 50) {
|
|
|
|
|
- this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
- this.msgshow = true;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
+ this.msgshow = true;
|
|
|
|
|
+ this.show = false;
|
|
|
if (this.first < 2) {
|
|
if (this.first < 2) {
|
|
|
this.zoom = 18;
|
|
this.zoom = 18;
|
|
|
this.first = 2;
|
|
this.first = 2;
|
|
@@ -1598,11 +1627,9 @@ export default {
|
|
|
this.$toast('附近无客户信息');
|
|
this.$toast('附近无客户信息');
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
}
|
|
}
|
|
|
- if (res.total > 50) {
|
|
|
|
|
- this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
- this.msgshow = true;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
+ this.msgshow = true;
|
|
|
|
|
+ this.show = false;
|
|
|
if (this.first < 2) {
|
|
if (this.first < 2) {
|
|
|
this.zoom = 18;
|
|
this.zoom = 18;
|
|
|
this.first = 2;
|
|
this.first = 2;
|
|
@@ -1640,11 +1667,9 @@ export default {
|
|
|
this.$toast('附近无客户信息');
|
|
this.$toast('附近无客户信息');
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
}
|
|
}
|
|
|
- if (res.total > 50) {
|
|
|
|
|
- this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
- this.msgshow = true;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
+ this.msgshow = true;
|
|
|
|
|
+ this.show = false;
|
|
|
if (this.first < 2) {
|
|
if (this.first < 2) {
|
|
|
this.zoom = 18;
|
|
this.zoom = 18;
|
|
|
this.first = 2;
|
|
this.first = 2;
|
|
@@ -1690,7 +1715,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- debugger;
|
|
|
|
|
getUserOrgStoreList({
|
|
getUserOrgStoreList({
|
|
|
type: 2,
|
|
type: 2,
|
|
|
lon: this.lon,
|
|
lon: this.lon,
|
|
@@ -1723,11 +1747,9 @@ export default {
|
|
|
this.$toast('附近无客户信息');
|
|
this.$toast('附近无客户信息');
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
}
|
|
}
|
|
|
- if (res.total > 50) {
|
|
|
|
|
- this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
- this.msgshow = true;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.msg = this.setMapRangeTitle(res.total);
|
|
|
|
|
+ this.msgshow = true;
|
|
|
|
|
+ this.show = false;
|
|
|
if (this.first < 2) {
|
|
if (this.first < 2) {
|
|
|
this.zoom = 18;
|
|
this.zoom = 18;
|
|
|
this.first = 2;
|
|
this.first = 2;
|