From bc44c8e3c9d85691ce3fa73ef1300a6fae46e365 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 18 三月 2025 19:07:08 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev

---
 src/components/Table/lims-table.vue |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index bba1d5b..e293a94 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -14,7 +14,7 @@
       :row-class-name="rowClassName"
       :row-style="rowStyle"
       :row-key="rowKey"
-      :span-method="spanMethod"
+      :span-method="finalSpanMethod"
       :stripe="stripe"
       style="width: 100%"
       tooltip-effect="dark"
@@ -319,9 +319,13 @@
     },
   },
   props: {
+    parentSpanMethod: {
+      type: Function,
+      default: () => {},
+    },
     isSelection: {
       type: Boolean,
-      default: false,
+      default: undefined,
     },
     height: {
       type: String,
@@ -389,7 +393,7 @@
     },
     rowKey: {
       type: String,
-      default: undefined,
+      default: "id",
     },
     page: {
       type: Object,
@@ -410,15 +414,26 @@
     };
   },
   watch: {
-    column(val) {
-      this.doLayout();
-    },
+    // column(val) {
+    //   this.doLayout();
+    // },
   },
   updated() {
     this.$nextTick(() => {
       this.$refs.multipleTable.doLayout();
     });
   },
+  computed: {
+    finalSpanMethod() {
+      if(this.parentSpanMethod) {
+        console.log('鐖剁粍浠剁殑鍚堝苟鏂规硶');
+        return this.parentSpanMethod;
+      }else{
+        console.log('瀛愮粍浠剁殑鍚堝苟鏂规硶');
+        return this.spanMethod;
+      }
+    },
+  },
   mounted() {
     this.calculateSpanInfo();
   },

--
Gitblit v1.9.3