Skip to content

系统总览 ​

首页统计数据。

系统总览统计 ​

接口地址 ​

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_countinteger用户数量
role_countinteger角色数量
menu_countinteger菜单数量
dept_countinteger部门数量
online_countinteger在线用户数量
login_trendarray<TrendItem>登录趋势
login_trend[].namestring统计日期
login_trend[].valueinteger统计数量
recent_loginarray<LoginRecordItem>最近登录记录
recent_login[].idinteger主键ID
recent_login[].login_idstring登录标识(UUID)
recent_login[].user_idinteger用户ID
recent_login[].usernamestring登录账号
recent_login[].clientstring客户端类型 admin/api
recent_login[].login_ipstring登录IP
recent_login[].user_agentstring用户代理
recent_login[].login_atstring登录时间
recent_login[].logout_atstring退出时间
recent_login[].statusinteger登录状态 1在线 2已退出 3被踢下线/禁用
dept_usersarray<DeptUserItem>部门用户分布
dept_users[].dept_idinteger部门ID
dept_users[].namestring部门名称
dept_users[].totalinteger用户数量