用户管理
This commit is contained in:
@@ -23,7 +23,7 @@ export namespace User {
|
||||
*/
|
||||
export interface ReqUserParams extends ReqPage{
|
||||
id: string; // 装置序号用户ID 必填
|
||||
name: string; //用户名(别名)
|
||||
name?: string; //用户名(别名)
|
||||
loginTime?: string;//最后一次登录时间
|
||||
}
|
||||
|
||||
@@ -44,8 +44,19 @@ export namespace User {
|
||||
createTime?: string;//创建时间
|
||||
updateBy?: string;//更新用户
|
||||
updateTime?: string;//更新时间
|
||||
roleIds?: string[]; //
|
||||
roleNames?:string[]; //
|
||||
}
|
||||
|
||||
// 用户接口
|
||||
export interface ResPassWordUser {
|
||||
id: string; //用户ID,作为唯一标识
|
||||
oldPassword: string; //密码
|
||||
newPassword: string; //新密码
|
||||
surePassword:string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户表格查询分页返回的对象;
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Role } from './../role/interface/index';
|
||||
import type { ResPage } from '@/api/interface'
|
||||
import type { User } from './interface'
|
||||
import type { User} from './interface'
|
||||
import { ADMIN as rePrefix } from '@/api/config/serviceName'
|
||||
import http from '@/api'
|
||||
|
||||
@@ -8,50 +9,33 @@ import http from '@/api'
|
||||
*/
|
||||
// 获取用户列表
|
||||
export const getUserList = (params: User.ReqUserParams) => {
|
||||
return http.post(`/user/list`, params)
|
||||
return http.post(`/sysUser/list`, params)
|
||||
}
|
||||
|
||||
// 获取树形用户列表
|
||||
// export const getUserTreeList = (params: User.ReqUserParams) => {
|
||||
// return http.post<ResPage<User.ResUserList>>(`${rePrefix}/user/tree/list`, params)
|
||||
// }
|
||||
|
||||
// 新增用户
|
||||
export const addUser = (params: User.ResUser) => {
|
||||
return http.post(`/user/add`, params)
|
||||
}
|
||||
|
||||
// 批量添加用户
|
||||
export const BatchAddUser = (params: User.ReqUserParams) => {
|
||||
return http.post(`$/user/import`, params)
|
||||
return http.post(`/sysUser/add`, params)
|
||||
}
|
||||
|
||||
// 编辑用户
|
||||
export const updateUser = (params: User.ResUser) => {
|
||||
return http.post(`/user/update`, params)
|
||||
return http.put(`/sysUser/update`, params)
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export const deleteUser = (params: string[] ) => {
|
||||
return http.post(`/user/delete`, params)
|
||||
return http.post(`/sysUser/delete`, params)
|
||||
}
|
||||
|
||||
// 切换用户状态
|
||||
// export const changeUserStatus = (params: { id: string; status: number }) => {
|
||||
// return http.post(`${rePrefix}/user/change`, params)
|
||||
// }
|
||||
|
||||
// 重置用户密码
|
||||
// export const resetUserPassWord = (params: { id: string }) => {
|
||||
// return http.post(`${rePrefix}/user/rest_password`, params)
|
||||
// }
|
||||
|
||||
// 导出用户数据
|
||||
export const exportUserInfo = (params: User.ReqUserParams) => {
|
||||
return http.download(`${rePrefix}/user/export`, params)
|
||||
// 获取角色列表
|
||||
export const getRoleList = () => {
|
||||
return http.get<Role.RoleBO>(`/sysRole/simpleList`)
|
||||
}
|
||||
|
||||
//修改密码
|
||||
export const updatePassWord = (params: User.ResPassWordUser) => {
|
||||
return http.put(`/sysUser/updatePassword`,params)
|
||||
}
|
||||
|
||||
// 获取用户状态字典
|
||||
// export const getUserStatus = () => {
|
||||
// return http.get<User.ResStatus[]>(`${rePrefix}/user/status`)
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user