mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-25 13:51:04 +00:00
feat: 添加用户密码重置功能并优化用户管理界面
refactor(用户管理): 重构用户表单和详情展示逻辑 fix(用户管理): 修复性别显示和角色岗位选择问题 docs: 更新README文档和图片引用路径 style: 清理无用图片资源并更新样式
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
const PositionAPI = {
|
||||
getPositionList(query: PositionPageQuery) {
|
||||
getPositionList(query?: PositionPageQuery) {
|
||||
return request<ApiResponse<PageResult<PositionTable[]>>>({
|
||||
url: `/system/position/list`,
|
||||
method: "get",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
const RoleAPI = {
|
||||
getRoleList(query: TablePageQuery) {
|
||||
getRoleList(query?: TablePageQuery) {
|
||||
return request<ApiResponse<PageResult<RoleTable[]>>>({
|
||||
url: `/system/role/list`,
|
||||
method: "get",
|
||||
|
||||
@@ -34,6 +34,14 @@ export const UserAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
resetUserPassword(body: ResetPasswordForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `/system/user/reset/password`,
|
||||
method: "put",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
registerUser(body: RegisterForm) {
|
||||
return request<ApiResponse>({
|
||||
url: `/system/user/register`,
|
||||
@@ -171,10 +179,10 @@ export interface UserInfo {
|
||||
dept_id?: deptTreeType["id"];
|
||||
dept_name?: deptTreeType["name"];
|
||||
roles?: roleSelectorType[];
|
||||
roleNames?: string;
|
||||
roleNames?: roleSelectorType["name"][];
|
||||
role_ids?: roleSelectorType["id"][];
|
||||
positions?: positionSelectorType[];
|
||||
positionNames?: string;
|
||||
positionNames?: positionSelectorType["name"][];
|
||||
position_ids?: positionSelectorType["id"][];
|
||||
is_superuser?: boolean;
|
||||
status?: boolean;
|
||||
@@ -226,8 +234,13 @@ export interface PasswordFormState {
|
||||
confirmPassword: string;
|
||||
}
|
||||
|
||||
export interface ResetPasswordForm {
|
||||
id: number;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface UserForm {
|
||||
id: undefined;
|
||||
id?: number;
|
||||
username?: string;
|
||||
name?: string;
|
||||
dept_id?: number;
|
||||
|
||||
Reference in New Issue
Block a user