From 57973d2a25401a8137de116f4e200ab14610e7d6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 08 十月 2026 13:32:48 +0800
Subject: [PATCH] feat(order): 新增订单编辑功能并完善表单验证 - 实现订单表单验证规则,包括送样日期必填验证 - 修复送样日期字段映射问题 - 完善文件上传组件的动态宽度计算 - 添加检验依据搜索过滤功能

---
 src/components/Table/lims-table.vue |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 1f4e431..d8e09e0 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -162,7 +162,7 @@
 // plain锛氭寜elementUi 鏂囨。涓哄噯
 // clickFun锛氭寜閽殑鍥炶皟鍑芥暟
 export default {
-  name: "ZTTable",
+  name: "LimsTable",
   filters: {
     typeFn(val, row) {
       if (typeof val === "function") {
@@ -264,11 +264,21 @@
   data() {
     return {
       spanList: [],
-      btnWidth: "120px",
       uploadRefs: [],
       currentFiles: {}, // 鐢ㄤ簬瀛樺偍姣忚鐨勫綋鍓嶆枃浠�
       uploadKeys: {} // 鐢ㄤ簬鍔ㄦ�侀噸缃粍浠�
     };
+  },
+  computed: {
+    btnWidth() {
+      let width = 120;
+      this.column.filter(item => item.dataType === 'action').forEach(item => {
+        this.tableData.forEach(row => {
+          width = Math.max(width, parseInt(this.getWidth(item.operation, row), 10));
+        });
+      });
+      return `${width}px`;
+    }
   },
   mounted() {
     this.calculateSpanInfo();
@@ -302,7 +312,6 @@
           count += a.name.length;
         }
       });
-      this.btnWidth = count * 15 + 60 + "px";
       return count * 15 + 60 + "px";
     },
     getTitleWidth(row) {
@@ -321,6 +330,9 @@
       }
     },
     iconFn(row) {
+      if (Object.prototype.hasOwnProperty.call(row, 'icon')) {
+        return row.icon;
+      }
       if (row.name === "缂栬緫" || row.name === "淇敼") {
         return "el-icon-edit";
       } else if (row.name === "鏌ョ湅") {
@@ -490,19 +502,19 @@
   padding-left: 10px !important;
 }
 
-.lims-table .highlight-warning-row-border td:first-child {
+.lims-table >>> .highlight-warning-row-border td:first-child {
   border-left: 4px solid #ffcd29;
 }
 
-.lims-table .highlight-warning-row-border td:last-child {
+.lims-table >>> .highlight-warning-row-border td:last-child {
   border-right: 4px solid #ffcd29;
 }
 
-.lims-table .highlight-danger-row-border td:first-child {
+.lims-table >>> .highlight-danger-row-border td:first-child {
   border-left: 4px solid #f56c6c;
 }
 
-.lims-table .highlight-danger-row-border td:last-child {
+.lims-table >>> .highlight-danger-row-border td:last-child {
   border-right: 4px solid #f56c6c;
 }
 >>>.red-row td {

--
Gitblit v1.9.3