From fa60bfa07970c192c85a437e7db784eccdae2839 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期一, 16 六月 2025 20:04:15 +0800
Subject: [PATCH] 修改bug

---
 culture/src/components/SelectMember/index.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/culture/src/components/SelectMember/index.vue b/culture/src/components/SelectMember/index.vue
index 3d092b2..0b0434e 100644
--- a/culture/src/components/SelectMember/index.vue
+++ b/culture/src/components/SelectMember/index.vue
@@ -124,15 +124,19 @@
 
             if (this.projectId) {
                 params.projectId = this.projectId;
-                // TODO: 这里需要替换为新的接口调用
-                // const res = await getProjectUserList(params);
-            } else {
-                const res = await getUserList(params);
-                this.tableData = res.records;
             }
+            
+            const res = await getUserList(params);
+            this.tableData = res.records;
 
             // 数据加载完成后重新应用选中状态
-            this.setSelection(this.selectData)
+            this.$nextTick(() => {
+                this.tableData.forEach(row => {
+                    if (this.selectData.some(i => i.userId === row.userId)) {
+                        this.$refs.memberTable.toggleRowSelection(row, true)
+                    }
+                })
+            })
         },
         searchRole() {
             this.search = ''

--
Gitblit v1.7.1