dedsudiyu 3 týždňov pred
rodič
commit
7083ecfcde
1 zmenil súbory, kde vykonal 32 pridanie a 32 odobranie
  1. 32 32
      src/views/components/mapComponent.vue

+ 32 - 32
src/views/components/mapComponent.vue

@@ -186,6 +186,7 @@
         let self = this;
         let obj = JSON.parse(JSON.stringify(this.mapData.list[this.checkIndex]));
         obj.usageRate = this.accMul(obj.usageRate,100)+'';
+        obj.videoList = [];
         //查询实验室今日人次
         laboratoryWsBigViewGetUsePerson({subId:obj.subId}).then(response => {
           obj.userNum = response.data
@@ -225,41 +226,40 @@
             }
             //发送给房间组件展示
             this.$parent.setRoomData(obj);
-            obj.videoList = [];
-            //查询实验室监控
-            if(obj.monitorVisable){
-              let videoObj = {
-                page:'1',
-                pageSize:'10',
-                buildId:'',
-                floorId:'',
-                passageway:'',
-                subIds:[obj.subId],
-                protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
-                streamType:1,
-                source:1,
-              };
-              iotCameraFindByCondition(videoObj).then(response => {
-                for(let i=0;i<response.data.records.length;i++){
-                  obj.videoList.push(
-                    {
-                      url: response.data.records[i].streamUrl,
-                      cameraIndexCode: response.data.records[i].deviceNo,
-                    }
-                  )
+          });
+        });
+        //查询实验室监控
+        if(obj.monitorVisable){
+          let videoObj = {
+            page:'1',
+            pageSize:'10',
+            buildId:'',
+            floorId:'',
+            passageway:'',
+            subIds:[obj.subId],
+            protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
+            streamType:1,
+            source:1,
+          };
+          iotCameraFindByCondition(videoObj).then(response => {
+            for(let i=0;i<response.data.records.length;i++){
+              obj.videoList.push(
+                {
+                  url: response.data.records[i].streamUrl,
+                  cameraIndexCode: response.data.records[i].deviceNo,
                 }
-                //假数据
-                // obj.videoList.push({ url: '1',cameraIndexCode: 2,})
-                // obj.videoList.push({ url: '1',cameraIndexCode: 2,})
-                // 发送给监控组件
-                this.$parent.setVideoData(obj);
-              });
-            }else{
-              // 发送给监控组件
-              this.$parent.setVideoData(obj);
+              )
             }
+            //假数据
+            // obj.videoList.push({ url: '1',cameraIndexCode: 2,})
+            // obj.videoList.push({ url: '1',cameraIndexCode: 2,})
+            // 发送给监控组件
+            this.$parent.setVideoData(obj);
           });
-        });
+        }else{
+          // 发送给监控组件
+          this.$parent.setVideoData(obj);
+        }
       },
       //匹配楼层ID
       getFloorId(floorId) {