sr 4 лет назад
Родитель
Сommit
af6f89f267

+ 0 - 3
ruoyi-ui/src/views/system/editing/index.vue

@@ -158,7 +158,6 @@
          taheusid:0,
          tabName:'',
          queryParamstwoi:{},
-         ojeuduj:0
       };
     },
     mounted() {
@@ -176,7 +175,6 @@
       this.queryParamslist.table = this.$route.query.tables
       this.taheus = this.$route.query.tables
       this.taheusid = this.$route.query.id
-      this.ojeuduj = this.$route.query.id
       this.deledlid.idList.push(this.$route.query.id)
 
       // tab
@@ -278,7 +276,6 @@
                  this.queryData.table_column = null
                }
                routerst.tableColumnuy = this.queryData.table_column
-               routerst.tableid = this.ojeuduj
              })
                if(route.cssClass !== null){
                  this.imgShoew = route.cssClass

+ 22 - 3
ruoyi-ui/src/views/system/surface/index.vue

@@ -21,7 +21,7 @@
       <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" style="color: red;" align="center" />
         <template v-for="(item, index) in tabData">
-          <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" :key="index">
+          <el-table-column :width="tabData.length>13?zjFn(item.columnComment)*19:'auto'" :label="item.columnComment" align="center" :prop="item.columnName" :key="index" show-overflow-tooltip>
             <template slot-scope="scope">
               <img class="img_icon" v-if="item.htmlType=='imageUpload' && scope.row[scope.column.property]" @click="imgBtn(JSON.parse(scope.row[scope.column.property])[0].url)"
                 :src="JSON.parse(scope.row[scope.column.property])[0].url" alt="">
@@ -142,7 +142,23 @@
       this.init();
       this.getList();
     },
-    methods: {
+    methods: {
+      zjFn(str) {
+        let bytesCount = 0;
+        for (var i = 0; i < str.length; i++)
+        {
+          var c = str.charAt(i);
+          if (/^[\u0000-\u00ff]$/.test(c)) //匹配双字节
+          {
+          bytesCount += 1;
+          }
+          else
+          {
+          bytesCount += 2;
+          }
+        }
+        return bytesCount
+      },
       imgBtn(url) {
         this.pir_imgs = url
         this.$refs.BigPicture.hidden.status = true
@@ -313,7 +329,10 @@
 </script>
 
 
-<style lang="scss">
+<style lang="scss">
+  .el-table .cell, .el-table th div {
+  	padding-right: 0;
+  }
   .img_icon {
     width: 120px;
     height: 120px;