fei
2025-10-14 4d5f750e8fa64ec7d113a76a4d91a0757bdd2a33
src/views/archiveManager/seleUser.vue
@@ -106,11 +106,12 @@
    // 显示弹框
    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
      this.getList()
      this.visible = true
    },
@@ -145,20 +146,23 @@
    handleSelectUser() {
      const archiveRecordsId = this.queryParams.archiveRecordsId
      const userIds = this.userIds.join(",")
      if (userIds == "") {
        this.$modal.msgError("请选择要分配的用户")
        return
      }
      authRecordToUser({ recordId: archiveRecordsId, userIds: userIds }).then(res => {
      // 创建转换后的参数,确保recordId是数字类型
      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 || "授权失败,已经授权过了")
        }
      })
    }
  }