Ver código fonte

消防单点摄像头更换为电视墙插件

wang_xy 2 anos atrás
pai
commit
d8f5433927
4 arquivos alterados com 29 adições e 53 exclusões
  1. 2 2
      src/assets/styles/base.scss
  2. 7 8
      src/components/TVWall.vue
  3. 18 18
      src/views/forest.vue
  4. 2 25
      src/views/monitor.vue

+ 2 - 2
src/assets/styles/base.scss

@@ -562,12 +562,12 @@ div::-webkit-scrollbar {
 //视频摄像头预览弹层样式
 .videoCustomWidth {
   width: 1070px !important;
-  height: 700px !important;
+  height: 750px !important;
 }
 //电视墙视频摄像头预览弹层样式
 .TVWallCustomWidth {
   width: 1200px !important;
-  height: 750px !important;
+  height: 800px !important;
 }
 
 .dia-event-info {

+ 7 - 8
src/components/TVWall.vue

@@ -417,9 +417,9 @@ export default {
       rotation(lng,lat,list).then(res => {
       })
     },
-    showTVWall(tvListJson) {
+    showTVWall(tvListJson,bfArray) {
       if(tvListJson){
-        this.preview(tvListJson);
+        this.preview(tvListJson,bfArray);
         this.TVWallVisible = true;
         return;
       }
@@ -471,7 +471,7 @@ export default {
       this.$modal.msgWarning('请重新安装客户端')
     },
     /** 预览按钮操作 */
-    preview(tvListJson) {
+    preview(tvListJson,bfArray) {
       getTVWallList().then(newres => {
         getDahuaVideoServer().then(newResponse => {
           this.ws.detectConnectQt().then(res => {
@@ -495,7 +495,7 @@ export default {
                 if (res) {
                   this.alertLoginSuccess()
                   this.activePanel = 'key2'
-                  this.create(tvListJson?tvListJson:newres.data)
+                  this.create(tvListJson?tvListJson:newres.data,bfArray)
                 } else {
                   this.alertLoginFailed()
                 }
@@ -508,7 +508,7 @@ export default {
       })
     },
 
-    create(tvListJson) { // 调用创建控件接口
+    create(tvListJson,bfArray) { // 调用创建控件接口
       // debugger
       let _this = this
       const params = [
@@ -530,9 +530,8 @@ export default {
       ]
       this.setPos()
       this.customizeTree(tvListJson);
-      setTimeout(function () {
-        _this.ws.createCtrl(params);
-      }, 3000);
+      _this.ws.createCtrl(params);
+      _this.playRealMonitorVideo(bfArray);
     },
     setPos() {
       let target = document.getElementById(this.domId)

+ 18 - 18
src/views/forest.vue

@@ -961,15 +961,15 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>';
-            if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
-              markersMap.bindPopupHtml += '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>'
-            }
+            // if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
+            //   markersMap.bindPopupHtml += '<span>' +
+            //     '                  <div class="d-l-con">' +
+            //     '                  <div class="d-l-l-text">' +
+            //     '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
+            //     '                </div>' +
+            //     '                </div>' +
+            //     '                </span>'
+            // }
             markersMap.bindPopupHtml += '</div>'
             that.markersList.push(markersMap)
           }
@@ -1124,15 +1124,15 @@ export default {
         '                </div>' +
         '                </div>' +
         '                </span>';
-      if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
-        markersMap.bindPopupHtml += '<span>' +
-          '                  <div class="d-l-con">' +
-          '                  <div class="d-l-l-text">' +
-          '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
-          '                </div>' +
-          '                </div>' +
-          '                </span>'
-      }
+      // if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
+      //   markersMap.bindPopupHtml += '<span>' +
+      //     '                  <div class="d-l-con">' +
+      //     '                  <div class="d-l-l-text">' +
+      //     '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
+      //     '                </div>' +
+      //     '                </div>' +
+      //     '                </span>'
+      // }
       markersMap.bindPopupHtml += '</div>'
       that.markersList.push(markersMap)
       setTimeout(() => {

+ 2 - 25
src/views/monitor.vue

@@ -287,8 +287,6 @@ export default {
   methods: {
     /* 电视墙替换开始 */
     showTVWall(channelCode, channelName) {
-      // let channelCode = '6044981090191552';
-      // let channelName = '复兴大桥中段-交通事故';
       let tvListJson = [
         {
           'switchTab': '1',
@@ -308,17 +306,15 @@ export default {
             'channelDates': [{
               'channelCode': channelCode,
               'channelName': channelName,
-              // 'channelCode': '6044981090191552',
-              // 'channelName': '复兴大桥中段-交通事故',
               'channelSn': null,
-              'cameraType': 0,
+              'cameraType': 1,
               'online': 1
             }],
             'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
           }]
         }
       ]
-      this.$refs.TVWall.showTVWall(tvListJson);
+      this.$refs.TVWall.showTVWall(tvListJson,[{"channelId":channelCode}]);
       this.$refs.supermap.isEditableLayers = false;
       this.$refs.bottomMenu.showChild = false;
       this.$refs.bottomMenu.showBanChild = false;
@@ -671,25 +667,6 @@ export default {
     /** 预览按钮操作 */
     preview(cameraParam) {
       this.showTVWall(cameraParam.code, cameraParam.name);
-      return;
-      console.log("cameraParam=",cameraParam)
-      let channelCode = '6044981090191552';
-      let channelName = '复兴大桥中段-交通事故';
-      if(cameraParam.type == '1'){
-        getDahuaVideoServer().then(newResponse => {
-          channelCode = cameraParam.code;
-          channelName = '摄像头-' + cameraParam.code;
-          console.log("newResponse=",newResponse)
-          this.showTVWall(channelCode, channelName);
-        })
-      }else if(cameraParam.type == '0'){
-        getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
-          console.log("newResponse=",newResponse)
-          channelCode = newResponse.data.channelCode;
-          channelName = '摄像头-' + newResponse.data.cameraName;
-        })
-        this.showTVWall(channelCode, channelName);
-      }
     },
 
     /** 预览按钮操作 */