Quellcode durchsuchen

把原来名称省略去掉,改成换行

dongjh vor 7 Monaten
Ursprung
Commit
d9b6acc69e

+ 19 - 4
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -216,10 +216,10 @@
             align:"center",
             dataIndex: 'interlockname',
             // width: 200,
-            ellipsis: true,
+            // ellipsis: true,
             customRender:(text,record,index)=> {
               var children = (
-                <a-tooltip>
+                <a-tooltip class="item-cell-wrap">
                   <template slot="title">
                     { record.interlockApparatusName } -- { record.interlockSystemName } -- {record.interlockname}
                   </template>
@@ -240,8 +240,19 @@
             title:'联锁条件',
             align:"center",
             // width: 160,
-            ellipsis: true,
-            dataIndex: 'interlockConditionTag'
+            // ellipsis: true,
+            dataIndex: 'interlockConditionTag',
+            customRender:function (t,r,index) {
+              // return {children: t,attrs: {rowSpan:r.rowSpan}};
+              var children = (
+                <span class="item-cell-wrap">
+                  {r.interlockConditionTag}
+                </span>
+              )
+              return {
+                children: [children],
+              };
+            },
           },
           {
             title:'仪表状态',
@@ -766,6 +777,10 @@
     text-overflow: ellipsis; /* 溢出用省略号*/
     vertical-align: top; //设置基准线,解决display inline-block造成的错位问题
   }
+  .item-cell-wrap {
+    word-wrap: break-word;
+    white-space: pre-wrap;
+  }
   /deep/.ant-table-thead > tr > th {
     text-align: center; 
   }

+ 26 - 4
src/views/module_interLock/interlockHistoryData/InterlockHistoryList.vue

@@ -211,8 +211,15 @@
             title:'时间',
             align:"center",
             dataIndex: 'tagTime',
-            customRender:function (t,r,index) {
-              return {children: t,
+            ellipsis: true,
+            resizable: true,
+            customRender:function (t,r,index) {              
+              var children = (
+                <span class="item-cell-wrap">
+                  {t}
+                </span>
+              )
+              return {children: children,
                 attrs: {rowSpan:r.rowSpan4}
               };
             },
@@ -228,7 +235,7 @@
             // },
             customRender:(text,record,index)=> {
               var children = (
-                <a-tooltip>
+                <a-tooltip class="item-cell-wrap">
                   <template slot="title">
                     { record.interlockApparatusName } -- { record.interlockSystemName } -- {record.interlockname}
                   </template>
@@ -250,7 +257,18 @@
             title:'联锁条件',
             align:"center",
             ellipsis: true,
-            dataIndex: 'interlockConditionTag'
+            dataIndex: 'interlockConditionTag',
+            customRender:function (t,r,index) {
+              // return {children: t,attrs: {rowSpan:r.rowSpan}};
+              var children = (
+                <span class="item-cell-wrap">
+                  {r.interlockConditionTag}
+                </span>
+              )
+              return {
+                children: [children],
+              };
+            },
           },
           // {
           //   title:'系统id',
@@ -700,4 +718,8 @@
   .table-operator {
     width: 10% !important;
   }  
+  .item-cell-wrap {
+    word-wrap: break-word;
+    white-space: pre-wrap;
+  }
 </style>

+ 10 - 11
src/views/module_interLock/interlockHistoryDetail/InterlockHistoryDetailList.vue

@@ -250,14 +250,9 @@
             customRender:function (t,r,index) {
               // return {children: t,attrs: {rowSpan:r.rowSpan}};
               var children = (
-                <a-tooltip>
-                  <template slot="title">
-                    {r.interlockname}
-                  </template>
-                  <span class="item-cell-name">
-                    {r.interlockname}
-                  </span>
-                </a-tooltip>
+                <span class="item-cell-wrap">
+                  {r.interlockname}
+                </span>
               )
               return {
                 children: [children],
@@ -279,12 +274,12 @@
             customRender:(text,record,index)=> {
               var interlockCondition = record.interlockSetUnit ? text + record.interlockSetUnit : text              
               var children = (
-                <a-tooltip>
+                <a-tooltip class="item-cell-wrap">
                   <template slot="title">
                     { record.interlockConditionTag }
                   </template>
                   { text }
-                  <span class="normal-tag">
+                  <span class="primary-tag">
                     { record.interlockSetUnit ? record.interlockSetUnit : '' }
                   </span>
                 </a-tooltip>
@@ -314,7 +309,7 @@
               var children = (
                 <a-tooltip>
                   { t }
-                  <span class="normal-tag">
+                  <span class="primary-tag">
                     { r.interlockSetUnit ? r.interlockSetUnit : '' }
                   </span>
                 </a-tooltip>
@@ -591,4 +586,8 @@
     text-overflow: ellipsis; /* 溢出用省略号*/
     vertical-align: top; //设置基准线,解决display inline-block造成的错位问题
   }
+  .item-cell-wrap {
+    word-wrap: break-word;
+    white-space: pre-wrap;
+  }
 </style>

+ 7 - 8
src/views/module_interLock/interlockSummaryDetail/InterlockSummaryDetailList.vue

@@ -271,14 +271,9 @@
             customRender:function (t,r,index) {
               // return {children: t,attrs: {rowSpan:r.rowSpan}};
               var children = (
-                <a-tooltip>
-                  <template slot="title">
-                    {r.interlockname}
-                  </template>
-                  <span class="item-cell-name">
-                    {r.interlockname}
-                  </span>
-                </a-tooltip>
+                <span  class="item-cell-wrap">
+                  {r.interlockname}
+                </span>
               )
               return {
                 children: [children],
@@ -623,4 +618,8 @@
     text-overflow: ellipsis; /* 溢出用省略号*/
     vertical-align: top; //设置基准线,解决display inline-block造成的错位问题
   }
+  .item-cell-wrap {
+    word-wrap: break-word;
+    white-space: pre-wrap;
+  }
 </style>