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 |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 2c36721..d8e09e0 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -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 === "鏌ョ湅") {

--
Gitblit v1.9.3