浏览代码

Merge remote-tracking branch 'origin/visu_emergency_01_siping_2.5d' into visu_emergency_01_siping_2.5d

wangzhe 2 年之前
父节点
当前提交
f58d01d72e
共有 5 个文件被更改,包括 208 次插入41 次删除
  1. 145 19
      src/components/supermap-2.5d.vue
  2. 7 1
      src/components/vBottomMenu.vue
  3. 14 5
      src/views/eventdetailsdialog.vue
  4. 3 3
      src/views/firespread.vue
  5. 39 13
      src/views/monitor.vue

+ 145 - 19
src/components/supermap-2.5d.vue

@@ -14,7 +14,6 @@ export default {
   data() {
     return {
       superMapRootUrl:null,
-      layerList:[],
       viewer:null,
       scene:null,
       handler:null,
@@ -28,6 +27,11 @@ export default {
       mvtMap3:null,
       road_name:null,
       layer_xiangzhenjie_name:null,
+      markerboxEntity: [],//地图落点实体
+      connectBoxEntity: null,//地图线实体
+      graphicsBoxEntity: null,//地图面实体
+      markerboxEntityRadius: [],//地图落点实体
+      connectBoxEntityTwo: null,//地图线实体
       /*************************原地图属性*********************/
       isEditableLayers: false, //绘图控件
 
@@ -48,6 +52,97 @@ export default {
   },
   props: {},
   methods: {
+    //移除之前添加的点
+    clearMRadius() {
+      this.viewer.entities.removeAll()
+      if (this.markerboxEntityRadius != null) {
+        this.viewer.entities.remove(this.markerboxEntityRadius)
+        this.markerboxEntityRadius = []
+      }
+    },
+    //移除之前添加的线
+    clearTwoC() {
+      // 查找ID为entityE的图形对象
+      this.viewer.entities.remove(this.connectBoxEntityTwo)
+    },
+    /**
+     * 地图落点-覆盖范围
+     */
+    setMarkersRadius(makerList) {
+      let that = this
+      that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
+      clearInterval(that.aac)
+      for (let i in makerList) {
+        let longitude = makerList[i].lng;
+        let latitude = makerList[i].lat;
+        let marker = 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
+        })
+        that.markerboxEntityRadius.push(marker)
+        //绘制摄像头的圈(覆盖范围)
+        that.viewer.entities.add({
+          position: Cesium.Cartesian3.fromDegrees(makerList[i].lng,makerList[i].lat,2),
+          ellipse: {
+            semiMinorAxis: makerList[i].radius,
+            semiMajorAxis: makerList[i].radius,
+            height: 0.0,
+            material: Cesium.Color.DODGERBLUE.withAlpha(0.4),
+            outline: true,
+            outlineColor: Cesium.Color.DEEPSKYBLUE.withAlpha(1),
+            outlineWidth: 1,
+          },
+        });
+      }
+      that.viewer.scene.globe.depthTestAgainstTerrain = false
+      that.createLeftClickDescription()
+      that.createRightClickDescription()
+    },
+    /**
+     * 地图画线(贴地)
+     */
+    setConnectTwoList(connectList,color,withAlpha) {
+      let that = this
+      //Cesium.Color.fromCssColorString('#67ADDF')   16进制颜色设置
+      let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
+      that.connectBoxEntityTwo = that.viewer.entities.add({
+        Type: 'Polyline',
+        polyline: {
+          positions: Cesium.Cartesian3.fromDegreesArray(connectList),
+          clampToGround: true,//贴地 true,不贴地  false
+          width: 5,
+          material: material
+        }
+      })
+    },
+    //移除之前添加的点
+    clearM() {
+      this.viewer.entities.removeAll()
+      if (this.markerboxEntity != null) {
+        this.viewer.entities.remove(this.markerboxEntity)
+        this.markerboxEntity = []
+      }
+    },
+    //移除之前添加的线
+    clearC() {
+      // 查找ID为entityE的图形对象
+      this.viewer.entities.remove(this.connectBoxEntity)
+    },
+    //移除之前添加的面
+    clearG() {
+      // 查找ID为entityE的图形对象
+      this.viewer.entities.remove(this.graphicsBoxEntity)
+    },
     superMapInfo(){
       getConfigKey('superMap.iServer').then(response => {
         this.superMapRootUrl = response.msg;
@@ -193,38 +288,35 @@ export default {
       }, 3000);
 
     },
-    //移除之前添加的点
-    clearM(){
-      this.viewer.entities.removeAll();
-    },
     /**
      * 地图落点
      */
-    setMarkers(makerList){
-      let that = this;
-      that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
-      clearInterval(that.aac);
+    setMarkers(makerList) {
+      let that = this
+      that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.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:"",
+        let longitude = makerList[i].lng
+        let latitude = makerList[i].lat
+        let marker = 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
+            disableDepthTestDistance: Number.POSITIVE_INFINITY
           },
           description: makerList[i].bindPopupHtml,
           click: makerList[i].click,
-          parameter: makerList[i].parameter,
-        });
+          parameter: makerList[i].parameter
+        })
+        that.markerboxEntity.push(marker)
       }
