- pages/admin/AdminAuditLogPage.tsx:审计日志查询页。支持操作人/模块/动作/ 结果状态/日期区间筛选,表格按时间倒序,行内「详情」抽屉展示完整 URL、 UA、request_id、错误信息与变更详情。 中文标签(模块/动作)由服务端下发,前端不维护枚举映射 —— 与 constants/task.ts 里状态映射的既有做法一致,避免两端各写一份开始漂移。 - services/auditApi.ts:审计接口客户端与类型定义。 - 路由 /admin/audit + 侧边栏「操作审计」入口。 - AdminProductsPage 里手写的角色判断改为复用 isAdminRole():这是同一份 「管理员角色」规则的第 4 处副本,本次一并对齐(另一处 TaskFlowView 已在用)。 constants/task.ts 的注释同步指向后端新位置 core/roles.py。 验证:tsc --noEmit 通过;vite build 通过(产出独立 chunk AdminAuditLogPage-*.js);对接真实后端校验响应字段与 TS 接口定义逐字段一致。
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
See the Oxlint rules documentation for the full list of rules and categories.