zy 2 vuotta sitten
vanhempi
commit
ef1fa80a15

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

@@ -179,6 +179,7 @@ export default {
           center: this.coordinates,//中心坐标
           allStationInfo: null,//场站坐标
           projectInfo: null,//项目坐标
+          id:projectId,
           allPointInfo:this.allPointInfo,//所有点位信息
         }
       }).catch(err=>{
@@ -213,6 +214,7 @@ export default {
           center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
           allStationInfo: null,//场站坐标
           projectInfo: null,//项目坐标
+          id:this.project.id,
           allPointInfo:this.allPointInfo,//所有点位信息
         }
         this.mapMark = 'mapBtu'
@@ -227,6 +229,7 @@ export default {
         center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
         allStationInfo: null,//场站坐标
         projectInfo: null,//项目坐标
+        id:this.project.id,
         allPointInfo:this.allPointInfo,//所有点位信息
       }
       this.mapMark = id

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

@@ -166,6 +166,7 @@ export default {
           center: this.coordinates,//中心坐标
           allStationInfo: null,//场站坐标
           projectInfo: null,//项目坐标
+          id:this.station.id,
           allPointInfo:this.allPointInfo,//所有点位信息
         }
       }).catch(err=>{
@@ -175,6 +176,7 @@ export default {
           center: [],//中心坐标
           allStationInfo: null,//场站坐标
           projectInfo: null,//项目坐标
+          id:this.station.id,
           allPointInfo:null,//所有点位信息
         }
         if(err.msg === 'Index: 0, Size: 0'){
@@ -210,6 +212,7 @@ export default {
           center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
           allStationInfo: null,//场站坐标
           projectInfo: null,//项目坐标
+          id:this.station.id,
           allPointInfo:this.allPointInfo,//所有点位信息
         }
         this.mapMark = 'mapBtu'
@@ -224,6 +227,7 @@ export default {
         center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
         allStationInfo: null,//场站坐标
         projectInfo: null,//项目坐标
+        id:this.station.id,
         allPointInfo:this.allPointInfo,//所有点位信息
       }
       this.mapMark = id

+ 28 - 11
neim-ui/src/views/largeScreenPage/components/bigeHeatMap.vue

@@ -381,6 +381,8 @@ export default {
               }
             }
           }
+          // 项目或者场站id
+          let id = this.mapData.id
           for (let item of data.towerList) {
             let coordinate = [Number(item.latitude), Number(item.longitude)]
             let marker = window.BM.marker(coordinate, {
@@ -402,20 +404,35 @@ export default {
             marker.on('mouseout', function () {
               marker.bindTooltip().closeTooltip();
             })
+            console.log(item.projectId)
+            let projectId = item.projectId.find(w=>w.id===id)
             // 点击动作
             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"})
+              if(projectId !== undefined && projectId !== null){
+                if (projectId.type === 'project') {
+                  let project = {projectId: id, 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: id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
+              }else{
+                if (item.projectId[0].type === 'project') {
+                  let project = {projectId: item.projectId[0].id, 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.projectId[0].id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
               }
-
             })
           }
         }

+ 32 - 15
neim-ui/src/views/largeScreenPage/components/bigeHeatSunMap.vue

@@ -372,6 +372,8 @@ export default {
               }
             }
           }
+          // 项目或者场站id
+          let id = this.mapData.id
           for (let item of data.towerList) {
             let coordinate = [Number(item.latitude), Number(item.longitude)]
             let marker = window.BM.marker(coordinate, {
@@ -381,32 +383,47 @@ export default {
             // 悬浮动作
             marker.on('mouseover', function (e) {
               // console.log(item)
-              if(item.type === 'project'){
+              if (item.type === 'project') {
                 marker.bindTooltip('<div>测风塔名称:' + item.towerName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
-                  {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
-              }else{
+                  {permanent: true, className: 'infoToolTip', offset: [0, -30]}).openTooltip();
+              } else {
                 marker.bindTooltip('<div>测风塔名称:' + item.towerName + '</div>' + '<div>经度:' + item.longitude + '</div>' + '<div>纬度:' + item.latitude + '</div>',
-                  {permanent:true,className:'infoToolTip',offset:[0,-30]}).openTooltip();
+                  {permanent: true, className: 'infoToolTip', offset: [0, -30]}).openTooltip();
               }
 
             })
             marker.on('mouseout', function () {
               marker.bindTooltip().closeTooltip();
             })
+            console.log(item.projectId)
+            let projectId = item.projectId.find(w=>w.id===id)
             // 点击动作
             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"})
+              if(projectId !== undefined && projectId !== null){
+                if (projectId.type === 'project') {
+                  let project = {projectId: id, 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: id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
+              }else{
+                if (item.projectId[0].type === 'project') {
+                  let project = {projectId: item.projectId[0].id, 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.projectId[0].id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
               }
-
             })
           }
         }

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

@@ -330,6 +330,8 @@ export default {
               }
             }
           }
+          // 项目或者场站id
+          let id = this.mapData.id
           for (let item of data.towerList) {
             let coordinate = [Number(item.latitude), Number(item.longitude)]
             let marker = window.BM.marker(coordinate, {
@@ -351,20 +353,35 @@ export default {
             marker.on('mouseout', function () {
               marker.bindTooltip().closeTooltip();
             })
+            console.log(item.projectId)
+            let projectId = item.projectId.find(w=>w.id===id)
             // 点击动作
             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"})
+              if(projectId !== undefined && projectId !== null){
+                if (projectId.type === 'project') {
+                  let project = {projectId: id, 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: id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
+              }else{
+                if (item.projectId[0].type === 'project') {
+                  let project = {projectId: item.projectId[0].id, 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.projectId[0].id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
               }
-
             })
           }
         }

+ 28 - 11
neim-ui/src/views/largeScreenPage/components/zaiXianBigeMap.vue

@@ -295,6 +295,8 @@ export default {
               }
             }
           }
+          // 项目或者场站id
+          let id = this.mapData.id
           for (let item of data.towerList) {
             let coordinate = [Number(item.latitude), Number(item.longitude)]
             let marker = window.BM.marker(coordinate, {
@@ -316,20 +318,35 @@ export default {
             marker.on('mouseout', function () {
               marker.bindTooltip().closeTooltip();
             })
+            console.log(item.projectId)
+            let projectId = item.projectId.find(w=>w.id===id)
             // 点击动作
             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"})
+              if(projectId !== undefined && projectId !== null){
+                if (projectId.type === 'project') {
+                  let project = {projectId: id, 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: id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
+              }else{
+                if (item.projectId[0].type === 'project') {
+                  let project = {projectId: item.projectId[0].id, 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.projectId[0].id, equipmentNo: item.towerNo}
+                  sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
+                  _self.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
+                  _self.$router.push({path: "/homepage/realResourcesInfo"})
+                }
               }
-
             })
           }
         }