系统总览
首页统计数据。
系统总览统计
接口地址
text
GET /admin/dashboard/overview接口参数说明
无请求参数。
响应示例
json
{
"code": 0,
"msg": "success",
"data": {
"user_count": 0,
"role_count": 0,
"menu_count": 0,
"dept_count": 0,
"online_count": 0,
"login_trend": [
{
"name": "09-23",
"value": 0
}
],
"recent_login": [
{
"id": 0,
"login_id": "",
"user_id": 0,
"username": "",
"client": "",
"login_ip": "",
"user_agent": "",
"login_at": "2026-09-25T10:00:00+08:00",
"logout_at": "2026-09-25T10:00:00+08:00",
"status": 1
}
],
"dept_users": [
{
"dept_id": 0,
"name": "",
"total": 0
}
]
}
}响应参数说明
| 响应字段 | 类型 | 说明 |
|---|---|---|
user_count | integer | 用户数量 |
role_count | integer | 角色数量 |
menu_count | integer | 菜单数量 |
dept_count | integer | 部门数量 |
online_count | integer | 在线用户数量 |
login_trend | array<TrendItem> | 登录趋势 |
login_trend[].name | string | 统计日期 |
login_trend[].value | integer | 统计数量 |
recent_login | array<LoginRecordItem> | 最近登录记录 |
recent_login[].id | integer | 主键ID |
recent_login[].login_id | string | 登录标识(UUID) |
recent_login[].user_id | integer | 用户ID |
recent_login[].username | string | 登录账号 |
recent_login[].client | string | 客户端类型 admin/api |
recent_login[].login_ip | string | 登录IP |
recent_login[].user_agent | string | 用户代理 |
recent_login[].login_at | string | 登录时间 |
recent_login[].logout_at | string | 退出时间 |
recent_login[].status | integer | 登录状态 1在线 2已退出 3被踢下线/禁用 |
dept_users | array<DeptUserItem> | 部门用户分布 |
dept_users[].dept_id | integer | 部门ID |
dept_users[].name | string | 部门名称 |
dept_users[].total | integer | 用户数量 |