From 1a64a71d96069b92c84d781ce2e39dc29f630ada Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期二, 09 九月 2025 17:40:22 +0800
Subject: [PATCH] 新增了代码

---
 src/views/archiveManager/seleUser.vue |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/views/archiveManager/seleUser.vue b/src/views/archiveManager/seleUser.vue
index ba874e2..39a1eea 100644
--- a/src/views/archiveManager/seleUser.vue
+++ b/src/views/archiveManager/seleUser.vue
@@ -24,7 +24,8 @@
       </el-form-item>
     </el-form>
     <el-row>
-      <el-table @row-click="clickRow" ref="table" :data="userList" @selection-change="handleSelectionChange" height="260px">
+      <el-table @row-click="clickRow" ref="table" :data="userList"   @selection-change="handleSingleSelection"
+ height="260px">
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column label="鐢ㄦ埛鍚嶇О" prop="userName" :show-overflow-tooltip="true" />
         <el-table-column label="鐢ㄦ埛鏄电О" prop="nickName" :show-overflow-tooltip="true" />
@@ -93,6 +94,15 @@
     }
   },
   methods: {
+      // 鏇挎崲鍘熸湁鐨刪andleSelectionChange鏂规硶
+  handleSingleSelection(selection) {
+    if (selection.length > 1) {
+      this.$refs.table.clearSelection();
+      this.$refs.table.toggleRowSelection(selection[selection.length - 1]);
+    }
+    else
+    this.userIds = selection.map(item => item.userId);
+  },
     // 鏄剧ず寮规
     show(archiveRecordsId) {
       if (archiveRecordsId) {
@@ -105,7 +115,8 @@
       this.visible = true
     },
     clickRow(row) {
-      this.$refs.table.toggleRowSelection(row)
+      this.$refs.table.clearSelection();
+    this.$refs.table.toggleRowSelection(row);
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {

--
Gitblit v1.9.1