wip: system management sample page

This commit is contained in:
Vben
2021-03-03 22:52:25 +08:00
parent f79cae63d9
commit 9a1ba74920
31 changed files with 852 additions and 52 deletions

View File

@@ -4,12 +4,21 @@ export type AccountParams = BasicPageParams & {
account?: string;
nickname?: string;
};
export type RoleParams = BasicPageParams & {
roleName?: string;
status?: string;
};
export type DeptParams = {
deptName?: string;
status?: string;
};
export type MenuParams = {
menuName?: string;
status?: string;
};
export interface AccountListItem {
id: string;
account: string;
@@ -29,9 +38,32 @@ export interface DeptListItem {
status: number;
}
export interface MenuListItem {
id: string;
orderNo: string;
createTime: string;
status: number;
icon: string;
component: string;
permission: string;
}
export interface RoleListItem {
id: string;
roleName: string;
roleValue: string;
status: number;
orderNo: string;
createTime: string;
}
/**
* @description: Request list return value
*/
export type AccountListGetResultModel = BasicFetchResult<AccountListItem>;
export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;
export type MenuListGetResultModel = BasicFetchResult<MenuListItem>;
export type RoleListGetResultModel = BasicFetchResult<RoleListItem>;

View File

@@ -1,15 +1,20 @@
import {
AccountParams,
DeptListItem,
MenuParams,
RoleParams,
MenuListGetResultModel,
DeptListGetResultModel,
AccountListGetResultModel,
RoleListGetResultModel,
} from './model/systemModel';
import { defHttp } from '/@/utils/http/axios';
enum Api {
// The address does not exist
AccountList = '/system/getAccountList',
DeptList = '/system/getDeptList',
MenuList = '/system/getMenuList',
RoleList = '/system/getRoleList',
}
export const getAccountList = (params: AccountParams) =>
@@ -17,3 +22,9 @@ export const getAccountList = (params: AccountParams) =>
export const getDeptList = (params?: DeptListItem) =>
defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params });
export const getMenuList = (params?: MenuParams) =>
defHttp.get<MenuListGetResultModel>({ url: Api.MenuList, params });
export const getRoleList = (params?: RoleParams) =>
defHttp.get<RoleListGetResultModel>({ url: Api.RoleList, params });