| | |
| | | :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'], |
| | |
| | | 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 |
| | |
| | | }, |
| | | /** 打开授权用户表弹窗 */ |
| | | 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("取消授权成功") |