From 459783fd4af8e8c0566b57690e7f0579373d2db8 Mon Sep 17 00:00:00 2001 From: tian <3072314689@qq.com> Date: 星期五, 26 九月 2025 11:42:46 +0800 Subject: [PATCH] ‘列表查询 --- src/views/archiveManager/arMAutoUser.vue | 69 +++++++++++++++++++++++++--------- 1 files changed, 50 insertions(+), 19 deletions(-) diff --git a/src/views/archiveManager/arMAutoUser.vue b/src/views/archiveManager/arMAutoUser.vue index 3117b2e..207a63d 100644 --- a/src/views/archiveManager/arMAutoUser.vue +++ b/src/views/archiveManager/arMAutoUser.vue @@ -28,6 +28,7 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button + v-if="vws" type="primary" plain icon="el-icon-plus" @@ -61,21 +62,30 @@ <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鐢ㄦ埛鍚嶇О" prop="userName" :show-overflow-tooltip="true" /> - <el-table-column label="鐢ㄦ埛鏄电О" prop="nickName" :show-overflow-tooltip="true" /> - <el-table-column label="閭" prop="email" :show-overflow-tooltip="true" /> - <el-table-column label="鎵嬫満" prop="phonenumber" :show-overflow-tooltip="true" /> - <el-table-column label="鐘舵��" align="center" prop="status"> + <el-table-column label="鐢ㄦ埛鍚嶇О" prop="sysUser.userName" :show-overflow-tooltip="true" /> + <el-table-column label="鐢ㄦ埛鏄电О" prop="sysUser.nickName" :show-overflow-tooltip="true" > + <template slot-scope="scope">{{scope.row.sysUser.nickName?scope.row.sysUser.nickName:'--'}}</template> + + </el-table-column> + <el-table-column label="閭" prop="sysUser.email" :show-overflow-tooltip="true" > + <template slot-scope="scope">{{scope.row.sysUser.email?scope.row.sysUser.email:'--'}}</template> + + </el-table-column> + <el-table-column label="鎵嬫満" prop="sysUser.phonenumber" :show-overflow-tooltip="true" > + <template slot-scope="scope">{{scope.row.sysUser.phonenumber?scope.row.sysUser.phonenumber:'--'}}</template> + + </el-table-column> + <!-- <el-table-column label="鐘舵��" align="center" prop="sysUser.status"> <template slot-scope="scope"> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </template> - </el-table-column> + </el-table-column> --> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.createTime) }}</span> </template> </el-table-column> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <el-table-column label="鎿嶄綔" align="center" prop="11" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" @@ -95,20 +105,22 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - <select-user ref="select" :roleId="queryParams.roleId" @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 { 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'], components: { selectUser }, data() { return { + vws: true, // 閬僵灞� loading: true, // 閫変腑鐢ㄦ埛缁� @@ -126,15 +138,20 @@ pageNum: 1, pageSize: 10, roleId: undefined, - userName: undefined, - phonenumber: undefined + archiveRecordsId: undefined, + + // SysUser.userName: undefined, + // phonenumber: undefined } } }, created() { const roleId = this.$route.params && this.$route.params.roleId - if (roleId) { + const recordId = this.$route.params && this.$route.params.archiveRecordsId + + if (roleId&&recordId) { this.queryParams.roleId = roleId + this.queryParams.archiveRecordsId = recordId this.getList() } }, @@ -144,9 +161,10 @@ this.loading = true console.log(this.queryParams) console.log("------------") - UserRoleIdList(this.queryParams).then(response => { - this.userList = response.rows - this.total = response.total + listArchiverecordstouser(this.queryParams).then(response => { + console.log(response) + this.userList = response.data.data + this.total = response.data.total this.loading = false } ) @@ -173,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("鍙栨秷鎺堟潈鎴愬姛") @@ -199,3 +223,10 @@ } } </script> +<style scoped> +/* el-table 鍒楁暟鎹负绌鸿嚜鍔ㄦ樉绀� -- */ +.className :empty::before{ + content:'--'; + color:gray; +} +</style> -- Gitblit v1.9.1