From 406f7526df2f05e972cf3d5ccabc6610501828a6 Mon Sep 17 00:00:00 2001
From: tian <3072314689@qq.com>
Date: 星期一, 13 十月 2025 18:53:32 +0800
Subject: [PATCH] 修改给录入人员授权bug
---
src/views/archiveManager/arMAutoUser.vue | 35 +++++++++++------
src/views/archiveManager/seleUser.vue | 28 ++++++++------
src/views/archiveManager/index.vue | 2
3 files changed, 40 insertions(+), 25 deletions(-)
diff --git a/src/views/archiveManager/arMAutoUser.vue b/src/views/archiveManager/arMAutoUser.vue
index 207a63d..c55c7e6 100644
--- a/src/views/archiveManager/arMAutoUser.vue
+++ b/src/views/archiveManager/arMAutoUser.vue
@@ -113,7 +113,7 @@
import {UserRoleIdList, allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role"
import selectUser from "./seleUser"
import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,getArchiverecordstouserByReIdAndUid } from "@/api/system/materials"
-import {listArchiverecordstouser,addArchiverecordstouser,delArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser"
+import {listArchiverecordstouser,addArchiverecordstouser,delArchiverecordstouserByReIdAndUid,getArchiverecordstouser} from "@/api/system/archiverecordstouser"
export default {
name: "AuthUser1",
dicts: ['sys_normal_disable'],
@@ -149,25 +149,36 @@
const roleId = this.$route.params && this.$route.params.roleId
const recordId = this.$route.params && this.$route.params.archiveRecordsId
- if (roleId&&recordId) {
+ if (roleId && recordId) {
this.queryParams.roleId = roleId
- this.queryParams.archiveRecordsId = recordId
+ // 杩涜绫诲瀷杞崲
+ this.queryParams.archiveRecordsId = !isNaN(Number(recordId)) ? Number(recordId) : 0
this.getList()
}
},
methods: {
+ // 淇敼 getList 鏂规硶
/** 鏌ヨ鎺堟潈鐢ㄦ埛鍒楄〃 */
getList() {
this.loading = true
- console.log(this.queryParams)
- console.log("------------")
- listArchiverecordstouser(this.queryParams).then(response => {
- console.log(response)
- this.userList = response.data.data
- this.total = response.data.total
- this.loading = false
- }
- )
+ // 鍒涘缓涓�涓柊瀵硅薄锛屽皢瀛楃涓茬被鍨嬬殑archiveRecordsId杞崲涓烘暟瀛楃被鍨�
+ const params = {
+ ...this.queryParams,
+ archiveRecordsId: !isNaN(Number(this.queryParams.archiveRecordsId)) ?
+ Number(this.queryParams.archiveRecordsId) : 0
+ }
+ listArchiverecordstouser(params).then(response => {
+ this.userList = response.data.data
+ this.total = response.data.total
+ this.loading = false
+ })
+ },
+ /** 鎵撳紑鎺堟潈鐢ㄦ埛琛ㄥ脊绐� */
+ openSelectUser() {
+ // 纭繚浼犻�掔粰select缁勪欢鐨剅ecordId鏄暟瀛楃被鍨�
+ const recordId = !isNaN(Number(this.queryParams.archiveRecordsId)) ?
+ Number(this.queryParams.archiveRecordsId) : 0
+ this.$refs.select.show(recordId)
},
// 杩斿洖鎸夐挳
handleClose() {
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index ee1f128..50eb592 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -1151,7 +1151,7 @@
handleAuthUser: function(row) {
const roleId = 2
var archiveRecordsId = row.recordId
- // alert(roleId)
+ alert(roleId)
this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId)
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
diff --git a/src/views/archiveManager/seleUser.vue b/src/views/archiveManager/seleUser.vue
index 39a1eea..1c61ea5 100644
--- a/src/views/archiveManager/seleUser.vue
+++ b/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 => {
+
+ // 鍒涘缓杞崲鍚庣殑鍙傛暟锛岀‘淇漴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