1. 用户管理页:新增启用状态列与启用/禁用操作按钮(对接 user/enable|disable) 2. 机构账号/记录查询页:时间区间改用官方 shadcn Range Picker 模式 (Popover+Calendar mode=range 双月面板,新增 components/date-range-picker.tsx) 3. 上传配置页:文件类型限制改为标签式输入(新增 suffix-tag-input.tsx, Badge标签+回车添加+常用后缀快捷点选),替换自由文本框 4. 修复:.env 的 VITE_APP_TITLE 加引号,规避 Bun 1.3.10 env 解析 对行尾多字节中文的截断(标题乱码"森睿智�") 5. 新增共享 hook hooks/use-user-status-actions.ts(从 org-account 迁出) 6. vite 代理保留 本地Docker(localhost:8080)/公司 两种目标,切换注释即可
69 lines
1.8 KiB
TypeScript
69 lines
1.8 KiB
TypeScript
import { http, HTTP_CONTENT_TYPE } from "@/lib/http";
|
|
|
|
// 账号登录
|
|
export const login = (data = {}) => {
|
|
return http.post("/login", data, {
|
|
headers: {
|
|
"content-type": HTTP_CONTENT_TYPE.APPLICATION_FORM_URLENCODED,
|
|
},
|
|
});
|
|
};
|
|
|
|
// 登出
|
|
export const logout = () => {
|
|
return http.post("/logout");
|
|
};
|
|
|
|
// 获取用户信息
|
|
export const getUser = () => {
|
|
return http.get("/user/info");
|
|
};
|
|
|
|
export const createUser = (data: any) => {
|
|
return http.post("/user/create_org_user", data);
|
|
};
|
|
|
|
export const getUserOrg = () => {
|
|
return http.get("/uc/org/find");
|
|
};
|
|
|
|
export const cancelUser = (userId: number) => {
|
|
return http.post("/user/cancel", { userId });
|
|
};
|
|
|
|
export const modifyUserInfo = (data: any) => {
|
|
return http.post("/user/modify_org_user_info", data);
|
|
};
|
|
|
|
export const resetUserPwd = (data: any) => {
|
|
return http.post("/user/reset_org_user_pwd", data);
|
|
};
|
|
|
|
export const initUserPassword = (data: any) => {
|
|
return http.post("/unac/user/init_user_password", data);
|
|
};
|
|
|
|
export const modifyPassword = (data: any) => {
|
|
return http.post("/unac/user/modify_password", data);
|
|
};
|
|
|
|
// 启用用户(平台管理员,幂等)
|
|
export const enableUser = (userId: number) => {
|
|
return http.post("/user/enable", { userId });
|
|
};
|
|
|
|
// 禁用用户(平台管理员,幂等)
|
|
export const disableUser = (userId: number) => {
|
|
return http.post("/user/disable", { userId });
|
|
};
|
|
|
|
// 管理员直接注销用户(平台管理员,不走注销审批流程,幂等)
|
|
export const adminCancelUser = (userId: number) => {
|
|
return http.post("/user/admin_cancel", { userId });
|
|
};
|
|
|
|
// 分页查询机构账号(平台管理员,一行 = 一个机构下的一个账号)
|
|
export const getOrgAccountPage = (params: any) => {
|
|
return http.get("/user/page/org_account", { params });
|
|
};
|