|
@@ -1,4 +1,4 @@
|
|
|
-import { RoleType } from '@/constants/enumerate';
|
|
|
+import { RoleType, BatchAddRole, UserSource } from '@/constants/enumerate';
|
|
|
|
|
|
export interface LoginData {
|
|
|
account: string;
|
|
@@ -15,25 +15,33 @@ export interface UserItem {
|
|
|
// 工号 (可选)
|
|
|
empno: string;
|
|
|
// 来源 (例如:内部用户)
|
|
|
- source: string;
|
|
|
+ source: UserSource;
|
|
|
// 角色 (例如:学校管理员, 扫描员)
|
|
|
role: RoleType;
|
|
|
// 状态 (启用/禁用)
|
|
|
enable: boolean;
|
|
|
// 关联账号
|
|
|
relatedAccount: string;
|
|
|
+ // 学校
|
|
|
schoolId: number;
|
|
|
+ // 最后登录IP
|
|
|
lastLoginIp: string;
|
|
|
+ // 描述
|
|
|
description: string;
|
|
|
}
|
|
|
export type UserListPageRes = PageResult<UserItem>;
|
|
|
|
|
|
export interface UserListFilter {
|
|
|
- name?: string; // 按名称搜索
|
|
|
- loginName?: string; // 按登录名搜索
|
|
|
- enable: boolean; // 按状态筛选
|
|
|
- role?: RoleType; // 按角色筛选
|
|
|
- source?: string; // 按来源筛选
|
|
|
+ // 登录名
|
|
|
+ loginName?: string;
|
|
|
+ // 姓名
|
|
|
+ name?: string;
|
|
|
+ // 状态
|
|
|
+ enable?: boolean;
|
|
|
+ // 角色
|
|
|
+ role?: RoleType;
|
|
|
+ // 来源
|
|
|
+ source?: UserSource;
|
|
|
}
|
|
|
export type UserListPageParam = PageParams<UserListFilter>;
|
|
|
|
|
@@ -49,12 +57,13 @@ export interface UserUpdateParam {
|
|
|
enable: boolean;
|
|
|
// 角色 (例如:学校管理员, 扫描员)
|
|
|
role: RoleType;
|
|
|
+ // 密码
|
|
|
password: string;
|
|
|
}
|
|
|
|
|
|
export interface ResetPasswordParam {
|
|
|
ids: number[];
|
|
|
- password: string; // 如果不传,后端可能会生成随机密码
|
|
|
+ password: string;
|
|
|
}
|
|
|
export interface EnableUserParam {
|
|
|
ids: number[];
|
|
@@ -68,9 +77,8 @@ export interface UpdatePwdData {
|
|
|
}
|
|
|
|
|
|
export interface BatchCreateUserParam {
|
|
|
- examId: number;
|
|
|
// 角色
|
|
|
- role: RoleType;
|
|
|
+ role: BatchAddRole;
|
|
|
// 命名规则
|
|
|
prefix: string;
|
|
|
// 每分组账号数
|