wyh 4 mēneši atpakaļ
vecāks
revīzija
4bef88c0bf

+ 3 - 0
src/assets/less/common.css

@@ -2,6 +2,9 @@
 .ant-card-body .table-operator {
   margin-bottom: 8px;
 }
+.table-operator {
+  width: 10%;
+}
 /** Button按钮间距 */
 .table-operator .ant-btn {
   margin: 0 8px 8px 0;

+ 3 - 0
src/assets/less/common.less

@@ -3,6 +3,9 @@
 .ant-card-body .table-operator {
   margin-bottom: 8px;
 }
+.table-operator{
+  width: 10%;
+}
 /** Button按钮间距 */
 .table-operator .ant-btn {
   margin: 0 8px 8px 0;

+ 46 - 1
src/views/module_interLock/interlockHistoryData/InterlockHistoryList.vue

@@ -173,7 +173,7 @@
             align:"center",
             dataIndex: 'interlockname',
             customRender:(t,record,index)=> {
-              return {children: record.interlockname,attrs: {rowSpan:record.rowSpan}};
+              return {children: record.interlockname,attrs: {rowSpan:record.rowSpan4}};
             },
             customCell: (record, index)=>{ return this.customCellDetail(record, index)}
           },
@@ -227,6 +227,9 @@
             title:'时间',
             align:"center",
             dataIndex: 'tagTime',
+            customRender:function (t,r,index) {
+              return {children: t,attrs: {rowSpan:r.rowSpan4}};
+            },
           },
           // {
           //   title:'逻辑关系',
@@ -351,10 +354,12 @@
               let rowSpan = 0
               let rowSpan2 = 0
               let rowSpan3 = 0
+              let rowSpan4 = 0
               let interlockname = ''
               let interlocknamePD = ''
               let interlockStatus = ''
               let loopHealthLevel = ''
+              let tagTime = ''
               for (let i = that.dataSource.length-1; i >= 0; i--) {
                 // 联锁名称合并
                 if (interlockname == '') {
@@ -440,10 +445,50 @@
                   }
 
                 }
+                // 时间合并
+                if (tagTime === '') {
+                  // console.log('第一层')
+                  that.dataSource[i].rowSpan4 = 0
+                  // // 判断回路健康级别是否为空(不会出现此类问题)
+                  // if (that.dataSource[i].tagTime != '') {
+                  //   console.log('走不走这步')
+                  //   tagTime = that.dataSource[i].tagTime
+                  //   interlocknamePD = that.dataSource[i].interlockname
+                  //   rowSpan4++
+                  // }
+                  tagTime = that.dataSource[i].tagTime
+                  interlocknamePD = that.dataSource[i].interlockname
+                  rowSpan4++
+                } else {
+                  if(tagTime == that.dataSource[i].tagTime){
+                    // console.log(99,i,interlocknamePD,that.dataSource[i+1].interlockname)
+                    if (interlocknamePD == that.dataSource[i+1].interlockname) {
+                      // console.log(11111)
+                      that.dataSource[i].rowSpan4 = 0
+                      rowSpan4++
+                    } else {
+                      // console.log(22222)
+                      that.dataSource[i+1].rowSpan4 = rowSpan4
+                      that.dataSource[i].rowSpan4 = 0
+                      rowSpan4 = 1
+                      tagTime = that.dataSource[i].tagTime
+                      interlocknamePD = that.dataSource[i].interlockname
+                    }
+                  }else{
+                    // console.log('第二层else')
+                    that.dataSource[i+1].rowSpan4 = rowSpan4
+                    that.dataSource[i].rowSpan4 = 0
+                    rowSpan4 = 1
+                    tagTime = that.dataSource[i].tagTime
+                    interlocknamePD = that.dataSource[i].interlockname
+                  }
+
+                }
               }
               that.dataSource[0].rowSpan = rowSpan
               that.dataSource[0].rowSpan2 = rowSpan2
               that.dataSource[0].rowSpan3 = rowSpan3
+              that.dataSource[0].rowSpan4 = rowSpan4
               // console.log(22222222222,that.dataSource)