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/arMAutoUser.vue | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/views/archiveManager/arMAutoUser.vue b/src/views/archiveManager/arMAutoUser.vue index c978b7f..207a63d 100644 --- a/src/views/archiveManager/arMAutoUser.vue +++ b/src/views/archiveManager/arMAutoUser.vue @@ -105,14 +105,15 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - <select-user ref="select" :roleId="queryParams.roleId" :recordId="queryParams.recordId" @ok="handleQuery" /> + <select-user ref="select" :roleId="queryParams.roleId" :recordId="queryParams.archiveRecordsId" @ok="handleQuery" /> </div> </template> <script> import {UserRoleIdList, allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role" import selectUser from "./seleUser" -import {listArchiverecordstouser,addArchiverecordstouser} from "@/api/system/archiverecordstouser" + import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,getArchiverecordstouserByReIdAndUid } from "@/api/system/materials" +import {listArchiverecordstouser,addArchiverecordstouser,delArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser" export default { name: "AuthUser1", dicts: ['sys_normal_disable'], @@ -137,16 +138,17 @@ pageNum: 1, pageSize: 10, roleId: undefined, - archiveRecordsId: undefined - // userName: undefined, - // phonenumber: undefined + archiveRecordsId: undefined, + + // SysUser.userName: undefined, + // phonenumber: undefined } } }, created() { const roleId = this.$route.params && this.$route.params.roleId const recordId = this.$route.params && this.$route.params.archiveRecordsId - alert(recordId) + if (roleId&&recordId) { this.queryParams.roleId = roleId this.queryParams.archiveRecordsId = recordId @@ -189,13 +191,19 @@ }, /** 鎵撳紑鎺堟潈鐢ㄦ埛琛ㄥ脊绐� */ openSelectUser() { - this.$refs.select.show() + // alert(this.queryParams.roleId) + // alert(this.queryParams.archiveRecordsId ) + this.$refs.select.show(this.queryParams.archiveRecordsId) }, /** 鍙栨秷鎺堟潈鎸夐挳鎿嶄綔 */ cancelAuthUser(row) { - const roleId = this.queryParams.roleId - this.$modal.confirm('纭瑕佸彇娑堣鐢ㄦ埛"' + row.userName + '"瑙掕壊鍚楋紵').then(function() { - return authUserCancel({ userId: row.userId, roleId: roleId }) + const recordId = this.queryParams.archiveRecordsId + var userId = row.userId + // alert(userId) + // alert(this.queryParams.archiveRecordsId) + // alert(row.sysUser.userName) + this.$modal.confirm('纭瑕佸彇娑堣鐢ㄦ埛"' + row.sysUser.userName + '"鎺堟潈鍚楋紵').then(function() { + return delArchiverecordstouserByReIdAndUid({ recordId: recordId, userId: userId }) }).then(() => { this.getList() this.$modal.msgSuccess("鍙栨秷鎺堟潈鎴愬姛") -- Gitblit v1.9.1