ソースを参照

优化电视墙

JX.LI 2 年 前
コミット
6a454e376c
2 ファイル変更10 行追加4 行削除
  1. 1 1
      src/api/monitor.js
  2. 9 3
      src/components/TVWall.vue

+ 1 - 1
src/api/monitor.js

@@ -79,7 +79,7 @@ export function getDlblistBydeptId(deptId) {
     if(deptId!=null){
       url= '/center-fire/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId+"&type=6";
     }else{
-      url= '/center-fire/VisuForestMonitorCenterController/getDlblistBydeptId?type=6";
+      url= '/center-fire/VisuForestMonitorCenterController/getDlblistBydeptId?type=6';
     }
   return request({
     url: url,

+ 9 - 3
src/components/TVWall.vue

@@ -394,7 +394,7 @@
           'ctrlCode': 'ctrl1',
           'ctrlProperty': {
             'displayMode': 1,
-            'splitNum': (array1.length == 1 ? 1 : 4),
+            'splitNum': 4,
             'channelList': [{
               'channelId': ''
             }]
@@ -402,6 +402,9 @@
           'visible': true,
           'domId': 'dom1'
         }]
+        if(array1 != undefined && array1 != null ){
+          params.ctrlProperty.splitNum = (array1.length == 1 ? 1 : 4)
+        }
         this.setPos()
         this.customizeTree(tvListJson);
         // if(array1.length == 1){
@@ -531,7 +534,7 @@
       },
 
       create(tvListJson, bfArray) { // 调用创建控件接口
-        // debugger
+        debugger
         let _this = this
         const params = [{
           'ctrlType': 'realMonitorUI',
@@ -539,7 +542,7 @@
           'ctrlProperty': {
             'displayMode': 1,
             /*以下为新增字段*/
-            "splitNum": (bfArray.length == 1 ? 1 : 4),
+            "splitNum": 4,
             /*以上为新增字段*/
             'channelList': [{
               'channelId': ''
@@ -548,6 +551,9 @@
           'visible': true,
           'domId': 'dom1'
         }]
+        if (bfArray != undefined && bfArray != null) {
+          params[0].ctrlProperty.splitNum = (bfArray.length == 1 ? 1 : 4)
+        }
         this.setPos()
         this.customizeTree(tvListJson);
         let length = tvListJson[0].treeLabels.length > 4 ? 5 : tvListJson[0].treeLabels.length;