Просмотр исходного кода

准确性页面出现table错乱样式

Shan9312 1 год назад
Родитель
Сommit
200c03b44f

+ 17 - 0
src/styles/element-ui.scss

@@ -78,3 +78,20 @@
 .el-range-editor.el-input__inner {
   display: inline-flex !important;
 }
+
+//
+
+// 兼容safari列头与td对不齐问题
+// .el-table__header, .el-table__body, .el-table__footer{
+//   width:100% !important;
+//   table-layout: fixed !important;
+// }
+.el-table th .gutter{
+  display: table-cell!important;
+}
+.el-table th .cell{
+  display: table-cell!important;
+}
+.el-table--border th.gutter:last-of-type {
+  display: block!important;
+}

+ 12 - 12
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -725,7 +725,7 @@
             class="elTable table-fixed"
             :height="myHeightSecond"
           >
-            <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
+            <u-table-column sortable label="日期" min-width="70px" :key="Math.random()" align="center" prop="日期" />
             <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
             <u-table-column sortable label="操作编号" min-width="70px" align="center" prop="sort" />
             <u-table-column sortable label="车次" min-width="50px" align="center" prop="车次" />
@@ -813,7 +813,7 @@
             class="elTable table-fixed"
             :height="myHeightThird"
           >
-            <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
+            <u-table-column sortable label="日期" min-width="70px" :key="Math.random()" align="center" prop="日期" />
             <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
             <u-table-column sortable label="操作编号" min-width="70px" align="center" prop="sort" />
             <u-table-column sortable label="车次" min-width="45px" align="center" prop="车次" />
@@ -2874,10 +2874,10 @@ export default {
         this.getChart4()
         this.getChart5()
         this.getChart6()
-        this.$nextTick(() => {
-          this.$refs.plTable3.doLayout()
-          this.$refs.plTable3.doLayout()
-        })
+        // this.$nextTick(() => {
+        //   this.$refs.plTable3.doLayout()
+        //   // this.$refs.plTable3.doLayout()
+        // })
       } else if (this.activeName == 'second') {
         this.$nextTick(()=>{
             this.myHeightSecond = document.documentElement.clientHeight - 40 - this.$refs.myHeightSecond.offsetHeight - 150
@@ -2893,9 +2893,9 @@ export default {
             this.tab2.table.getdataListParm.parammaps.templetname = ''
             this.getTab2List()
             this.getTMRNameList2()
-            this.$nextTick(() => {
-              this.$refs.plTable3.doLayout()
-            })
+            // this.$nextTick(() => {
+            //   this.$refs.plTable3.doLayout()
+            // })
         })
       } else if (this.activeName == 'third') {
         this.$nextTick(()=>{
@@ -2913,9 +2913,9 @@ export default {
           this.tab3.table.getdataListParm.parammaps.buttontype = ''
           this.getTab3List()
           this.getTMRNameList3()
-          this.$nextTick(() => {
-            this.$refs.plTable3.doLayout()
-          })
+          // this.$nextTick(() => {
+          //   this.$refs.plTable3.doLayout()
+          // })
         })
       }