Bladeren bron

监控中心

彭宇 2 jaren geleden
bovenliggende
commit
0a5a6c1439
1 gewijzigde bestanden met toevoegingen van 38 en 3 verwijderingen
  1. 38 3
      src/views/monitor.vue

+ 38 - 3
src/views/monitor.vue

@@ -413,6 +413,7 @@ export default {
       //获取左侧动态感知设备
       let that = this
       selectDeviceType().then(res => {
+        that.cameraMarkersList = []
         that.visuForestCloudMapDeviceBOList = res.data.visuForestCloudMapDeviceBOList
 
         that.region = res.data.visuForestCloudTodaySjfbBOList
@@ -453,6 +454,7 @@ export default {
 
             markersMap.lng = res.data.visuForestCloudCameraBOList[i].longitude
             markersMap.lat = res.data.visuForestCloudCameraBOList[i].latitude
+            markersMap.radius = res.data.visuForestCloudCameraBOList[i].cameraRadius
             markersMap.bindPopupHtml = '<div class="map-tip">' +
               '<span>' +
               '                  <div class="d-l-con">' +
@@ -470,8 +472,24 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头类型:' + res.data.visuForestCloudCameraBOList[i]
+                .cameraFactory + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头半径:' + res.data.visuForestCloudCameraBOList[i]
+                .cameraRadius + '米</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
               '</div>'
-            this.cameraMarkersList.push(markersMap)
+            that.cameraMarkersList.push(markersMap)
             //   cameraAccount: "1"
             // cameraCode: "1000010"
             // cameraFactory: "2"
@@ -492,7 +510,7 @@ export default {
           setTimeout(() => {
             that.$refs.supermap.clearM(true)
             that.$refs.supermap.clearM(false)
-            that.$refs.supermap.setMarkers(this.cameraMarkersList)
+            that.$refs.supermap.setMarkersRadius(that.cameraMarkersList)
           }, 1000)
         }
       })
@@ -533,6 +551,7 @@ export default {
 
             markersMap.lng = res.data[i].longitude
             markersMap.lat = res.data[i].latitude
+            markersMap.radius = res.data[i].cameraRadius
             markersMap.bindPopupHtml = '<div class="map-tip">' +
               '<span>' +
               '                  <div class="d-l-con">' +
@@ -549,6 +568,22 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头类型:' + res.data[i]
+                .cameraFactory + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头半径:' + res.data[i]
+                .cameraRadius + '米</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
               '</div>'
             this.cameraMarkersList.push(markersMap)
             //   cameraAccount: "1"
@@ -571,7 +606,7 @@ export default {
           setTimeout(() => {
             that.$refs.supermap.clearM(true)
             that.$refs.supermap.clearM(false)
-            that.$refs.supermap.setMarkers(this.cameraMarkersList)
+            that.$refs.supermap.setMarkersRadius(that.cameraMarkersList)
           }, 1000)
         }
       })