From 531edd1e0b3104ef7c7076ecd4704a8c1b2e2e09 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期三, 14 五月 2025 08:59:17 +0800
Subject: [PATCH] qx

---
 src/views/system/comp/index.vue |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue
index 94197a1..ebddbaa 100644
--- a/src/views/system/comp/index.vue
+++ b/src/views/system/comp/index.vue
@@ -59,7 +59,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table border v-loading="loading" :data="compList" @selection-change="handleSelectionChange">
+    <el-table border v-loading="loading" :data="compList"  ref="tab" @selection-change="handleSelectionChange">
       <el-table-column fixed="left" type="selection" width="40px" align="center" />
       <el-table-column label="搴忓彿" align="center" prop="newID" :show-overflow-tooltip="true" width="50px" fixed="left" />
       <el-table-column label="鍗曚綅鍚嶇О" align="center" prop="cnName" width="240px" />
@@ -1028,6 +1028,11 @@
       this.ids = selection.map((item) => item.drugManufacturerId);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
+      if (selection.length > 1) {
+        // 濡傛灉閫夋嫨浜嗗琛岋紝淇濈暀鏈�鍚庝竴琛�
+        this.$refs.tab.clearSelection();  // 娓呯┖鎵�鏈夐�夋嫨
+        this.$refs.tab.toggleRowSelection(selection[selection.length - 1]);  // 閲嶆柊閫夋嫨鏈�鍚庝竴椤�
+      }
     },
     // 閮ㄩ棬琛ㄦ牸鍗曡鑾峰彇
     handleSelection(selection) {

--
Gitblit v1.8.0