Bläddra i källkod

成本分配表加工单位字数限制

jbb 2 år sedan
förälder
incheckning
df9d7c6c16
1 ändrade filer med 12 tillägg och 1 borttagningar
  1. 12 1
      src/views/reportForms/cost-allocation-table.vue

+ 12 - 1
src/views/reportForms/cost-allocation-table.vue

@@ -46,7 +46,8 @@
             </a-col>
             <a-col :md="6" :sm="8">
               <a-form-model-item label="加工单位" prop="processUnit">
-                {{ detailsPlanNum.processUnit }}
+                <span :title=" detailsPlanNum.processUnit">{{ detailsPlanNum.processUnit | ellipsis}}</span>
+                <!-- {{ detailsPlanNum.processUnit }} -->
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
@@ -310,6 +311,16 @@ export default {
     }
   },
   created() {},
+  filters: {
+                //文字数超出时,超出部分使用...
+                ellipsis(value) {
+                    if (!value) return ''
+                    if (value.length > 20) {
+                        return value.slice(0, 20) + '...'
+                    }
+                    return value
+                }
+            },
   methods: {
     // 【计划单号】 搜索
     onSearch() {