| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {listArchiverecordstouser,addArchiverecordstouser,authRecordToUser} from "@/api/system/archiverecordstouser" |
| | | |
| | | import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role" |
| | | export default { |
| | | dicts: ['sys_normal_disable'], |
| | | props: { |
| | | // 角色编号 |
| | | roleId: { |
| | | type: [Number, String] |
| | | }, |
| | | recordId: { |
| | | type: [Number, String] |
| | | } |
| | | }, |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | roleId: undefined, |
| | | recordId: undefined, |
| | | userName: undefined, |
| | | phonenumber: undefined |
| | | } |
| | |
| | | // 显示弹框 |
| | | show() { |
| | | this.queryParams.roleId = this.roleId |
| | | this.queryParams.recordId = this.recordId |
| | | this.getList() |
| | | this.visible = true |
| | | }, |
| | |
| | | // 查询表数据 |
| | | getList() { |
| | | UserRoleIdList(this.queryParams).then(res => { |
| | | console.log("=------00000000009") |
| | | console.log(res) |
| | | this.userList = res.rows |
| | | this.total = res.total |
| | | }) |
| | |
| | | }, |
| | | /** 选择授权用户操作 */ |
| | | handleSelectUser() { |
| | | const roleId = this.queryParams.roleId |
| | | const recordId = this.queryParams.recordId |
| | | const userIds = this.userIds.join(",") |
| | | |
| | | alert(recordId) |
| | | alert(userIds) |
| | | if (userIds == "") { |
| | | this.$modal.msgError("请选择要分配的用户") |
| | | return |
| | | } |
| | | authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => { |
| | | authRecordToUser({ recordId: recordId, userIds: userIds }).then(res => { |
| | | this.$modal.msgSuccess(res.msg) |
| | | this.visible = false |
| | | this.$emit("ok") |