-      that.viewer.scene.globe.depthTestAgainstTerrain=false;
-      that.createLeftClickDescription();
-      that.createRightClickDescription();
+      that.viewer.scene.globe.depthTestAgainstTerrain = false
+      that.createLeftClickDescription()
+      that.createRightClickDescription()
     },
     /**
      *鼠标左击事件是原来的气泡
@@ -308,6 +400,40 @@ export default {
         destination: Cesium.Cartesian3.fromDegrees(lng, lat, 3000),
       });
     },
+    /**
+     * 地图画线(贴地)
+     */
+    setConnectList(connectList,color,withAlpha) {
+      let that = this
+      //Cesium.Color.fromCssColorString('#67ADDF')   16进制颜色设置
+      let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
+      that.connectBoxEntity = that.viewer.entities.add({
+        Type: 'Polyline',
+        polyline: {
+          positions: Cesium.Cartesian3.fromDegreesArray(connectList),
+          clampToGround: true,//贴地 true,不贴地  false
+          width: 5,
+          material: material
+        }
+      })
+    },
+    /**
+     * 地图图形(贴地)
+     */
+    setGraphicsList(graphicsList,color,withAlpha) {
+      let that = this
+      //Cesium.Color.fromCssColorString('#67ADDF')   16进制颜色设置
+      let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
+      that.graphicsBoxEntity = that.viewer.entities.add({
+        polygon: {
+          hierarchy: Cesium.Cartesian3.fromDegreesArray(graphicsList),
+          clampToGround: true,//贴地 true,不贴地  false
+          width: 5,
+          material: material
+        }
+      })
+    }
+
   },
 }
 </script>

+ 7 - 1
src/components/vBottomMenu.vue

@@ -533,7 +533,13 @@ export default {
       this.deptOptionsLiandong = response.data
     })
   },
-
+destroyed() { //离开页面关闭Socket连接
+  if (this.websock) {
+    clearInterval(this.setIntervalWesocketPush)
+    this.websock.close()
+    this.websock = null
+  }
+},
   mounted() {
     this.websockSid.userId=Cookies.get("userId")
   },

+ 14 - 5
src/views/eventdetailsdialog.vue

@@ -26,7 +26,8 @@
                       </el-carousel-item>
                     </el-carousel>
                   </div>
-                  <el-button size="mini" type="primary" class="yatz_button" @click="showUpdateYjYuAn">预案调整
+                  <el-button size="mini" type="primary" class="yatz_button" @click="showUpdateYjYuAn">
+                    预案调整
                   </el-button>
                 </div>
                 <!-- 应急预案end -->
@@ -176,12 +177,12 @@
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-question"
-                                             @click="updateCentereventTEventcatalogueStatus('wb',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('wb',true)">
                                     误报
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-warning"
-                                             @click="updateCentereventTEventcatalogueStatus('cf',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('cf',true)">
                                     重复
                                   </el-button>
                                 </div>
@@ -359,7 +360,7 @@
                class="top-dialog tz_tk">
       <el-form label-width="80px">
         <el-form-item label="关联预案">
-          <el-select v-model="sendGuanLianYuAn" placeholder="请选择关联预案!" clearable>
+          <el-select v-model="sendGuanLianYuAn" placeholder="请选择关联预案!" filterable clearable>
             <el-option
               v-for="item in guanLianYuAnList"
               :key="item.id"
@@ -1476,6 +1477,7 @@ export default {
         this.dutysystemSelect(this.iconCurrentIndex, this.dutysystemDeptName, this.depteventId);
         this.closeResponsibilityDialog();
       })
