feat(web): Phase 5 - 业务页面迁移完成
完成所有业务页面从 Vue 3 到 React 19 的迁移: 页面迁移: - Login: 表单验证 + 认证集成 - Dashboard: 统计卡片 + G2 图表占位 - UserManagement: 表格 + 分页 + CRUD + 权限控制 - RoleManagement: 表格 + 弹窗 + TreeSelect 权限分配 - MenuManagement: 树形表格 + 层级菜单管理 - ConfigManagement: 参数配置 CRUD - DictManagement: 字典类型/数据双面板管理 - FileManagement: 文件上传 + 图片预览 - NoticeManagement: 通知公告 CRUD - LoginLog/OpLog/ExLog: 审计日志只读查询 - 403: 权限拒绝页面 API 层补充: - loginLog.ts: 新增 LoginLog/OpLog/ExLog 接口与 API - status.ts: 新增 userStatusMap/roleStatusMap/menuStatusMap/noticeStatusMap 路由修正: - routes.ts: 日志页面路径对齐实际目录结构 验证:tsc --noEmit 零错误,dev server 正常启动
This commit is contained in:
@@ -2,6 +2,62 @@ import request from '@/utils/request'
|
||||
import type { PageResponse } from './user.api'
|
||||
import { NoticeStatus } from '@/constants/status'
|
||||
|
||||
export interface LoginLog {
|
||||
id: number
|
||||
username: string
|
||||
ip: string
|
||||
location: string
|
||||
browser: string
|
||||
os: string
|
||||
status: number
|
||||
message: string
|
||||
loginTime: string
|
||||
}
|
||||
|
||||
export interface LoginLogPageRequest {
|
||||
page: number
|
||||
size: number
|
||||
keyword?: string
|
||||
username?: string
|
||||
ip?: string
|
||||
}
|
||||
|
||||
export interface OpLog {
|
||||
id: number
|
||||
operator: string
|
||||
description: string
|
||||
method: string
|
||||
url: string
|
||||
params: string
|
||||
ip: string
|
||||
status: number
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface OpLogPageRequest {
|
||||
page: number
|
||||
size: number
|
||||
keyword?: string
|
||||
operator?: string
|
||||
}
|
||||
|
||||
export interface ExLog {
|
||||
id: number
|
||||
url: string
|
||||
method: string
|
||||
message: string
|
||||
stackTrace: string
|
||||
ip: string
|
||||
operator: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface ExLogPageRequest {
|
||||
page: number
|
||||
size: number
|
||||
keyword?: string
|
||||
}
|
||||
|
||||
export interface Notice {
|
||||
id: number
|
||||
title: string
|
||||
@@ -35,6 +91,17 @@ export interface NoticePageRequest {
|
||||
status?: string
|
||||
}
|
||||
|
||||
export const loginLogApi = {
|
||||
getLoginLogs: (params: LoginLogPageRequest) =>
|
||||
request.get<PageResponse<LoginLog>>('/logs/login/page', { params }),
|
||||
|
||||
getOpLogs: (params: OpLogPageRequest) =>
|
||||
request.get<PageResponse<OpLog>>('/logs/operation/page', { params }),
|
||||
|
||||
getExLogs: (params: ExLogPageRequest) =>
|
||||
request.get<PageResponse<ExLog>>('/logs/exception/page', { params }),
|
||||
}
|
||||
|
||||
export const noticeApi = {
|
||||
getPage: (params: NoticePageRequest) =>
|
||||
request.get<PageResponse<Notice>>('/notice/page', { params }),
|
||||
|
||||
Reference in New Issue
Block a user