import { ResPage } from '@/api/interface' import { Role } from './interface' import { ADMIN as rePrefix } from '@/api/config/serviceName' import http from '@/api' /** * @name 角色管理模块 */ // 获取角色列表 export const getRoleList = (params: Role.ReqRoleParams) => { return http.post>(`/role/list`, params) // return http.post>(`/RoleList_Post`, params) // return http.post>(`${rePrefix}/role/list`, params) } // 新增角色 export const addRole = (params: Role.RoleBO) => { return http.post(`/role/add`, params) } // 编辑角色 export const editRole = (params: Role.RoleBO) => { return http.post(`/role/edit`, params) } // 删除角色 export const deleteRole = (params: { id: string[] }) => { return http.post(`/role/del`, params) } // 编辑角色资源 export const editRoleAndPermission = (params: Role.ReqRoleAndPermission) => { return http.post(`/role/edit_RoleAndPermission`, params) } // // 获取树形用户列表 // export const getRoleTreeList = (params: Role.ReqRoleParams) => { // return http.post>(`${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(`${rePrefix}/role/status`) // } // 获取用户性别字典 // export const getUserGender = () => { // return http.get(`${rePrefix}/user/gender`) // } // 获取角色权限列表 // export const getRoleDepartment = () => { // return http.get(`${rePrefix}/role/permission`) // } // 获取用户角色字典 // export const getUserRole = () => { // return http.get(`${rePrefix}/user/role`) // }