diff --git a/web/src/pages/dashboard/index.tsx b/web/src/pages/dashboard/index.tsx new file mode 100644 index 0000000..5830b5b --- /dev/null +++ b/web/src/pages/dashboard/index.tsx @@ -0,0 +1,33 @@ +// 工作台:对标 pro 官方 workplace 预览的占位页。 +// 统计卡片与快捷入口暂不接真实数据(后期规划),仅布局占位;不引入兜底数据。 +import { PageContainer } from '@ant-design/pro-components'; +import { Card, Col, Empty, Row, Typography } from 'antd'; + +export default function Page() { + return ( + + + + + + + + + + + + + + + + 统计指标规划中} + > + + + + ); +} diff --git a/web/src/utils/metadata.tsx b/web/src/utils/metadata.tsx index 59cb681..0e75f31 100644 --- a/web/src/utils/metadata.tsx +++ b/web/src/utils/metadata.tsx @@ -10,10 +10,12 @@ import { LaptopOutlined, ClusterOutlined, GatewayOutlined, + DashboardOutlined, } from '@ant-design/icons'; // 页头标题/副标题规则:语义对齐 web.archived/src/app/Layout.jsx 的 pageMetadataRules。 const rules: Array<{ test: (path: string) => boolean; title: string; subtitle: string }> = [ + { test: (p) => p === '/' || p === '/dashboard', title: '工作台', subtitle: '运营概况与快捷入口。' }, { test: (p) => p === '/accounts/import', title: '账号导入', subtitle: '管理分享链接解析任务,解析成功后自动加入监控账号。' }, { test: (p) => p === '/accounts', title: '我的账号', subtitle: '创建和管理自己维护的账号。' }, { test: (p) => p === '/accounts/monitoring', title: '监控账号', subtitle: '管理需要持续跟踪的竞品账号及采集状态。' }, @@ -37,9 +39,10 @@ const rules: Array<{ test: (path: string) => boolean; title: string; subtitle: s { test: (p) => p.startsWith('/gateways/'), title: '网关详情', subtitle: '查看网关连接信息和运行状态。' }, ]; -// 菜单结构:与 web.archived/src/app/Layout.jsx 完全一致(运营 / 资源 两组); +// 菜单结构:工作台置顶(对标 pro 官方 workplace 预览),其余与 web.archived/src/app/Layout.jsx 一致(运营 / 资源 两组); // icon 选用 antd 图标库里语义常见、用户一眼可识别的隐喻。 export const menu: MenuDataItem[] = [ + { path: '/dashboard', name: '工作台', icon: }, { name: '运营', children: [