protable组件抽取,并绘制demo界面

This commit is contained in:
2024-10-15 15:37:50 +08:00
parent 9957857be0
commit 7c8d5644f7
18 changed files with 628 additions and 156 deletions

View File

@@ -1,15 +1,34 @@
// 请求响应参数不包含data
/**
* 该接口声明文件用来声明通用的接口定义,比如 请求参数Base、响应Base、分页等
*/
/**
* 请求响应参数不包含data
*/
export interface Result {
code: string;
message: string;
}
// 请求响应参数包含data
/**
* 请求响应参数包含data
*/
export interface ResultData<T = any> extends Result {
data: T;
}
// 分页响应参数
/**
* 分页请求参数
*/
export interface ReqPage {
pageNum: number;
pageSize: number;
}
/**
* 分页响应参数
*/
export interface ResPage<T> {
list: T[];
pageNum: number;
@@ -17,74 +36,18 @@ export interface ResPage<T> {
total: number;
}
// 分页请求参数
export interface ReqPage {
pageNum: number;
pageSize: number;
/**
* Dict 字典属性
* id: 唯一标识
* label: 名称
* code: 类型下唯一标识
*/
export interface Dict {
id: string;
label: string;
code: string;
children?: Dict[];
}
// 文件上传模块
export namespace Upload {
export interface ResFileUrl {
fileUrl: string;
}
}
// 登录模块
export namespace Login {
export interface ReqLoginForm {
username: string;
password: string;
}
export interface ResLogin {
accessToken: string;
}
export interface ResAuthButtons {
[key: string]: string[];
}
}
// 用户管理模块
export namespace User {
export interface ReqUserParams extends ReqPage {
username: string;
gender: number;
idCard: string;
email: string;
address: string;
createTime: string[];
status: number;
}
export interface ResUserList {
id: string;
username: string;
gender: number;
user: { detail: { age: number } };
idCard: string;
email: string;
address: string;
createTime: string;
status: number;
avatar: string;
photo: any[];
children?: ResUserList[];
}
export interface ResStatus {
userLabel: string;
userValue: number;
}
export interface ResGender {
genderLabel: string;
genderValue: number;
}
export interface ResDepartment {
id: string;
name: string;
children?: ResDepartment[];
}
export interface ResRole {
id: string;
name: string;
children?: ResDepartment[];
}
}