用户管理
This commit is contained in:
89
src/pages/System/User/service.ts
Normal file
89
src/pages/System/User/service.ts
Normal file
@ -0,0 +1,89 @@
|
||||
import { request } from 'umi';
|
||||
|
||||
// 分页查询角色
|
||||
export async function getPage(params: any) {
|
||||
return request('/api/sys-manager-ebtp-project/v1/sysuser/getPage', {
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
export async function getDataById(id: any) {
|
||||
return request(`/api/sys-manager-ebtp-project/v1/sysuser/${id}`, {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
export async function deleteRole(id: any) {
|
||||
return request(`/api/sys-manager-ebtp-project/v1/sysuser/del/${id}`, {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
export async function addRole(params: any) {
|
||||
return request('/api/sys-manager-ebtp-project/v1/sysuser/insert', {
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
export async function updateRole(params: any) {
|
||||
return request('/api/sys-manager-ebtp-project/v1/sysuser/update', {
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
//分配人员查询数据
|
||||
export async function allocationIF(userId: any) {
|
||||
return request(`/api/sys-manager-ebtp-project/v1/sysrole/role/assign/${userId}`, {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export async function assignsRoles(params: any) {
|
||||
return request('/api/sys-manager-ebtp-project/v1/sysuserrole/assignsRoles', {
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
// import { TreeDataNode } from 'antd';
|
||||
|
||||
// export function userList(options?: { [key: string]: any }): Promise<{ data: any }> {
|
||||
// return request('/api/system/userList', {
|
||||
// method: 'GET',
|
||||
// ...(options || {}),
|
||||
// });
|
||||
// }
|
||||
|
||||
// export function treeData(options?: { [key: string]: any }): Promise<{ data: TreeDataNode[] }> {
|
||||
// return request('/api/system/treeData', {
|
||||
// method: 'GET',
|
||||
// ...(options || {}),
|
||||
// });
|
||||
// }
|
||||
|
||||
// export function fetchUserList(options?: any) {
|
||||
// return request('/api/sysuser/getPage', {
|
||||
// method: 'POST',
|
||||
// data: options,
|
||||
// });
|
||||
// }
|
||||
// //获取用户数据
|
||||
// export function getUser(userId?: any) {
|
||||
// return request(`/api/sysuser/${userId}`, {
|
||||
// method: 'get',
|
||||
// });
|
||||
// }
|
||||
|
||||
// export function assignsRoles(options?: { [key: string]: any }): Promise<any> {
|
||||
// return request('/api/sysuser/assignsRoles', {
|
||||
// method: 'post',
|
||||
// ...(options || {}),
|
||||
// });
|
||||
// }
|
||||
|
||||
// //查询用户详情
|
||||
// export function getOneUserAll(options?: { [key: string]: any }): Promise<{ data: TreeDataNode[] }> {
|
||||
// return request(`/api/sysuser/getOneUserAll/${options?.id}`, {
|
||||
// method: 'GET',
|
||||
// params: options,
|
||||
// ...(options || {}),
|
||||
// });
|
||||
// }
|
Reference in New Issue
Block a user