From e3cac4fb5b540b45d6ec1a53a534d08c03d7c174 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期六, 15 十一月 2025 16:36:08 +0800
Subject: [PATCH] 打的修改

---
 src/views/archiveManager/seleUser.vue |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/views/archiveManager/seleUser.vue b/src/views/archiveManager/seleUser.vue
index 39a1eea..0b313c2 100644
--- a/src/views/archiveManager/seleUser.vue
+++ b/src/views/archiveManager/seleUser.vue
@@ -106,8 +106,9 @@
     // 鏄剧ず寮规
     show(archiveRecordsId) {
       if (archiveRecordsId) {
-    this.archiveRecordsId = archiveRecordsId
-  }
+        // 杩涜绫诲瀷杞崲
+        this.archiveRecordsId = !isNaN(Number(archiveRecordsId)) ? Number(archiveRecordsId) : 0
+      }
       this.queryParams.roleId = this.roleId
       this.queryParams.archiveRecordsId = this.archiveRecordsId
 
@@ -146,19 +147,22 @@
       const archiveRecordsId = this.queryParams.archiveRecordsId
       const userIds = this.userIds.join(",")
 
- 
       if (userIds == "") {
         this.$modal.msgError("璇烽�夋嫨瑕佸垎閰嶇殑鐢ㄦ埛")
         return
       }
-      authRecordToUser({ recordId: archiveRecordsId, userIds: userIds }).then(res => {
+
+      // 鍒涘缓杞崲鍚庣殑鍙傛暟锛岀‘淇漴ecordId鏄暟瀛楃被鍨�
+      const convertedRecordId = !isNaN(Number(archiveRecordsId)) ? Number(archiveRecordsId) : 0
+
+      authRecordToUser({ recordId: convertedRecordId, 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 || "鎺堟潈澶辫触锛屽凡缁忔巿鏉冭繃浜�")
-    }
+          this.$modal.msgSuccess(res.msg)
+          this.visible = false
+          this.$emit("ok")
+        } else {
+          this.$modal.msgError(res.msg || "鎺堟潈澶辫触锛屽凡缁忔巿鏉冭繃浜�")
+        }
       })
     }
   }

--
Gitblit v1.9.1