Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/visu_firecontrol' into visu_firecontrol

JX.LI 2 anni fa
parent
commit
20400966dc
3 ha cambiato i file con 78 aggiunte e 8 eliminazioni
  1. 2 2
      src/assets/styles/base.scss
  2. 9 4
      src/components/TVWall.vue
  3. 67 2
      src/views/monitor.vue

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

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

+ 9 - 4
src/components/TVWall.vue

@@ -417,7 +417,12 @@ export default {
       rotation(lng,lat,list).then(res => {
       })
     },
-    showTVWall() {
+    showTVWall(tvListJson) {
+      if(tvListJson){
+        this.preview(tvListJson);
+        this.TVWallVisible = true;
+        return;
+      }
       // let that=this;
       /** ----------------------------------大华摄像头预览开始------------------------------------- */
       this.ws.addEventListener('connectStateChange', data => {
@@ -466,7 +471,7 @@ export default {
       this.$modal.msgWarning('请重新安装客户端')
     },
     /** 预览按钮操作 */
-    preview() {
+    preview(tvListJson) {
       getTVWallList().then(newres => {
         getDahuaVideoServer().then(newResponse => {
           this.ws.detectConnectQt().then(res => {
@@ -490,7 +495,7 @@ export default {
                 if (res) {
                   this.alertLoginSuccess()
                   this.activePanel = 'key2'
-                  this.create(newres.data)
+                  this.create(tvListJson?tvListJson:newres.data)
                 } else {
                   this.alertLoginFailed()
                 }
@@ -504,7 +509,7 @@ export default {
     },
 
     create(tvListJson) { // 调用创建控件接口
-      debugger
+      // debugger
       let _this = this
       const params = [
         {

+ 67 - 2
src/views/monitor.vue

@@ -217,6 +217,7 @@ export default {
     this.selectKeyAreaList()
     this.bottomMenuList() //获取底部公共组件消息和任务
     this.getTreeselect()
+    // this.showTVWall();
   },
   data() {
     return {
@@ -284,6 +285,46 @@ export default {
     }
   },
   methods: {
+    /* 电视墙替换开始 */
+    showTVWall(channelCode, channelName) {
+      // let channelCode = '6044981090191552';
+      // let channelName = '复兴大桥中段-交通事故';
+      let tvListJson = [
+        {
+          'switchTab': '1',
+          'treeLabels': [
+            {
+              'labelCode': '123456',
+              'labelName': '视频场景',
+              'parentLabelCode': null
+            },
+            {
+              'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
+              'labelName': channelName,
+              'parentLabelCode': 123456
+            }
+          ],
+          'labelChannels': [{
+            'channelDates': [{
+              'channelCode': channelCode,
+              'channelName': channelName,
+              // 'channelCode': '6044981090191552',
+              // 'channelName': '复兴大桥中段-交通事故',
+              'channelSn': null,
+              'cameraType': 0,
+              'online': 1
+            }],
+            'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
+          }]
+        }
+      ]
+      this.$refs.TVWall.showTVWall(tvListJson);
+      this.$refs.supermap.isEditableLayers = false;
+      this.$refs.bottomMenu.showChild = false;
+      this.$refs.bottomMenu.showBanChild = false;
+      this.$refs.bottomMenu.showChangChild = false;
+    },
+    /* 电视墙替换结束 */
     /** 部门树*/
 // 查询部门下拉树结构
     getTreeselect() {
@@ -441,7 +482,7 @@ export default {
               isAggregation: false
             }
             if (res.data.visuForestCloudCameraBOList[i].channelCode != null) {
-              markersMap.parameter = {code:res.data.visuForestCloudCameraBOList[i].cameraCode,
+              markersMap.parameter = {code:res.data.visuForestCloudCameraBOList[i].cameraCode, name:res.data.visuForestCloudCameraBOList[i].cameraName,
                 type:res.data.visuForestCloudCameraBOList[i].cameraFactory}
             } else {
               markersMap.parameter = []
@@ -535,7 +576,7 @@ export default {
               isAggregation: false
             }
             if (res.data[i].channelCode != null) {
-              markersMap.parameter = {code:res.data[i].cameraCode,
+              markersMap.parameter = {code:res.data[i].cameraCode, name:res.data[i].cameraName,
                 type:res.data[i].cameraFactory}
             } else {
               markersMap.parameter = []
@@ -629,6 +670,30 @@ 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);
+      }
+    },
+
+    /** 预览按钮操作 */
+    preview_废弃(cameraParam) {
       if(cameraParam.type=='1'){
         getDahuaVideoServer().then(newResponse => {
           console.log(newResponse)