用户管理

This commit is contained in:
sjl
2024-11-12 18:56:33 +08:00
parent 4b5498ad49
commit 44e7598b68
22 changed files with 808 additions and 548 deletions

View File

@@ -1,5 +1,5 @@
import { ResPage } from '@/api/interface'
import { Role } from './interface'
import type { ResPage } from '@/api/interface'
import type { Role } from './interface'
import { ADMIN as rePrefix } from '@/api/config/serviceName'
import http from '@/api'
@@ -8,7 +8,7 @@ import http from '@/api'
*/
// 获取角色列表
export const getRoleList = (params: Role.ReqRoleParams) => {
return http.post<ResPage<Role.RoleBO>>(`/role/list`, params)
return http.get(`/sysRole/list`, params)
// return http.post<ResPage<Role.ResRoleList>>(`/RoleList_Post`, params)
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/role/list`, params)
@@ -16,17 +16,17 @@ export const getRoleList = (params: Role.ReqRoleParams) => {
// 新增角色
export const addRole = (params: Role.RoleBO) => {
return http.post(`/role/add`, params)
return http.post(`/sysRole/add`, params)
}
// 编辑角色
export const editRole = (params: Role.RoleBO) => {
return http.post(`/role/edit`, params)
return http.put(`/sysRole/edit`, params)
}
// 删除角色
export const deleteRole = (params: { id: string[] }) => {
return http.post(`/role/del`, params)
return http.post(`/sysRole/del`, params)
}
@@ -35,60 +35,3 @@ export const editRoleAndPermission = (params: Role.ReqRoleAndPermission) => {
return http.post(`/role/edit_RoleAndPermission`, params)
}
// // 获取树形用户列表
// export const getRoleTreeList = (params: Role.ReqRoleParams) => {
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/role/tree/list`, params)
// }
// export const addRole = (params: { id: string ; rolename: string;status: number; describe:string; }) => {
// return http.post(`/RoleList_Add`, params)
// }
// 批量添加角色
// export const BatchAddRole = (params: FormData) => {
// return http.post(`${rePrefix}/role/import`, params)
// }
// // 切换角色状态
// export const changeRoleStatus = (params: { id: string; status: number }) => {
// return http.post(`${rePrefix}/role/change`, params)
// }
// 重置用户密码
// export const resetUserPassWord = (params: { id: string }) => {
// return http.post(`${rePrefix}/role/rest_password`, params)
// }
// 导出角色数据
// export const exportRoleInfo = (params: Role.ReqRoleParams) => {
// return http.download(`${rePrefix}/role/export`, params)
// }
// 获取角色状态字典
// export const getRoleStatus = () => {
// return http.get<Role.ResStatus[]>(`${rePrefix}/role/status`)
// }
// 获取用户性别字典
// export const getUserGender = () => {
// return http.get<User.ResGender[]>(`${rePrefix}/user/gender`)
// }
// 获取角色权限列表
// export const getRoleDepartment = () => {
// return http.get<Role.ResPermissionList[]>(`${rePrefix}/role/permission`)
// }
// 获取用户角色字典
// export const getUserRole = () => {
// return http.get<User.ResRole[]>(`${rePrefix}/user/role`)
// }