| | |
| | | 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'], |
| | |
| | | |
| | | 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) |
| | | // 创建一个新对象,将字符串类型的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组件的recordId是数字类型 |
| | | const recordId = !isNaN(Number(this.queryParams.archiveRecordsId)) ? |
| | | Number(this.queryParams.archiveRecordsId) : 0 |
| | | this.$refs.select.show(recordId) |
| | | }, |
| | | // 返回按钮 |
| | | handleClose() { |