From 7706412d104e452b917ec132dcd9377680a83449 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期五, 08 八月 2025 13:38:36 +0800
Subject: [PATCH] 添加了代码

---
 src/views/archiveManager/seleUser.vue |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/views/archiveManager/seleUser.vue b/src/views/archiveManager/seleUser.vue
index 6249c65..ba874e2 100644
--- a/src/views/archiveManager/seleUser.vue
+++ b/src/views/archiveManager/seleUser.vue
@@ -57,7 +57,7 @@
 </template>
 
 <script>
-  import {listArchiverecordstouser,addArchiverecordstouser,authRecordToUser} from "@/api/system/archiverecordstouser"
+  import {listArchiverecordstouser,addArchiverecordstouser,authRecordToUser,getArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser"
 
 import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role"
 export default {
@@ -67,7 +67,7 @@
     roleId: {
       type: [Number, String]
     },
-    recordId: {
+    archiveRecordsId: {
       type: [Number, String]
     }
   },
@@ -86,7 +86,7 @@
         pageNum: 1,
         pageSize: 10,
         roleId: undefined,
-        recordId: undefined,
+        archiveRecordsId: undefined,
         userName: undefined,
         phonenumber: undefined
       }
@@ -94,9 +94,13 @@
   },
   methods: {
     // 鏄剧ず寮规
-    show() {
+    show(archiveRecordsId) {
+      if (archiveRecordsId) {
+    this.archiveRecordsId = archiveRecordsId
+  }
       this.queryParams.roleId = this.roleId
-      this.queryParams.recordId = this.recordId
+      this.queryParams.archiveRecordsId = this.archiveRecordsId
+
       this.getList()
       this.visible = true
     },
@@ -128,19 +132,22 @@
     },
     /** 閫夋嫨鎺堟潈鐢ㄦ埛鎿嶄綔 */
     handleSelectUser() {
-      const recordId = this.queryParams.recordId
+      const archiveRecordsId = this.queryParams.archiveRecordsId
       const userIds = this.userIds.join(",")
 
-      alert(recordId)
-      alert(userIds)
+ 
       if (userIds == "") {
         this.$modal.msgError("璇烽�夋嫨瑕佸垎閰嶇殑鐢ㄦ埛")
         return
       }
-      authRecordToUser({ recordId: recordId, userIds: userIds }).then(res => {
-        this.$modal.msgSuccess(res.msg)
-        this.visible = false
-        this.$emit("ok")
+      authRecordToUser({ recordId: archiveRecordsId, userIds: userIds }).then(res => {
+        if(res.code === 200) {
+      this.$modal.msgSuccess(res.msg)
+      this.visible = false
+      this.$emit("ok")
+    } else {
+      this.$modal.msgError(res.msg || "鎺堟潈澶辫触锛屽凡缁忔巿鏉冭繃浜�")
+    }
       })
     }
   }

--
Gitblit v1.9.1