Vben
authored
|
1
2
3
|
import {
AccountParams,
DeptListItem,
|
Vben
authored
|
4
5
|
MenuParams,
RoleParams,
|
Vben
authored
|
6
|
RolePageParams,
|
Vben
authored
|
7
|
MenuListGetResultModel,
|
Vben
authored
|
8
9
|
DeptListGetResultModel,
AccountListGetResultModel,
|
Vben
authored
|
10
|
RolePageListGetResultModel,
|
Vben
authored
|
11
|
RoleListGetResultModel,
|
Vben
authored
|
12
|
} from './model/systemModel';
|
Vben
authored
|
13
14
15
16
|
import { defHttp } from '/@/utils/http/axios';
enum Api {
AccountList = '/system/getAccountList',
|
|
17
|
IsAccountExist = '/system/accountExist',
|
Vben
authored
|
18
|
DeptList = '/system/getDeptList',
|
|
19
|
setRoleStatus = '/system/setRoleStatus',
|
Vben
authored
|
20
|
MenuList = '/system/getMenuList',
|
Vben
authored
|
21
22
|
RolePageList = '/system/getRoleListByPage',
GetAllRoleList = '/system/getAllRoleList',
|
Vben
authored
|
23
24
|
}
|
Vben
authored
|
25
26
27
28
29
|
export const getAccountList = (params: AccountParams) =>
defHttp.get<AccountListGetResultModel>({ url: Api.AccountList, params });
export const getDeptList = (params?: DeptListItem) =>
defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params });
|
Vben
authored
|
30
31
32
33
|
export const getMenuList = (params?: MenuParams) =>
defHttp.get<MenuListGetResultModel>({ url: Api.MenuList, params });
|
Vben
authored
|
34
35
36
37
38
|
export const getRoleListByPage = (params?: RolePageParams) =>
defHttp.get<RolePageListGetResultModel>({ url: Api.RolePageList, params });
export const getAllRoleList = (params?: RoleParams) =>
defHttp.get<RoleListGetResultModel>({ url: Api.GetAllRoleList, params });
|
|
39
40
41
|
export const setRoleStatus = (id: number, status: string) =>
defHttp.post({ url: Api.setRoleStatus, params: { id, status } });
|
|
42
43
44
|
export const isAccountExist = (account: string) =>
defHttp.post({ url: Api.IsAccountExist, params: { account } }, { errorMessageMode: 'none' });
|