+      this.closeResponsibilityDialog();
     },
     /************************************责任制-结束****************************************/
     showheatPlotting() {
@@ -1503,6 +1505,10 @@ export default {
         return
       }else{
         let param = { eventCode: this.eventCode, reserve: this.sendGuanLianYuAn }
+        if(this.sendGuanLianYuAn==''||this.sendGuanLianYuAn==null){
+          this.$message.error(`请选择预案信息!`)
+          return
+        }
         updateYjYuAn(param).then(res => {
           //事件调整关联预案
           if (res.code == 200) {
@@ -1998,7 +2004,7 @@ export default {
             }
           })
         } else {
-          if (eventStatus == 'qs' || eventStatus == 'wb' || eventStatus == 'cf') {
+          if (eventStatus == 'qs') {
             if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
               that.$message.error(`请选择部门!`)
               return
@@ -2046,6 +2052,9 @@ export default {
       return data.label.indexOf(value) !== -1
     },
     sendEventLog() {
+      if( this.eventLog == '' || this.eventLog == null ){
+        return;
+      }
       //日志发送
       let param = { eventCode: this.eventCode, logContent: this.eventLog,operation:"bus_oper_type_2",operationType:"log_oper_type_1"}
       sendEventLog(param).then(res => {

+ 3 - 3
src/views/firespread.vue

@@ -167,12 +167,12 @@
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-question"
-                                             @click="updateCentereventTEventcatalogueStatus('wb',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('wb',true)">
                                     误报
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-warning"
-                                             @click="updateCentereventTEventcatalogueStatus('cf',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('cf',true)">
                                     重复
                                   </el-button>
                                 </div>
@@ -1937,7 +1937,7 @@ export default {
             }
           })
         } else {
-          if (eventStatus == 'qs' || eventStatus == 'wb' || eventStatus == 'cf') {
+          if (eventStatus == 'qs') {
             if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
               that.$message.error(`请选择部门!`)
               return

+ 39 - 13
src/views/monitor.vue

@@ -220,8 +220,8 @@ export default {
     this.bottomMenuList() //获取底部公共组件消息和任务
     this.getTreeselect()
     this.deptId = Cookies.get("deptId")
-    // this.getSensorListByDeptId()
-    // this.getDlblistBydeptId()
+    this.getSensorListByDeptId()
+    this.getDlblistBydeptId()
     this.selectDeviceType()
   },
   data() {
@@ -399,6 +399,30 @@ export default {
           console.error(error);
         });
     },
+    // 大喇叭
+    getDlblistBydeptId() {
+      let that = this;
+      let markersList = [];
+      getDlblistBydeptId(that.deptId).then(function (res) {
+        that.loudspeakerNum = res.data.length
+      
+      })
+        .catch(function (error) {
+          console.error(error);
+        });
+    },
+    // 传感器
+    getSensorListByDeptId() {
+      let that = this;
+      let markersList = [];
+      getSensorListByDeptId(that.deptId).then(function (res) {
+        that.sensorNum = res.data.length
+      
+      })
+        .catch(function (error) {
+          console.error(error);
+        });
+    },
     // 传感器
     getSensorListByDeptId() {
       let that = this;
@@ -478,15 +502,13 @@ export default {
         //地图标记
         if (res.data != null && res.data.length > 0) {
           for (let i = 0; i < res.data.length; i++) {
-            let latlng = {
-              lat: res.data[i].lat,
-              lng: res.data[i].lng
-            }
-            that.graphicsList.push(latlng)
+
+            that.graphicsList.push(res.data[i].lng)
+            that.graphicsList.push(res.data[i].lat)
           }
           setTimeout(() => {
             that.$refs.supermap.clearG()
-            that.$refs.supermap.setGraphicsList(this.graphicsList, 'red')
+            that.$refs.supermap.setGraphicsList(this.graphicsList, 'red',0.8)
           }, 1000)
         } else {
           that.$refs.supermap.clearG()
@@ -659,9 +681,13 @@ export default {
             // longitude: "125.3333"
           }
           setTimeout(() => {
-            that.$refs.supermap.clearM()
-            that.$refs.supermap.setMarkers(this.cameraMarkersList)
+            that.$refs.supermap.clearMRadius()
+            that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
           }, 3000)
+        }else{
+          setTimeout(() => {
+            that.$refs.supermap.clearMRadius()
+          }, 1000)
         }
       })
     },
@@ -754,12 +780,12 @@ export default {
             // longitude: "125.3333"
           }
           setTimeout(() => {
-            that.$refs.supermap.clearM()
-            that.$refs.supermap.setMarkers(this.cameraMarkersList)
+            that.$refs.supermap.clearMRadius()
+            that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
           }, 3000)
         }else{
           setTimeout(() => {
-            that.$refs.supermap.clearM()
+            that.$refs.supermap.clearMRadius()
           }, 3000)
         }
       })