From 749f897a11e711199c6b1677accf2f6e46895315 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期六, 22 十一月 2025 16:01:26 +0800
Subject: [PATCH] 新增了代码
---
src/views/archiveManager/arMAutoUser.vue | 42 +++++++++++++++++++++++++++---------------
1 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/src/views/archiveManager/arMAutoUser.vue b/src/views/archiveManager/arMAutoUser.vue
index 207a63d..d7eb9ef 100644
--- a/src/views/archiveManager/arMAutoUser.vue
+++ b/src/views/archiveManager/arMAutoUser.vue
@@ -48,7 +48,7 @@
v-hasPermi="['system:role:remove']"
>鎵归噺鍙栨秷鎺堟潈</el-button>
</el-col> -->
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@@ -56,7 +56,7 @@
size="mini"
@click="handleClose"
>鍏抽棴</el-button>
- </el-col>
+ </el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -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'],
@@ -148,26 +148,38 @@
created() {
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() {
--
Gitblit v1.9.1