feat: add dept management page

This commit is contained in:
Vben
2021-03-01 22:54:21 +08:00
parent 37669d067c
commit 3b8ca420c7
26 changed files with 662 additions and 168 deletions

View File

@@ -1,21 +1,37 @@
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export type Params = BasicPageParams & {
export type AccountParams = BasicPageParams & {
account?: string;
nickname?: string;
};
export interface DemoListItem {
export type DeptParams = {
deptName?: string;
status?: string;
};
export interface AccountListItem {
id: string;
account: string;
email: string;
nickname: string;
role: number;
updateTime: string;
createTime: string;
remark: string;
status: number;
}
export interface DeptListItem {
id: string;
orderNo: string;
createTime: string;
remark: string;
status: number;
}
/**
* @description: Request list return value
*/
export type DemoListGetResultModel = BasicFetchResult<DemoListItem>;
export type AccountListGetResultModel = BasicFetchResult<AccountListItem>;
export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

View File

@@ -1,10 +1,19 @@
import { Params, DemoListGetResultModel } from './model/systemModel';
import {
AccountParams,
DeptListItem,
DeptListGetResultModel,
AccountListGetResultModel,
} from './model/systemModel';
import { defHttp } from '/@/utils/http/axios';
enum Api {
// The address does not exist
AccountList = '/system/getAccountList',
DeptList = '/system/getDeptList',
}
export const getAccountList = (params: Params) =>
defHttp.get<DemoListGetResultModel>({ url: Api.AccountList, params });
export const getAccountList = (params: AccountParams) =>
defHttp.get<AccountListGetResultModel>({ url: Api.AccountList, params });
export const getDeptList = (params?: DeptListItem) =>
defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params });