Browse Source

地图协调图片更改,地图的默认级别从6变成7,更改光伏场站的图标

zy 2 years ago
parent
commit
02e5cf0051

BIN
neim-ui/public/largeScreenImg/80mWs1.png


BIN
neim-ui/public/largeScreenImg/huafuguangfu.png


BIN
neim-ui/public/largeScreenImg/mapImg.png


BIN
neim-ui/public/largeScreenImg/mapimg.png


+ 1 - 1
neim-ui/src/views/largeScreenPage/Subpage/preProjectResources.vue

@@ -480,7 +480,7 @@ export default {
 .mapBtuBefore {
   background: url(../../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
   background-size: 100% 100%;
-  margin-top: 9px;
+  /*margin-top: 9px;*/
 }
 
 .mapBtuText {

+ 1 - 1
neim-ui/src/views/largeScreenPage/Subpage/projectInfo.vue

@@ -437,7 +437,7 @@ export default {
 .mapBtuBefore {
   background: url(../../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
   background-size: 100% 100%;
-  margin-top: 9px;
+  /*margin-top: 9px;*/
 }
 
 .mapBtuText {

+ 6 - 11
neim-ui/src/views/largeScreenPage/Subpage/provincialEnergyStations.vue

@@ -21,7 +21,7 @@
         </div>
       </div>
       <div class="myMain-container">
-        <div class="rightTextBg" v-if="rightShow">
+        <div class="rightTextBg">
           <div class="rightBg topBox">
             <div class="rightTiltleTextBg">
               <div class="rightMainTitle">
@@ -93,16 +93,16 @@
           </div>
         </div>
         <div v-if="mapMark === 'mapBtuOne'">
-          <bige-map ref="childMethod" :mapValue="mapValue"  @changeZoom="changeZoom"/>
+          <bige-map ref="childMethod" :mapValue="mapValue"/>
         </div>
         <div v-if="mapMark === 'mapBtuThree'">
-          <bige-heat-map  ref="childMethod" :mapValue="mapValue"  @changeZoom="changeZoom"/>
+          <bige-heat-map  ref="childMethod" :mapValue="mapValue"/>
         </div>
         <div v-if="mapMark === 'mapBtuFive'">
-          <bige-heat-sun-map  ref="childMethod" :mapValue="mapValue"  @changeZoom="changeZoom"/>
+          <bige-heat-sun-map  ref="childMethod" :mapValue="mapValue"/>
         </div>
         <div v-if="mapMark === 'mapBtu'">
-          <zai-xian-bige-map ref="childMethod" :mapValue="mapValue"  @changeZoom="changeZoom"/>
+          <zai-xian-bige-map ref="childMethod" :mapValue="mapValue"/>
         </div>
 
       </div>
@@ -125,7 +125,6 @@ export default {
     return {
       timer: null,
       time: '',
-      rightShow:false, //右侧信息在七级以上才会显示
       mapMark:'mapBtuOne',
       provinceInfo: {//全省信息
         // fNum:'100',
@@ -160,9 +159,6 @@ export default {
     this.timer = setInterval(this.formatTime, 1000 * 60)
   },
   methods: {
-    changeZoom(val){
-      this.rightShow = val>=7
-    },
     getInfo() {
       getStationSeat().then(res=>{
         console.log(res.data)
@@ -173,7 +169,6 @@ export default {
           center: [],//中心坐标
           allStationInfo: res.data,//场站坐标
         }
-        this.rightShow = this.$refs.childMethod.level !== null && this.$refs.childMethod.level !== undefined && this.$refs.childMethod.level>=7
       }).catch(err=>{
         console.log('所有场站位置查询异常' + err)
       })
@@ -425,7 +420,7 @@ export default {
 .mapBtuBefore {
   background: url(../../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
   background-size: 100% 100%;
-  margin-top: 9px;
+  /*margin-top: 9px;*/
 }
 
 .mapBtuText {

+ 1 - 1
neim-ui/src/views/largeScreenPage/Subpage/stationInfo.vue

@@ -486,7 +486,7 @@ export default {
 .mapBtuBefore {
   background: url(../../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
   background-size: 100% 100%;
-  margin-top: 9px;
+  /*margin-top: 9px;*/
 }
 
 .mapBtuText {

+ 1 - 1
neim-ui/src/views/largeScreenPage/Subpage/stationResources.vue

@@ -473,7 +473,7 @@ export default {
 .mapBtuBefore {
   background: url(../../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
   background-size: 100% 100%;
-  margin-top: 9px;
+  /*margin-top: 9px;*/
 }
 
 .mapBtuText {

+ 4 - 4
neim-ui/src/views/largeScreenPage/components/3DbigeMap.vue

@@ -16,7 +16,7 @@ export default {
      immediate: true,
       handler(value) {
         if (value.params !== undefined) {
-          console.log("3D地形图:" + value)
+          // console.log("3D地形图:" + value)
           this.mapData = value
           this.level = value.level
           this.center = {lng:value.center[1],lat:value.center[0]}
@@ -43,14 +43,14 @@ export default {
       let _self = this
       //  高度
       let altitude = this.C * Math.pow((this.A - this.D) / (this.level - this.D) - 1, 1 / this.B)
-      console.log(this.C * Math.pow((this.A - this.D) / (this.level - this.D) - 1, 1 / this.B))
+      // console.log(this.C * Math.pow((this.A - this.D) / (this.level - this.D) - 1, 1 / this.B))
       let center = this.center === []?[129.64920, 46.2844]:[this.center.lng,this.center.lat];
       bigemap3d.then(() => {
         // var center = [104.73673266358675,31.463626972537455];
-        console.log(center, 154);
+        // console.log(center, 154);
         // window.bmgl.Config.HTTP_URL ='http://www.bigemap.com:9000';
         window.bmgl.Config.HTTP_URL = process.env.VUE_APP_GIS_API;
-        //window.bmgl.Config.HTTP_URL = 'http://localhost:9000';
+        // window.bmgl.Config.HTTP_URL = 'http://localhost:9000';
         let viewer = new bmgl.Viewer('container', {
           // mapId: 'bigemap.zhongkexingtu',
           terrainId: 'bigemap.re-gaocheng',

+ 4 - 1
neim-ui/src/views/largeScreenPage/components/bigeHeatMap.vue

@@ -118,6 +118,7 @@ export default {
        // var layer1=window.BM.tileLayer('bigemap.re-huafu')
         //var layer2=window.BM.tileLayer('bigemap.heatMapWs',{opacity:0.7});
         let heatmapid = 'bigemap.heatMapWs';
+        // let heatmapid = 'bigemap.btpi9bvl';
         fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
@@ -161,6 +162,8 @@ export default {
             _self.level = this.mapData.level
             _self.center = this.mapData.center
             this.bMap.setView(this.mapData.center, this.mapData.level)
+          } else {
+            this.bMap.setView([46.69090, 128.13354], 7)
           }
         },500)
         // layer2.addTo(map);
@@ -235,7 +238,7 @@ export default {
         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 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) {
           let data = this.mapData.allStationInfo

+ 3 - 1
neim-ui/src/views/largeScreenPage/components/bigeHeatSunMap.vue

@@ -163,6 +163,8 @@ export default {
             _self.level = this.mapData.level
             _self.center = this.mapData.center
             this.bMap.setView(this.mapData.center, this.mapData.level)
+          } else {
+            this.bMap.setView([46.69090, 128.13354], 7)
           }
         },500)
         //layer2.addTo(map);
@@ -230,7 +232,7 @@ export default {
         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 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) {
           let data = this.mapData.allStationInfo

+ 46 - 23
neim-ui/src/views/largeScreenPage/components/bigeMap.vue

@@ -3,7 +3,7 @@
     <div id='map'></div>
     <div id="position">
       <div id="zoom">
-        当前级别 : 6
+        当前级别 : 7
       </div>
       <div id="move">
         当前中心点: 纬度:0.00000,经度:0.00000
@@ -71,6 +71,9 @@ export default {
         // window.BM.Config.HTTP_URL = 'http://49.4.78.194:17143';
         // let ip1 = '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'
         // window.BM.Config.HTTP_URL = 'http://192.168.1.181:9000';
         // arcgis-satellite
@@ -79,6 +82,7 @@ export default {
         // let map = window.BM.map('map', 'bigemap.arcgis-satellite', {
         let map = window.BM.map('map', null, {
           center: [30, 104],
+          // center:[46.69090,128.13354],
           minZoom: 6,
           maxZoom: 12,
           zoom: 11,
@@ -152,6 +156,18 @@ export default {
             });
           }).addTo(this.bMap);
           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.fitBounds(geo2.getBounds());
@@ -177,6 +193,8 @@ export default {
             this.bMap.setView(this.mapData.center, this.mapData.level)
             // this.bMap.setZoom(this.mapData.level)
             // 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 gfbconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guangfuban.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) {
           let data = this.mapData.allStationInfo
@@ -214,13 +232,13 @@ export default {
           for (let item of data.otherStation) {
             let coordinate = [Number(item.latitude), Number(item.longitude)]
             let marker = '';
-            if(item.type === '风'){
+            if (item.type === '风') {
               marker = window.BM.marker(coordinate, {
                 icon: station_icon,
                 riseOnHover: true
               }).addTo(this.bMap);
-            }else {
-              marker =window.BM.marker(coordinate, {
+            } else {
+              marker = window.BM.marker(coordinate, {
                 icon: gfstation_icon,
                 riseOnHover: true
               }).addTo(this.bMap);
@@ -237,12 +255,12 @@ export default {
           for (let item of data.HDStation) {
             let coordinate = [Number(item.latitude), Number(item.longitude)]
             let marker = '';
-            if(item.type === '风'){
+            if (item.type === '风') {
               marker = window.BM.marker(coordinate, {
                 icon: hf_station_icon,
                 riseOnHover: true
               }).addTo(this.bMap);
-            }else {
+            } else {
               marker = window.BM.marker(coordinate, {
                 icon: hf_gfstation_icon,
                 riseOnHover: true
@@ -272,15 +290,15 @@ export default {
             iconAnchor: [30, 50]
           })
           for (let item of data) {
-            if(item.latitude !== undefined){
+            if (item.latitude !== undefined) {
               let coordinate = [Number(item.latitude), Number(item.longitude)]
               let marker = '';
-              if(item.type === '风'){
+              if (item.type === '风') {
                 marker = window.BM.marker(coordinate, {
                   icon: station_icon,
                   riseOnHover: true
                 }).addTo(this.bMap);
-              }else {
+              } else {
                 marker = window.BM.marker(coordinate, {
                   icon: gf_icon,
                   riseOnHover: true
@@ -359,17 +377,22 @@ export default {
             }).addTo(this.bMap);
           }
           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
@@ -395,11 +418,11 @@ export default {
             marker.on('mouseout', function () {
               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) {
-              if(projectId !== undefined && projectId !== null){
+              if (projectId !== undefined && projectId !== null) {
                 if (projectId.type === 'project') {
                   let project = {projectId: id, equipmentNo: item.towerNo}
                   sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
@@ -411,7 +434,7 @@ export default {
                   _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
                   _self.$router.push({path: "/homepage/realResourcesInfo"})
                 }
-              }else{
+              } else {
                 if (item.projectId[0].type === 'project') {
                   let project = {projectId: item.projectId[0].id, equipmentNo: item.towerNo}
                   sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))

+ 6 - 4
neim-ui/src/views/largeScreenPage/components/zaiXianBigeMap.vue

@@ -61,13 +61,13 @@ export default {
     initBigeMap() {
       let _self = this
       bigemap.then(() => {
-        window.BM.Config.HTTP_URL = 'http://www.bigemap.com:9000';
-        // window.BM.Config.HTTP_URL = 'http://localhost:9000';
+        // window.BM.Config.HTTP_URL = 'http://www.bigemap.com:9000';
+        window.BM.Config.HTTP_URL = 'http://49.4.78.194:17143';
         // window.BM.Config.HTTP_URL = 'http://192.168.1.181:9000';
         // arcgis-satellite
         // amap-satellite
         // zhongkexingtu
-        let map = window.BM.map('map', 'bigemap.arcgis-satellite', {
+        let map = window.BM.map('map', 'bigemap.zaixiantianditu', {
         // let map = window.BM.map('map', 'bigemap.6914xxtx', {
           center: [30, 104],
           minZoom: 6,
@@ -139,6 +139,8 @@ export default {
               _self.level = this.mapData.level
               _self.center = this.mapData.center
               this.bMap.setView(this.mapData.center, this.mapData.level)
+            } else {
+              this.bMap.setView([46.69090, 128.13354], 7)
             }
           },500)
         })
@@ -148,7 +150,7 @@ export default {
         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 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) {
           let data = this.mapData.allStationInfo

+ 11 - 15
neim-ui/src/views/largeScreenPage/index.vue

@@ -22,7 +22,7 @@
         </div>
       </div>
       <div class="myMain-container">
-        <div v-if="rightShow" class="rightTextBg">
+        <div class="rightTextBg">
           <div class="rightTiltleTextBg">
             <div class="rightMainTitle">
               <span class="mainTitle">风光资源概况</span>
@@ -61,19 +61,19 @@
           <div id="mapImg" class="mapBtu mapBtuBefore" v-show="false"></div>
         </div>
         <div v-if="mapMark === 'mapImg'">
-          <img src="../../../public/largeScreenImg/mapImg.png"/>
+          <img src="../../../public/largeScreenImg/mapimg.png" style="width: 100%;height: calc(91vh);object-fit: cover;"/>
         </div>
         <div v-if="mapMark === 'mapBtuOne'">
-          <bige-map ref="childMethod" :mapValue="mapValue" @changeZoom="changeZoom"/>
+          <bige-map ref="childMethod" :mapValue="mapValue"/>
         </div>
         <div v-if="mapMark === 'mapBtuThree'">
-          <bige-heat-map ref="childMethod" :mapValue="mapValue" @changeZoom="changeZoom"/>
+          <bige-heat-map ref="childMethod" :mapValue="mapValue"/>
         </div>
         <div v-if="mapMark === 'mapBtuFive'">
-          <bige-heat-sun-map ref="childMethod" :mapValue="mapValue" @changeZoom="changeZoom"/>
+          <bige-heat-sun-map ref="childMethod" :mapValue="mapValue"/>
         </div>
         <div v-if="mapMark === 'mapBtu'">
-          <zai-xian-bige-map ref="childMethod" :mapValue="mapValue" @changeZoom="changeZoom"/>
+          <zai-xian-bige-map ref="childMethod" :mapValue="mapValue"/>
         </div>
       </div>
     </div>
@@ -127,17 +127,13 @@ export default {
     this.timer = setInterval(this.formatTime, 1000 * 60)
   },
   methods: {
-    changeZoom(val) {
-      this.rightShow = val >= 7
-    },
     getInfo() {
       this.mapValue = {
         params: new Date(),
-        level: 6,//地图层级
-        center: [],//中心坐标
+        level: 7,//地图层级
+        center: [46.69090, 128.13354],//中心坐标
         allStationInfo: null,//场站坐标
       }
-      // this.rightShow = this.$refs.childMethod.level !== null && this.$refs.childMethod.level !== undefined && this.$refs.childMethod.level >= 7
       provincialEnergyInfo().then(res => {
         this.resourcesOverview = res.data.resourcesOverview
       }).catch(err => {
@@ -164,8 +160,8 @@ export default {
       }
     },
     clickBtu(id) {
-      let center = []
-      let level = 6
+      let center = [46.69090, 128.13354]
+      let level = 7
       if (this.$refs.childMethod !== undefined) {
         center = this.$refs.childMethod.center
         level = this.$refs.childMethod.level
@@ -353,7 +349,7 @@ export default {
 .mapBtuBefore {
   background: url(../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
   background-size: 100% 100%;
-  margin-top: 9px;
+  /*margin-top: 9px;*/
 }
 
 .mapBtuText {