From 5053f8972ab308046832077010f92cd98b9ada93 Mon Sep 17 00:00:00 2001 From: Rogee Date: Tue, 22 Sep 2026 17:46:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E8=8F=9C=E5=8D=95=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=E9=A1=B5=EF=BC=88/dashboard=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E6=A0=87=20pro=20workplace=EF=BC=8C=E7=BB=9F=E8=AE=A1=E5=90=8E?= =?UTF-8?q?=E6=9C=9F=E8=A7=84=E5=88=92=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/dashboard/index.tsx | 33 +++++++++++++++++++++++++++++++ web/src/utils/metadata.tsx | 5 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 web/src/pages/dashboard/index.tsx 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: [