dedsudiyu vor 1 Monat
Ursprung
Commit
264a64b7fb

+ 9 - 0
src/components/fullH5PlayerVideo/fullH5PlayerVideo.vue

@@ -137,6 +137,15 @@ import { iotCameraGetPreviewURLs } from '@/api/index'
           () => {
             // console.info('JS_Play success')
             // do you want...
+            //开启声音
+            this.myPlugin.JS_OpenSound().then(
+              () => {
+                console.log('openSound success')
+              },
+              e => {
+                console.error('声音开启失败',e)
+              }
+            )
           },
           (err) => {
             // console.info('JS_Play failed:', err)

+ 46 - 3
src/views/videoSurveillance/pageComponent/deptListComponent.vue

@@ -196,7 +196,7 @@
               //查询实验室人数
               self.laboratorySubPassOutGetCountByBuildId(1,checkData.treeId);
               //父级视屏数据
-              self.$parent.setVideoData(checkData);
+              self.getSubId(checkData);
             },200);
           })
         })
@@ -220,6 +220,7 @@
       },
       //点击操作
       nodeClickButton(e,data){
+        let self = this;
         this.$nextTick(() => {
           if (!e.level||e.level == 2||e.level == 3) {
             if(this.treeId != e.treeId){
@@ -230,8 +231,8 @@
               //查询实验室人数
               let type = !e.subId&&!e.level?3:(e.level == 2 ?1:(e.level == 3?2:''))
               this.laboratorySubPassOutGetCountByBuildId(type,e.treeId);
-              //父级视屏数据
-              this.$parent.setVideoData(e);
+              //查询楼栋/楼层下所有实验室ID
+              this.getSubId(e);
             }
           }
           this.$refs.tree.setCurrentKey(this.treeId);
@@ -289,6 +290,48 @@
         }
 
       },
+      //实验室ID查询
+      getSubId(e){
+        let self = this;
+        let obj = {
+          deptId:this.queryParams.deptId,
+          levelIds:[],
+        }
+        if (this.inputType == 1){
+          obj.subName = this.queryParams.searchValue;
+        } else if(this.inputType == 2){
+          obj.roomNum = this.queryParams.searchValue;
+        }
+        for(let i=0;i<self.checkLeveList.length;i++){
+          if(self.checkLeveList[i].type){
+            obj.levelIds.push(self.checkLeveList[i].levelId)
+          }
+        }
+        if(!e.level){
+          //实验室
+          this.$parent.setVideoData([e.treeId]);
+        }else if(e.level == 2){
+          //楼栋
+          obj.buildingId = e.treeId;
+          laboratoryLabDeptTreeLargeRooms(obj).then(response => {
+            let  list = [];
+            for(let i=0;i<response.data.length;i++){
+              list.push(response.data[i].treeId)
+            }
+            this.$parent.setVideoData(list);
+          })
+        }else if(e.level == 3){
+          //楼层
+          obj.floorId = e.treeId;
+          laboratoryLabDeptTreeLargeRooms(obj).then(response => {
+            let  list = [];
+            for(let i=0;i<response.data.length;i++){
+              list.push(response.data[i].treeId)
+            }
+            this.$parent.setVideoData(list);
+          })
+        }
+      },
       //选中位置联查
       checkAddress(id){
         let list = this.forAddress(this.$refs.tree._data.root.childNodes,id);

+ 10 - 9
src/views/videoSurveillance/pageComponent/videoComponent.vue

@@ -103,16 +103,17 @@
           protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
           streamType:1,
           source:0,
+          subIds:data,
         };
-        if(data.level == 4){
-          obj.buildId = data.treeId;
-        }else if(data.level == 5){
-          obj.floorId = data.treeId;
-        }else if(!data.subId&&!data.level){
-          obj.floorId = data.treeId;
-        }else if(data.subId&&!data.level){
-          obj.subIds = [data.treeId];
-        }
+        // if(data.level == 4){
+        //   obj.buildId = data.treeId;
+        // }else if(data.level == 5){
+        //   obj.floorId = data.treeId;
+        // }else if(!data.subId&&!data.level){
+        //   obj.floorId = data.treeId;
+        // }else if(data.subId&&!data.level){
+        //   obj.subIds = [data.treeId];
+        // }
         this.$set(this,'videoQueryParams',obj);
         this.$nextTick(()=>{
           this.videoInitialize()