| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {listArchiverecordstouser,addArchiverecordstouser,authRecordToUser} from "@/api/system/archiverecordstouser" |
| | | import {listArchiverecordstouser,addArchiverecordstouser,authRecordToUser,getArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser" |
| | | |
| | | import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role" |
| | | export default { |
| | |
| | | roleId: { |
| | | type: [Number, String] |
| | | }, |
| | | recordId: { |
| | | archiveRecordsId: { |
| | | type: [Number, String] |
| | | } |
| | | }, |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | roleId: undefined, |
| | | recordId: undefined, |
| | | archiveRecordsId: undefined, |
| | | userName: undefined, |
| | | phonenumber: undefined |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | // 显示弹框 |
| | | show() { |
| | | show(archiveRecordsId) { |
| | | if (archiveRecordsId) { |
| | | this.archiveRecordsId = archiveRecordsId |
| | | } |
| | | this.queryParams.roleId = this.roleId |
| | | this.queryParams.recordId = this.recordId |
| | | this.queryParams.archiveRecordsId = this.archiveRecordsId |
| | | |
| | | this.getList() |
| | | this.visible = true |
| | | }, |
| | |
| | | }, |
| | | /** 选择授权用户操作 */ |
| | | handleSelectUser() { |
| | | const recordId = this.queryParams.recordId |
| | | const archiveRecordsId = this.queryParams.archiveRecordsId |
| | | const userIds = this.userIds.join(",") |
| | | |
| | | alert(recordId) |
| | | alert(userIds) |
| | | |
| | | if (userIds == "") { |
| | | this.$modal.msgError("请选择要分配的用户") |
| | | return |
| | | } |
| | | authRecordToUser({ recordId: recordId, userIds: userIds }).then(res => { |
| | | this.$modal.msgSuccess(res.msg) |
| | | this.visible = false |
| | | this.$emit("ok") |
| | | authRecordToUser({ recordId: archiveRecordsId, userIds: userIds }).then(res => { |
| | | if(res.code === 200) { |
| | | this.$modal.msgSuccess(res.msg) |
| | | this.visible = false |
| | | this.$emit("ok") |
| | | } else { |
| | | this.$modal.msgError(res.msg || "授权失败,已经授权过了") |
| | | } |
| | | }) |
| | | } |
| | | } |