彭宇 2 سال پیش
والد
کامیت
776775f5ca
1فایلهای تغییر یافته به همراه187 افزوده شده و 12 حذف شده
  1. 187 12
      src/components/TVWall.vue

+ 187 - 12
src/components/TVWall.vue

@@ -1,15 +1,11 @@
 <template>
   <div>
-    <el-dialog title="电视墙" :visible.sync="TVWallVisible" v-if="TVWallVisible" width="80%" @close="cancelEventLocationShow()">
-      <div class="event-info">
-        <div class="event-info-con">
-          <div  class="e-location-right" style="width:100%;height:350px;position:relative;">
+    <el-dialog title="电视墙" :visible.sync="TVWallVisible" v-if="TVWallVisible" width="40%" @close="cancelEventLocationShow()">
+          <div style="width:100%;height:400px;position:relative;">
             <div id="dom1" class="dom1"></div>
             <div id="dom2" class="dom2"></div>
             <div id="dom3" class="dom3"></div>
           </div>
-        </div>
-      </div>
     </el-dialog>
   </div>
 
@@ -29,7 +25,8 @@
       return {
         tvListJson:[{
           "switchTab": "1",
-          "treeLabels": [{
+          "treeLabels": [
+            {
             "labelCode": "123456",
             "labelName": "视频场景",
             "parentLabelCode": null
@@ -329,8 +326,6 @@
       },
 
       create(tvListJson) { // 调用创建控件接口
-        console.log(tvListJson)
-        debugger
         let _this = this;
         console.log(this.cutPosX,"this.cutPosX")
         const params = [
@@ -353,16 +348,16 @@
         this.setPos();
         _this.ws.createCtrl(params).then(res => {
           console.log(res);
-          _this.ws.customizeTree(tvListJson);
+          this.customizeTree(tvListJson)
         }).catch(e => {
           console.log(e);
         });
         _this.ws.on('createCtrlResult', (res) => {
           console.log(res);
-          _this.ws.customizeTree(tvListJson);
+          this.customizeTree(tvListJson)
           _this.ws.on('createCtrlResult', (res) => {
             console.log(res);
-            _this.ws.customizeTree(tvListJson);
+            this.customizeTree(tvListJson)
           });
         });
       },
@@ -393,6 +388,186 @@
         });
         this.ws.destroyCtrl(ctrls);
       },
+      customizeTree(tvListJson) { // 调用控件接口树
+        const config = this.ws.config;
+        const { loginIp, userCode } = config;
+        this.ws.postMessage('customizeTree', {
+          loginIp,
+          userCode,
+          params: {
+            array:tvListJson
+              // [
+              //   {
+              //     "switchTab":"1",
+              //     "treeLabels":[
+              //       {
+              //         "labelCode": "1",
+              //         "labelName": "视频场景",
+              //         "parentLabelCode": null
+              //       },
+              //       {
+              //         "labelCode":"1000010",
+              //         "labelName":"迎水11",
+              //         "parentLabelCode":1
+              //       },
+              //       {
+              //         "labelCode":"1000011",
+              //         "labelName":"西村",
+              //         "parentLabelCode": 1
+              //       },
+              //       {
+              //         "labelCode":"1000012",
+              //         "labelName":"矿山屯 ",
+              //         "parentLabelCode": 1
+              //       },
+              //       {
+              //         "labelCode":"1000013",
+              //         "labelName":"头道",
+              //         "parentLabelCode": 1
+              //       },
+              //       {
+              //         "labelCode":"1000014",
+              //         "labelName":"五女峰",
+              //         "parentLabelCode": 1
+              //       }
+              //     ],
+              //     "labelChannels":[
+              //       {
+              //         "labelCode":"1000010",
+              //         "channelDates":[
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK5E",
+              //             "channelName":"1a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK8V",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHKK7",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           }
+              //         ]
+              //       },
+              //       {
+              //         "labelCode":"1000011",
+              //         "channelDates":[
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK5E",
+              //             "channelName":"1a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK8V",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHKK7",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           }
+              //         ]
+              //       },
+              //       {
+              //         "labelCode":"1000012",
+              //         "channelDates":[
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK5E",
+              //             "channelName":"1a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK8V",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHKK7",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           }
+              //         ]
+              //       },
+              //       {
+              //         "labelCode":"1000013",
+              //         "channelDates":[
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK5E",
+              //             "channelName":"1a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK8V",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHKK7",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           }
+              //         ]
+              //       },
+              //       {
+              //         "labelCode":"1000014",
+              //         "channelDates":[
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK5E",
+              //             "channelName":"1a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHK8V",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           },
+              //           {
+              //             "channelCode":"ZgVzqsjwA1DTF561VGHKK7",
+              //             "channelName":"2a",
+              //             "channelSn":null,
+              //             "cameraType":0,
+              //             "online":1
+              //           }
+              //         ]
+              //       }
+              //     ]
+              //   }
+              // ]
+          }
+        });
+      },
       /** ----------------------------------摄像头预览结束------------------------------------- */
     }
   }