feat(web): AI 管理端 3 页面 — Prompt/分析历史/用量统计
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- API 封装: prompts.ts / analysis.ts / usage.ts
- AiPromptList: CRUD + 激活/回滚 + AuthButton 权限
- AiAnalysisList: 历史列表 + 行展开查看结果
- AiUsageDashboard: 总次数/类型分布统计卡片
- 菜单注册 + 路由配置 (MainLayout + App.tsx)
This commit is contained in:
iven
2026-04-25 23:44:15 +08:00
parent 69313a177e
commit 5621dbe273
8 changed files with 722 additions and 0 deletions

View File

@@ -28,6 +28,9 @@ import {
ShopOutlined,
FileTextOutlined,
DashboardOutlined,
RobotOutlined,
HistoryOutlined,
BarChartOutlined,
} from '@ant-design/icons';
import { useNavigate, useLocation } from 'react-router-dom';
import { useAppStore } from '../stores/app';
@@ -69,6 +72,9 @@ const healthMenuItems: MenuItem[] = [
{ key: '/health/points-products', icon: <ShopOutlined />, label: '商品管理' },
{ key: '/health/points-orders', icon: <FileTextOutlined />, label: '订单管理' },
{ key: '/health/offline-events', icon: <CalendarOutlined />, label: '线下活动' },
{ key: '/health/ai-prompts', icon: <RobotOutlined />, label: 'AI Prompt 管理' },
{ key: '/health/ai-analysis', icon: <HistoryOutlined />, label: 'AI 分析历史' },
{ key: '/health/ai-usage', icon: <BarChartOutlined />, label: 'AI 用量统计' },
];
const sysMenuItems: MenuItem[] = [