zy 2 سال پیش
والد
کامیت
08eefb4aa5

+ 2 - 6
neim-biz/src/main/java/com/jiayue/biz/controller/HomePageController.java

@@ -170,13 +170,9 @@ public class HomePageController extends BaseController {
     @ApiImplicitParams({
 
     })
-    @GetMapping("/api/stationSelect")
+    @GetMapping("/stationSelect")
     public AjaxResult stationSelect() {
-
-//        label: 依兰四期
-//        value : 项目id
-//        towerInfo:[{label:‘依兰四起06171’value:‘006171’},{label:value}]
-        return AjaxResult.success();
+        return AjaxResult.success(homePageService.stationSelect());
     }
 
     //地图点位坐标 (风机、测风塔、拐点)

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

@@ -24,6 +24,7 @@
                   <div class="projectSelect">
                     <el-select class="choiceSelect" v-model="projectId" placeholder="请选择" size="small"
                                :popper-append-to-body="false"
+                               @change="changeProject"
                                style="width: 100%">
                       <el-option
                         v-for="(item,index) in projectOption"
@@ -36,6 +37,7 @@
                   <div class="towerSelect">
                     <el-select class="choiceSelect" v-model="cftNo" placeholder="请选择" size="small"
                                :popper-append-to-body="false"
+                               @change="changeTower"
                                style="width: 100%">
                       <el-option
                         v-for="(item,index) in towerOption"
@@ -215,8 +217,10 @@ export default {
       timer: null,
       time: '',
       emailWindTowerInfo: {},
-      cftInfo:{equipmentNo:'006171',wdHeights:'120,80,10'},
+      // cftInfo:{equipmentNo:'006171',wdHeights:'120,80,10'},
+      cftInfo:{},
       height: '140',
+      wdHeight: '',
       projectId:'1',
       projectOption:[{id:'1',projectName:'依兰四期'}],//项目列表
       cftNo:'006171',
@@ -259,18 +263,36 @@ export default {
           this.towerOption = project.equipmentDto
           if(this.emailWindTowerInfo.equipmentNo !== null &&this.emailWindTowerInfo.equipmentNo !== undefined){
             this.cftNo = this.emailWindTowerInfo.equipmentNo
+            let towerInfo = this.towerOption.find(w=>w.value === this.cftNo)
+            this.wdHeight = towerInfo.wdHeight
           }else{
             this.cftNo = this.towerOption[0].value
+            this.wdHeight = this.towerOption[0].wdHeight
           }
         }else{
           this.projectId = this.projectOption[0].value
           this.towerOption = this.projectOption[0].equipmentDto
           this.cftNo = this.towerOption[0].value
+          this.wdHeight = this.towerOption[0].wdHeight
         }
+        this.cftInfo = {equipmentNo:this.cftNo,wdHeights:this.wdHeight}
       }).catch(err=>{
         console.log('获取项目列表失败:'+err)
       })
     },
+    // 改变项目下拉框
+    changeProject(){
+      let project = this.projectOption.find(w=>w.value === this.projectId)
+      this.towerOption = project.equipmentDto
+      this.cftNo = this.towerOption[0].value
+      this.wdHeight = this.towerOption[0].wdHeight
+      this.cftInfo = {equipmentNo:this.cftNo,wdHeights:this.wdHeight}
+    },
+    // 改变塔信息下拉框
+    changeTower(){
+      let towerInfo = this.towerOption.find(w=>w.value === this.cftNo)
+      this.cftInfo = {equipmentNo:this.cftNo,wdHeights:towerInfo.wdHeight}
+    },
     push() {
       this.$router.push({path: "/dataQuery/windTowerStatusInfo"})
     },

+ 42 - 4
neim-ui/src/views/largeScreenPage/Subpage/realResourcesInfo.vue

@@ -24,18 +24,20 @@
                   <div class="projectSelect">
                     <el-select class="choiceSelect" v-model="stationId" placeholder="请选择" size="small"
                                :popper-append-to-body="false"
+                               @change="changeStation"
                                style="width: 100%">
                       <el-option
                         v-for="(item,index) in stationOption"
                         :key="index"
-                        :label="item.stationName"
-                        :value="item.id">
+                        :label="item.label"
+                        :value="item.value">
                       </el-option>
                     </el-select>
                   </div>
                   <div class="towerSelect">
                     <el-select class="choiceSelect" v-model="cftNo" placeholder="请选择" size="small"
                                :popper-append-to-body="false"
