|
@@ -3,7 +3,7 @@
|
|
<div id='map'></div>
|
|
<div id='map'></div>
|
|
<div id="position">
|
|
<div id="position">
|
|
<div id="zoom">
|
|
<div id="zoom">
|
|
- 当前级别 : 6
|
|
|
|
|
|
+ 当前级别 : 7
|
|
</div>
|
|
</div>
|
|
<div id="move">
|
|
<div id="move">
|
|
当前中心点: 纬度:0.00000,经度:0.00000
|
|
当前中心点: 纬度:0.00000,经度:0.00000
|
|
@@ -71,6 +71,9 @@ export default {
|
|
// window.BM.Config.HTTP_URL = 'http://49.4.78.194:17143';
|
|
// window.BM.Config.HTTP_URL = 'http://49.4.78.194:17143';
|
|
// let ip1 = 'http://49.4.78.194:17143';
|
|
// let ip1 = 'http://49.4.78.194:17143';
|
|
// let ip2 = 'http://49.4.78.194:17143';
|
|
// let ip2 = 'http://49.4.78.194:17143';
|
|
|
|
+ // window.BM.Config.HTTP_URL = 'http://localhost:9000';
|
|
|
|
+ // let ip1 = 'http://localhost:9000';
|
|
|
|
+ // let ip2 = 'http://localhost:9000';
|
|
let mapid = 'bigemap.re-huafu'
|
|
let mapid = 'bigemap.re-huafu'
|
|
// window.BM.Config.HTTP_URL = 'http://192.168.1.181:9000';
|
|
// window.BM.Config.HTTP_URL = 'http://192.168.1.181:9000';
|
|
// arcgis-satellite
|
|
// arcgis-satellite
|
|
@@ -79,6 +82,7 @@ export default {
|
|
// let map = window.BM.map('map', 'bigemap.arcgis-satellite', {
|
|
// let map = window.BM.map('map', 'bigemap.arcgis-satellite', {
|
|
let map = window.BM.map('map', null, {
|
|
let map = window.BM.map('map', null, {
|
|
center: [30, 104],
|
|
center: [30, 104],
|
|
|
|
+ // center:[46.69090,128.13354],
|
|
minZoom: 6,
|
|
minZoom: 6,
|
|
maxZoom: 12,
|
|
maxZoom: 12,
|
|
zoom: 11,
|
|
zoom: 11,
|
|
@@ -152,6 +156,18 @@ export default {
|
|
});
|
|
});
|
|
}).addTo(this.bMap);
|
|
}).addTo(this.bMap);
|
|
window.geo2 = geo2;
|
|
window.geo2 = geo2;
|
|
|
|
+ // let temp =
|
|
|
|
+ // {
|
|
|
|
+ // "_southWest": {
|
|
|
|
+ // "lat": 43.36512572875844,
|
|
|
|
+ // "lng": 120.10253906250001
|
|
|
|
+ // },
|
|
|
|
+ // "_northEast": {
|
|
|
|
+ // "lat": 49.724479188712984,
|
|
|
|
+ // "lng": 141.19628906250003
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ console.log(geo2.getBounds())
|
|
//限制拖动
|
|
//限制拖动
|
|
this.bMap.setMaxBounds(geo2.getBounds());
|
|
this.bMap.setMaxBounds(geo2.getBounds());
|
|
this.bMap.fitBounds(geo2.getBounds());
|
|
this.bMap.fitBounds(geo2.getBounds());
|
|
@@ -177,6 +193,8 @@ export default {
|
|
this.bMap.setView(this.mapData.center, this.mapData.level)
|
|
this.bMap.setView(this.mapData.center, this.mapData.level)
|
|
// this.bMap.setZoom(this.mapData.level)
|
|
// this.bMap.setZoom(this.mapData.level)
|
|
// this.bMap.panTo(this.mapData.center)
|
|
// this.bMap.panTo(this.mapData.center)
|
|
|
|
+ } else {
|
|
|
|
+ this.bMap.setView([46.69090, 128.13354], 7)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -187,7 +205,7 @@ export default {
|
|
let fjIconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji.png'
|
|
let fjIconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji.png'
|
|
let gfbconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guangfuban.png'
|
|
let gfbconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guangfuban.png'
|
|
let gfsconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guang.png'
|
|
let gfsconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guang.png'
|
|
- let gfhfconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/huafugf.png'
|
|
|
|
|
|
+ let gfhfconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/huafuguangfu.png'
|
|
// 所有场站标记点位
|
|
// 所有场站标记点位
|
|
if (this.mapData.allStationInfo !== null && this.mapData.allStationInfo !== undefined) {
|
|
if (this.mapData.allStationInfo !== null && this.mapData.allStationInfo !== undefined) {
|
|
let data = this.mapData.allStationInfo
|
|
let data = this.mapData.allStationInfo
|
|
@@ -214,13 +232,13 @@ export default {
|
|
for (let item of data.otherStation) {
|
|
for (let item of data.otherStation) {
|
|
let coordinate = [Number(item.latitude), Number(item.longitude)]
|
|
let coordinate = [Number(item.latitude), Number(item.longitude)]
|
|
let marker = '';
|
|
let marker = '';
|
|
- if(item.type === '风'){
|
|
|
|
|
|
+ if (item.type === '风') {
|
|
marker = window.BM.marker(coordinate, {
|
|
marker = window.BM.marker(coordinate, {
|
|
icon: station_icon,
|
|
icon: station_icon,
|
|
riseOnHover: true
|
|
riseOnHover: true
|
|
}).addTo(this.bMap);
|
|
}).addTo(this.bMap);
|
|
- }else {
|
|
|
|
- marker =window.BM.marker(coordinate, {
|
|
|
|
|
|
+ } else {
|
|
|
|
+ marker = window.BM.marker(coordinate, {
|
|
icon: gfstation_icon,
|
|
icon: gfstation_icon,
|
|
riseOnHover: true
|
|
riseOnHover: true
|
|
}).addTo(this.bMap);
|
|
}).addTo(this.bMap);
|
|
@@ -237,12 +255,12 @@ export default {
|
|
for (let item of data.HDStation) {
|
|
for (let item of data.HDStation) {
|
|
let coordinate = [Number(item.latitude), Number(item.longitude)]
|
|
let coordinate = [Number(item.latitude), Number(item.longitude)]
|
|
let marker = '';
|
|
let marker = '';
|
|
- if(item.type === '风'){
|
|
|
|
|
|
+ if (item.type === '风') {
|
|
marker = window.BM.marker(coordinate, {
|
|
marker = window.BM.marker(coordinate, {
|
|
icon: hf_station_icon,
|
|
icon: hf_station_icon,
|
|
riseOnHover: true
|
|
riseOnHover: true
|
|
}).addTo(this.bMap);
|
|
}).addTo(this.bMap);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
marker = window.BM.marker(coordinate, {
|
|
marker = window.BM.marker(coordinate, {
|
|
icon: hf_gfstation_icon,
|
|
icon: hf_gfstation_icon,
|
|
riseOnHover: true
|
|
riseOnHover: true
|
|
@@ -272,15 +290,15 @@ export default {
|
|
iconAnchor: [30, 50]
|
|
iconAnchor: [30, 50]
|
|
})
|
|
})
|
|
for (let item of data) {
|
|
for (let item of data) {
|
|
- if(item.latitude !== undefined){
|
|
|
|
|
|
+ if (item.latitude !== undefined) {
|
|
let coordinate = [Number(item.latitude), Number(item.longitude)]
|
|
let coordinate = [Number(item.latitude), Number(item.longitude)]
|
|
let marker = '';
|
|
let marker = '';
|
|
- if(item.type === '风'){
|
|
|
|
|
|
+ if (item.type === '风') {
|
|
marker = window.BM.marker(coordinate, {
|
|
marker = window.BM.marker(coordinate, {
|
|
icon: station_icon,
|
|
icon: station_icon,
|
|
riseOnHover: true
|
|
riseOnHover: true
|
|
}).addTo(this.bMap);
|
|
}).addTo(this.bMap);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
marker = window.BM.marker(coordinate, {
|
|
marker = window.BM.marker(coordinate, {
|
|
icon: gf_icon,
|
|
icon: gf_icon,
|
|
riseOnHover: true
|
|
riseOnHover: true
|
|
@@ -359,17 +377,22 @@ export default {
|
|
}).addTo(this.bMap);
|
|
}).addTo(this.bMap);
|
|
}
|
|
}
|
|
for (let coordinatesList of data.coordinatesList) {
|
|
for (let coordinatesList of data.coordinatesList) {
|
|
- for (let item of coordinatesList) {
|
|
|
|
- if (item.length > 0) {
|
|
|
|
- let latlngs = []
|
|
|
|
- for (let coor of item) {
|
|
|
|
- latlngs.push([Number(coor.latitude), Number(coor.longitude)])
|
|
|
|
- window.BM.marker([Number(coor.latitude), Number(coor.longitude)]).addTo(this.bMap);
|
|
|
|
|
|
+ for (let key in coordinatesList) {
|
|
|
|
+ let coordinates = coordinatesList[key]
|
|
|
|
+ for(let item of coordinates){
|
|
|
|
+ if (item.length > 0) {
|
|
|
|
+ let latlngs = []
|
|
|
|
+ for (let coor of item) {
|
|
|
|
+ latlngs.push([Number(coor.latitude), Number(coor.longitude)])
|
|
|
|
+ window.BM.marker([Number(coor.latitude), Number(coor.longitude)]).addTo(this.bMap);
|
|
|
|
+ }
|
|
|
|
+ var polygon = BM.polygon(latlngs).addTo(this.bMap);
|
|
|
|
+ polygon.bindTooltip(key, {permanent: true, className: 'infoToolTip', offset: [0, 0]}).openTooltip();
|
|
|
|
+ // 让地图适配当前的线段
|
|
|
|
+ this.bMap.fitBounds(polygon.getBounds());
|
|
}
|
|
}
|
|
- var polygon = BM.polygon(latlngs).addTo(this.bMap);
|
|
|
|
- // 让地图适配当前的线段
|
|
|
|
- this.bMap.fitBounds(polygon.getBounds());
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 项目或者场站id
|
|
// 项目或者场站id
|
|
@@ -395,11 +418,11 @@ export default {
|
|
marker.on('mouseout', function () {
|
|
marker.on('mouseout', function () {
|
|
marker.bindTooltip().closeTooltip();
|
|
marker.bindTooltip().closeTooltip();
|
|
})
|
|
})
|
|
- // console.log(item.projectId)
|
|
|
|
- let projectId = item.projectId.find(w=>w.id===id)
|
|
|
|
|
|
+ // console.log(item.projectId)
|
|
|
|
+ let projectId = item.projectId.find(w => w.id === id)
|
|
// 点击动作
|
|
// 点击动作
|
|
marker.on('click', function (e) {
|
|
marker.on('click', function (e) {
|
|
- if(projectId !== undefined && projectId !== null){
|
|
|
|
|
|
+ if (projectId !== undefined && projectId !== null) {
|
|
if (projectId.type === 'project') {
|
|
if (projectId.type === 'project') {
|
|
let project = {projectId: id, equipmentNo: item.towerNo}
|
|
let project = {projectId: id, equipmentNo: item.towerNo}
|
|
sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
|
|
sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
|
|
@@ -411,7 +434,7 @@ export default {
|
|
_self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
|
|
_self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
|
|
_self.$router.push({path: "/homepage/realResourcesInfo"})
|
|
_self.$router.push({path: "/homepage/realResourcesInfo"})
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
if (item.projectId[0].type === 'project') {
|
|
if (item.projectId[0].type === 'project') {
|
|
let project = {projectId: item.projectId[0].id, equipmentNo: item.towerNo}
|
|
let project = {projectId: item.projectId[0].id, equipmentNo: item.towerNo}
|
|
sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
|
|
sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
|