dedsudiyu 3 月之前
父節點
當前提交
7899fa39be

+ 11 - 0
src/api/index.js

@@ -390,3 +390,14 @@ export function laboratorySubPassOutGetCountByBuildId (data) {
     data: data
   })
 }
+/*
+* 查询楼层-危险源数据
+* floorId-楼层
+*/
+export function laboratoryBigViewHazardStatistics (query) {
+  return request({
+    url: '/laboratory/bigView/hazardStatistics',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 1
src/components/planAlarm/planAlarm.vue

@@ -201,6 +201,7 @@
         height:470,
         videoType:false,
         videoList:[],
+        videoTotal:0,
         //全屏视频参数
         fullVideoProps:{},
         fullVideoType:false,
@@ -441,7 +442,6 @@
       newTimestamp(value){
         let timestamp = this.accSub(this.accDiv(Date.parse(new Date()),1000),value);
         this.time(timestamp);
-        console.log('timestamp',timestamp)
       },
       //定时器
       time(time){

+ 11 - 8
src/views/emergencyManagement/index.vue

@@ -63,25 +63,28 @@
       this.offPlanMQTT('on');
     },
     methods: {
+      setDanger(floorId){
+        this.$refs['dangerComponent'].laboratoryBigViewHazardStatistics(floorId);
+      },
       setAddress(list){
-        this.$refs['mapComponent'].getAddress(list)
+        this.$refs['mapComponent'].getAddress(list);
       },
       setUserNum(num){
-        this.$refs['mapComponent'].getUserNum(num)
+        this.$refs['mapComponent'].getUserNum(num);
       },
       setMapData(data){
-        this.$refs['equipmentComponent'].initialize({floorId:data.treeId})
-        this.$refs['mapComponent'].initialize({floorId:data.treeId})
-        this.$refs['videoListComponent'].initialize({floorId:data.treeId})
+        this.$refs['equipmentComponent'].initialize({floorId:data.treeId});
+        this.$refs['mapComponent'].initialize({floorId:data.treeId});
+        this.$refs['videoListComponent'].initialize({floorId:data.treeId});
       },
       //页面切换
       goPage(type){
         this.$parent.pageCheck(type);
       },
       checkComponent(item){
-        this.$refs['equipmentComponent'].initialize(item)
-        this.$refs['mapComponent'].initialize(item)
-        this.$refs['videoListComponent'].initialize(item)
+        this.$refs['equipmentComponent'].initialize(item);
+        this.$refs['mapComponent'].initialize(item);
+        this.$refs['videoListComponent'].initialize(item);
       },
       //预案-MQTT连接
       offPlanMQTT(type){

+ 41 - 25
src/views/emergencyManagement/pageComponent/dangerComponent.vue

@@ -6,14 +6,8 @@
         <div class="bottom-top-min-box">
           <div>
             <p class="null-p"></p>
-            <div class="num-p">
-              <p>3</p>
-            </div>
-            <div class="num-p">
-              <p>5</p>
-            </div>
-            <div class="num-p">
-              <p>5</p>
+            <div class="num-p" v-for="(item,index) in deviceNum">
+              <p>{{item}}</p>
             </div>
             <p class="null-p"></p>
           </div>
@@ -22,14 +16,8 @@
         <div class="bottom-top-min-box">
           <div>
             <p class="null-p"></p>
-            <div class="num-p">
-              <p>2</p>
-            </div>
-            <div class="num-p">
-              <p>4</p>
-            </div>
-            <div class="num-p">
-              <p>8</p>
+            <div class="num-p" v-for="(item,index) in chemicalNum">
+              <p>{{item}}</p>
             </div>
             <p class="null-p"></p>
           </div>
@@ -38,14 +26,8 @@
         <div class="bottom-top-min-box">
           <div>
             <p class="null-p"></p>
-            <div class="num-p">
-              <p>1</p>
-            </div>
-            <div class="num-p">
-              <p>2</p>
-            </div>
-            <div class="num-p">
-              <p>4</p>
+            <div class="num-p" v-for="(item,index) in gasCylinderNum">
+              <p>{{item}}</p>
             </div>
             <p class="null-p"></p>
           </div>
@@ -58,6 +40,7 @@
 </template>
 <script>
   import titlePageImgComponents from '@/components/titlePageImgComponents.vue'
+  import { laboratoryBigViewHazardStatistics } from "@/api/index";
   export default {
     name: 'dangerComponent',
     components: {
@@ -68,6 +51,12 @@
         propsData:{
           title:'危险源',
         },
+        //设备
+        deviceNum:[0],
+        //化学品
+        chemicalNum:[0],
+        //气瓶
+        gasCylinderNum:[0],
       }
     },
     created(){
@@ -77,7 +66,34 @@
 
     },
     methods:{
-
+      laboratoryBigViewHazardStatistics(floorId){
+        laboratoryBigViewHazardStatistics({floorId:floorId}).then(response => {
+          if(response.data.deviceNum > 0){
+            let deviceNum = [];
+            response.data.deviceNum = response.data.deviceNum + '';
+            for(let i=0;i<response.data.deviceNum.length;i++){
+              deviceNum.push(response.data.deviceNum[i])
+            }
+            this.$set(this,'deviceNum',deviceNum);
+          }
+          if(response.data.chemicalNum > 0){
+            let chemicalNum = [];
+            response.data.chemicalNum = response.data.chemicalNum + '';
+            for(let i=0;i<response.data.chemicalNum.length;i++){
+              chemicalNum.push(response.data.chemicalNum[i])
+            }
+            this.$set(this,'chemicalNum',chemicalNum);
+          }
+          if(response.data.gasCylinderNum > 0){
+            let gasCylinderNum = [];
+            response.data.gasCylinderNum = response.data.gasCylinderNum + '';
+            for(let i=0;i<response.data.gasCylinderNum.length;i++){
+              gasCylinderNum.push(response.data.gasCylinderNum[i])
+            }
+            this.$set(this,'gasCylinderNum',gasCylinderNum);
+          }
+        })
+      },
     },
   }
 </script>

+ 4 - 0
src/views/emergencyManagement/pageComponent/deptListComponent.vue

@@ -188,6 +188,8 @@
               self.laboratorySubPassOutGetCountByBuildId(2,checkData.treeId);
               //父级地图数据
               self.$parent.setMapData(checkData);
+              //父级危险源数据
+              self.$parent.setDanger(checkData.treeId);
             },200);
           })
         })
@@ -227,6 +229,8 @@
               this.laboratorySubPassOutGetCountByBuildId(2,e.treeId);
               //父级地图数据
               this.$parent.setMapData(e);
+              //父级危险源数据
+              this.$parent.setDanger(e.treeId);
             }
           }
           this.$refs.tree.setCurrentKey(this.treeId);