wang_xy před 2 roky
rodič
revize
1cdbf25644
2 změnil soubory, kde provedl 42 přidání a 19 odebrání
  1. 39 0
      src/components/supermap-2.5d.vue
  2. 3 19
      src/views/monitor.vue

+ 39 - 0
src/components/supermap-2.5d.vue

@@ -101,6 +101,45 @@
         that.createRightClickDescription();
       },
       /**
+       * 地图落点
+       */
+      setMarkersRadius(makerList){
+        let that = this;
+        that.handler = new Cesium.ScreenSpaceEventHandler(this.scene.canvas);
+        clearInterval(that.aac);
+        for (let i in makerList) {
+          let longitude = makerList[i].lng;
+          let latitude = makerList[i].lat;
+          that.viewer.entities.add({
+            name:"",
+            position: Cesium.Cartesian3.fromDegrees(longitude, latitude),
+            billboard: {
+              image: iconList[makerList[i].icon],
+              width: 48,
+              height: 48,
+              heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+              disableDepthTestDistance:Number.POSITIVE_INFINITY
+            },
+            description: makerList[i].bindPopupHtml,
+            click: makerList[i].click,
+            parameter: makerList[i].parameter,
+            ellipse: {
+              semiMinorAxis:makerList[i].radius,
+              semiMajorAxis: makerList[i].radius,
+              height: 0.0,
+              material: Cesium.Color.RED.withAlpha(0),
+              outline: true,
+              outlineColor: Cesium.Color.BLUE.withAlpha(0.5),
+              outlineWidth: 2,
+              heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+            },
+          });
+        }
+        that.viewer.scene.globe.depthTestAgainstTerrain=false;
+        that.createLeftClickDescription();
+        that.createRightClickDescription();
+      },
+      /**
        *鼠标左击事件是原来的气泡
        */
       createLeftClickDescription() {

+ 3 - 19
src/views/monitor.vue

@@ -221,8 +221,8 @@ export default {
     this.bottomMenuList() //获取底部公共组件消息和任务
     this.getTreeselect()
     this.deptId = Cookies.get("deptId")
-    this.getSensorListByDeptId()
-    this.getDlblistBydeptId()
+    // this.getSensorListByDeptId()
+    // this.getDlblistBydeptId()
     this.selectDeviceType(-1)
   },
   data() {
@@ -702,7 +702,7 @@ export default {
           setTimeout(() => {
             that.$refs.supermap.clearM()
             that.$refs.supermap.setMarkers(this.cameraMarkersList)
-          }, 1000)
+          }, 3000)
         }
       })
     },
@@ -777,22 +777,6 @@ export default {
               '                </span>' +
               '</div>'
             this.cameraMarkersList.push(markersMap)
-            //   cameraAccount: "1"
-            // cameraCode: "1000010"
-            // cameraFactory: "2"
-            // cameraIp: "1"
-            // cameraName: "2"
-            // cameraPasword: "2"
-            // cameraPort: 2
-            // cameraRadius: 20
-            // cameraRegion: "3"
-            // dataDeptId: null
-            // dataStatus: null
-            // eventType: null
-            // height: "11"
-            // id: "0d165fc362514f79b12a899ea66295fd"
-            // latitude: "49.325625"
-            // longitude: "125.3333"
           }
           setTimeout(() => {
             that.$refs.supermap.clearM()