|
@@ -4,6 +4,7 @@ import {
|
|
|
MenuParams,
|
|
|
RoleParams,
|
|
|
RolePageParams,
|
|
|
+ CheckUserParams,
|
|
|
MenuListGetResultModel,
|
|
|
DeptListGetResultModel,
|
|
|
AccountListGetResultModel,
|
|
@@ -31,8 +32,9 @@ enum Api {
|
|
|
GetAllRoleList = '/basic-api/system/getAllRoleList',
|
|
|
roleSelectList = '/zfb-api/zfb/shop/sys/role/select',
|
|
|
|
|
|
- DeptList = '/zfb-api/zfb/shop/sys/company/list',
|
|
|
- // DeptTree = 'sys/dept/list',
|
|
|
+ DeptList = '/zfb-api/zfb/shop/sys/dept/list',
|
|
|
+
|
|
|
+ checkUser = '/zfb-api/zfb/user/checkUserExists',
|
|
|
}
|
|
|
|
|
|
export const getAccountList = (params: AccountParams) =>
|
|
@@ -46,6 +48,7 @@ export const getMenuList = (params?: MenuParams) =>
|
|
|
url: Api.MenuList,
|
|
|
params: params,
|
|
|
});
|
|
|
+//menu
|
|
|
export const saveMenuApi = (params?: MenuParams) =>
|
|
|
defHttp.post<MenuListGetResultModel>({ url: Api.saveMenu, params });
|
|
|
|
|
@@ -55,12 +58,16 @@ export const updateMenuApi = (params?: MenuParams) =>
|
|
|
export const deleteMenuApi = (params?: (string | number)[]) =>
|
|
|
defHttp.post<MenuListGetResultModel>({ url: Api.deleteMenu, params });
|
|
|
|
|
|
+//roles
|
|
|
export const getRoleListByPage = (params?: RolePageParams) =>
|
|
|
defHttp.post<RolePageListGetResultModel>({ url: Api.RolePageList, params });
|
|
|
|
|
|
export const getAllRoleList = (params?: RoleParams) =>
|
|
|
defHttp.post<RoleListGetResultModel>({ url: Api.GetAllRoleList, params });
|
|
|
|
|
|
+export const roleSelectListApi = (params?: RoleParams) =>
|
|
|
+ defHttp.post<RoleListGetResultModel>({ url: Api.roleSelectList, params });
|
|
|
+
|
|
|
export const setRoleStatus = (id: number, status: string) =>
|
|
|
defHttp.post({ url: Api.setRoleStatus, params: { id, status } });
|
|
|
|
|
@@ -69,3 +76,6 @@ export const isAccountExist = (account: string) =>
|
|
|
|
|
|
export const deptListApi = (params?: RolePageParams) =>
|
|
|
defHttp.post<RolePageListGetResultModel>({ url: Api.DeptList, params });
|
|
|
+
|
|
|
+export const checkUserApi = (params?: CheckUserParams) =>
|
|
|
+ defHttp.post<RolePageListGetResultModel>({ url: Api.checkUser, params });
|