+                               @change="changeTower"
                                style="width: 100%">
                       <el-option
                         v-for="(item,index) in towerOption"
@@ -188,6 +190,7 @@
 </template>
 
 <script>
+import {selectTForAir} from "@/api/biz/dataQuery/homePage";
 import {stationSelect} from "@/api/biz/dataQuery/largeScreenPage";
 import wdCharts from '../components/wdCharts'
 import wdPowerCharts from '../components/wdPowerCharts'
@@ -199,9 +202,10 @@ export default {
     return {
       timer: null,
       time: '',
-      project: {},
+      realWindTowerInfo: {},
       cftInfo:{equipmentNo:'006171',wdHeights:'120,80,10'},
       height: '140',
+      wdHeight: '',
       stationId:'1',
       stationOption:[{id:'1',stationName:'穆棱风电场'}],//项目列表
       cftNo:'8009',
@@ -227,18 +231,52 @@ export default {
     this.timer = null
   },
   mounted() {
-    this.project = JSON.parse(this.$store.getters.stationInfo)
+    this.realWindTowerInfo = JSON.parse(this.$store.getters.realWindTowerInfo)
     this.formatTime()
+    this.getStationSelect()
     this.timer = setInterval(this.formatTime, 1000 * 60)
   },
   methods: {
     getStationSelect(){
       stationSelect().then(res=>{
         console.log(res.data)
+        this.stationOption = res.data
+        if(this.realWindTowerInfo !== undefined){
+          this.stationId = this.realWindTowerInfo.stationId
+          let station = this.stationOption.find(w=>w.value === this.stationId)
+          this.towerOption = station.equipmentDto
+          if(this.realWindTowerInfo.equipmentNo !== null &&this.realWindTowerInfo.equipmentNo !== undefined){
+            this.cftNo = this.realWindTowerInfo.equipmentNo
+            let towerInfo = this.towerOption.find(w=>w.value === this.cftNo)
+            this.wdHeight = towerInfo.wdHeight
+          }else{
+            this.cftNo = this.towerOption[0].value
+            this.wdHeight = this.towerOption[0].wdHeight
+          }
+        }else{
+          this.stationId = this.stationOption[0].value
+          this.towerOption = this.stationOption[0].equipmentDto
+          this.cftNo = this.towerOption[0].value
+          this.wdHeight = this.towerOption[0].wdHeight
+        }
+        this.cftInfo = {equipmentNo:this.cftNo,wdHeights:this.wdHeight}
       }).catch(err=>{
         console.log('获取场站列表失败:'+err)
       })
     },
+    // 改变场站下拉框
+    changeStation(){
+      let station = this.stationOption.find(w=>w.value === this.stationId)
+      this.towerOption = station.equipmentDto
+      this.cftNo = this.towerOption[0].value
+      this.wdHeight = this.towerOption[0].wdHeight
+      this.cftInfo = {equipmentNo:this.cftNo,wdHeights:this.wdHeight}
+    },
+    // 改变塔信息下拉框
+    changeTower(){
+      let towerInfo = this.towerOption.find(w=>w.value === this.cftNo)
+      this.cftInfo = {equipmentNo:this.cftNo,wdHeights:towerInfo.wdHeight}
+    },
     push() {
       this.$router.push({path: "/dataQuery/windTowerStatusInfo"})
     },

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

@@ -94,7 +94,7 @@ export default {
     return {
       timer: null,
       time: '',
-      station:'',
+      station: {},
       dataInfo:[
         // {category:'一期',fjNum:'20',model:'恩德1.3MW机型',avgWs:'4.5',power:'39650',wd:'西南',hour:'1525'},
         // {category:'二期',fjNum:'30',model:'华锐1.5MW机型',avgWs:'4.7',power:'73125',wd:'西',hour:'1625'},
@@ -143,7 +143,7 @@ export default {
     },
     getInfo(){
       stationInfo({stationId:this.station.id}).then(res=>{
-        console.log(res.data)
+        // console.log(res.data)
         let data = res.data
         this.dataInfo = data.modelT
         this.coordinates = [Number(data.latitude),Number(data.longitude)]
@@ -163,6 +163,9 @@ export default {
       this.$router.push({path: "/dataQuery/windTowerStatusInfo"})
     },
     pushInfo() {
+      let station = {stationId:this.station.id,equipmentNo:null}
+      sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+      this.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
       this.$router.push({path: "/homepage/realResourcesInfo"})
     },
     back() {

+ 88 - 14
neim-ui/src/views/largeScreenPage/components/bigeHeatMap.vue

@@ -130,21 +130,26 @@ export default {
           this.setHeatMap(this.bMap);
           //绑定事件
           this.bindEvents(this.bMap);
-
+          if(this.mapData.level !== null){
+            this.bMap.setZoom(this.mapData.level)
+            this.bMap.panTo(this.mapData.center)
+          }
         })
+        let sIconurl = 'http://'+_self.href.split("//")[1].split("/")[0]+'/largeScreenImg/station.png'
+        let hfSIconurl = 'http://'+_self.href.split("//")[1].split("/")[0]+'/largeScreenImg/huafuStation.png'
+        let pIconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/project.png'
+        let fjIconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji.png'
+
         // 所有场站标记点位
         if(this.mapData.allStationInfo !== null && this.mapData.allStationInfo !== undefined){
           let data = this.mapData.allStationInfo
-          let iconurl = 'http://'+_self.href.split("//")[1].split("/")[0]+'/largeScreenImg/station.png'
-          let hfIconurl = 'http://'+_self.href.split("//")[1].split("/")[0]+'/largeScreenImg/huafuStation.png'
-
           let station_icon = window.BM.icon({
-            iconUrl: iconurl,
+            iconUrl: sIconurl,
             iconSize: [25, 43],
             iconAnchor: [25, 43]
           })
           let hf_station_icon = window.BM.icon({
-            iconUrl: hfIconurl,
+            iconUrl: hfSIconurl,
             iconSize: [35, 55],
             iconAnchor: [35, 55]
           })
@@ -177,13 +182,12 @@ export default {
             })
           }
         }
+
         // 项目标记点位
         if (this.mapData.projectInfo !== null && this.mapData.projectInfo !== undefined) {
           let data = this.mapData.projectInfo
-          let iconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/project.png'
-
           let station_icon = window.BM.icon({
-            iconUrl: iconurl,
+            iconUrl: pIconurl,
             iconSize: [30, 50],
             iconAnchor: [30, 50]
           })
@@ -195,7 +199,7 @@ export default {
             }).addTo(this.bMap);
             // 悬浮动作
             marker.on('mouseover', function (e) {
-              marker.bindTooltip('<div>场站名称:' + item.projectNameEasy + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
+              marker.bindTooltip('<div>项目名称:' + item.projectNameEasy + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
                 {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
             })
             marker.on('mouseout', function () {
@@ -213,10 +217,8 @@ export default {
         // 华富场站标记点位
         if (this.mapData.staionInfo !== null && this.mapData.staionInfo !== undefined) {
           let data = this.mapData.staionInfo
-          let iconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/station.png'
-
           let station_icon = window.BM.icon({
-            iconUrl: iconurl,
+            iconUrl: sIconurl,
             iconSize: [30, 50],
             iconAnchor: [30, 50],
             className:'stationIcon',
@@ -229,7 +231,7 @@ export default {
             }).addTo(this.bMap);
             // 悬浮动作
             marker.on('mouseover', function (e) {
-              marker.bindTooltip('<div>项目名称:' + item.stationName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
+              marker.bindTooltip('<div>场站名称:' + item.stationName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
                 {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
             })
             marker.on('mouseout', function () {
@@ -244,6 +246,78 @@ export default {
             })
           }
         }
+        // 所有风机、塔、拐点标记点位
+        if (this.mapData.allPointInfo !== null && this.mapData.allPointInfo !== undefined) {
+          let data = this.mapData.allPointInfo
+          let station_icon = window.BM.icon({
+            iconUrl: pIconurl,
+            iconSize: [35, 55],
+            iconAnchor: [35, 55],
+            className:'stationIcon',
+          })
+          let fj_icon = window.BM.icon({
+            iconUrl: fjIconurl,
+            iconSize: [30, 30],
+            iconAnchor: [30, 30],
+            className:'stationIcon',
+          })
+          for(let item of data.fan){
+            let coordinate = [Number(item.latitudeFan),Number(item.longitudeFan)]
+            let marker = window.BM.marker(coordinate,{
+              icon: fj_icon,
+              riseOnHover: true
+            }).addTo(this.bMap);
+          }
+          for(let item of data.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);
+              }
+              var polygon = BM.polygon(latlngs).addTo(this.bMap);
+              // 让地图适配当前的线段
+              this.bMap.fitBounds(polygon.getBounds());
+            }
+          }
+          for (let item of data.towerList) {
+            let coordinate = [Number(item.latitude), Number(item.longitude)]
+            let marker = window.BM.marker(coordinate, {
+              icon: station_icon,
+              riseOnHover: true
+            }).addTo(this.bMap);
+            // 悬浮动作
+            marker.on('mouseover', function (e) {
+              // console.log(item)
+              if(item.type === 'project'){
+                marker.bindTooltip('<div>项目名称:' + item.projectName + '</div>'+ '<div>测风塔名称:' + item.towerName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
+                  {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
+              }else{
+                marker.bindTooltip('<div>场站名称:' + item.stationName + '</div>'+ '<div>测风塔名称:' + item.towerName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
+                  {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
+              }
+
+            })
+            marker.on('mouseout', function () {
+              marker.bindTooltip().closeTooltip();
+            })
+            // 点击动作
+            marker.on('click', function (e) {
+              if(item.type === 'project'){
+                let project = {projectId:item.projectId,equipmentNo:item.towerNo}
+                sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
+                _self.$store.dispatch('equipmentInfo/emailWindTowerInfo', JSON.stringify(project))
+                _self.$router.push({path: "/homepage/emailResourcesInfo"})
+              }else {
+                let station = {stationId:item.stationId,equipmentNo:item.towerNo}
+                sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                _self.$router.push({path: "/homepage/realResourcesInfo"})
+              }
+
+            })
+          }
+        }
         /**
          * 加载实时气象源动画效果
          fetch("/js/json/wind_data/20230403_00_atmoslev_1000_mb.json")

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

@@ -243,8 +243,8 @@ export default {
             marker.on('click', function (e) {
               let station = {id: item.id,stationName: item.stationName}
               sessionStorage.setItem("stationInfo",JSON.stringify(station))
-              this.$store.dispatch('equipmentInfo/stationInfo',JSON.stringify(station))
-              this.$router.push({path: "/homepage/stationInfo"})
+              _self.$store.dispatch('equipmentInfo/stationInfo',JSON.stringify(station))
+              _self.$router.push({path: "/homepage/stationInfo"})
             })
           }
         }
@@ -290,7 +290,7 @@ export default {
             }).addTo(this.bMap);
             // 悬浮动作
             marker.on('mouseover', function (e) {
-              console.log(item)
+              // console.log(item)
               if(item.type === 'project'){
                 marker.bindTooltip('<div>项目名称:' + item.projectName + '</div>'+ '<div>测风塔名称:' + item.towerName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
                   {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
@@ -306,12 +306,12 @@ export default {
             // 点击动作
             marker.on('click', function (e) {
               if(item.type === 'project'){
-                let project = {projectId:item.projectId,equipmentNo:item.towerId}
+                let project = {projectId:item.projectId,equipmentNo:item.towerNo}
                 sessionStorage.setItem("emailWindTowerInfo", JSON.stringify(project))
                 _self.$store.dispatch('equipmentInfo/emailWindTowerInfo', JSON.stringify(project))
                 _self.$router.push({path: "/homepage/emailResourcesInfo"})
               }else {
-                let station = {stationId:item.stationId,equipmentNo:item.towerId}
+                let station = {stationId:item.stationId,equipmentNo:item.towerNo}
                 sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
                 _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
                 _self.$router.push({path: "/homepage/realResourcesInfo"})

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

@@ -41,7 +41,7 @@ export default {
   },
   watch: {
     cftInfo: {
-      immediate: true,
+      // immediate: true,
       handler(value) {
         clearInterval(this.timer)
         this.timer = null

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

@@ -27,7 +27,7 @@ export default {
   },
   watch: {
     cftInfo: {
-      immediate: true,
+      // immediate: true,
       handler(value) {
         clearInterval(this.timer)
         this.timer = null

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

@@ -13,7 +13,7 @@ export default {
   },
   watch: {
     cftInfo: {
-      immediate: true,
+      // immediate: true,
       handler(value) {
         // 获取测风塔编号
         this.month = ''

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

@@ -14,7 +14,7 @@ export default {
   },
   watch:{
     cftInfo: {
-      immediate: true,
+      // immediate: true,
       handler(value) {
         // 获取测风塔编号
         console.log(value)