mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-16 15:20:36 +08:00
feat: 新增在线用户页面
This commit is contained in:
35
src/api/system/monitor.ts
Normal file
35
src/api/system/monitor.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
export interface OnlineUserQuery {
|
||||
ipAddress: string;
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface OnlineUserInfo {
|
||||
browser?: string;
|
||||
deptName?: string;
|
||||
ipAddress?: string;
|
||||
loginLocation?: string;
|
||||
loginTime?: number;
|
||||
operationSystem?: string;
|
||||
tokenId?: string;
|
||||
username?: string;
|
||||
}
|
||||
|
||||
/** 获取操作日志列表 */
|
||||
export const getOnlineUserListApi = (params?: OnlineUserQuery) => {
|
||||
return http.request<ResponseData<PageDTO<OnlineUserInfo>>>(
|
||||
"get",
|
||||
"/monitor/onlineUsers",
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export const logoutOnlineUserApi = (tokenId: string) => {
|
||||
return http.request<ResponseData<void>>(
|
||||
"delete",
|
||||
`/monitor/onlineUser/${tokenId}`
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user