diff --git a/web/src/pages/admin/Dashboard.tsx b/web/src/pages/admin/Dashboard.tsx index a2e3a9b..438b467 100644 --- a/web/src/pages/admin/Dashboard.tsx +++ b/web/src/pages/admin/Dashboard.tsx @@ -1,6 +1,105 @@ -const AdminDashboard = () => ( -
-
运营概览
开发中...
-
-) +import { Card, Table, Tag } from 'antd' +import { ArrowUpOutlined, TeamOutlined, UserOutlined, DollarOutlined, SafetyCertificateOutlined } from '@ant-design/icons' +import { Line, Pie } from '@ant-design/charts' + +const kpiData = [ + { label: '租户总数', value: '156', change: 8.3, icon: , color: '#2563eb' }, + { label: '活跃租户', value: '138', change: 5.1, icon: , color: '#16a34a' }, + { label: '平台月收入', value: '¥89,400', change: 12.7, icon: , color: '#d97706' }, + { label: '系统可用率', value: '99.95%', change: 0.02, icon: , color: '#0891b2' }, +] + +const trendData = [ + { date: '07-01', count: 142 }, { date: '07-03', count: 145 }, { date: '07-05', count: 148 }, + { date: '07-07', count: 150 }, { date: '07-09', count: 152 }, { date: '07-11', count: 154 }, + { date: '07-13', count: 156 }, +] + +const planDistribution = [ + { type: '基础版', value: 68 }, { type: '专业版', value: 52 }, { type: '企业版', value: 36 }, +] + +const operations = [ + { time: '2026-07-14 10:30', action: '开通新租户', target: '赵六科技', operator: '管理员A' }, + { time: '2026-07-14 09:15', action: '租户续费', target: '李四商贸', operator: '管理员B' }, + { time: '2026-07-13 16:20', action: '套餐升级', target: '王五集团', operator: '管理员A' }, + { time: '2026-07-13 14:00', action: '租户暂停', target: '孙八信息', operator: '管理员B' }, + { time: '2026-07-13 10:45', action: '开通新租户', target: '周九科技', operator: '管理员A' }, +] + +const actionColors: Record = { + '开通新租户': 'green', + '租户续费': 'blue', + '套餐升级': 'orange', + '租户暂停': 'red', +} + +const AdminDashboard = () => { + return ( +
+

运营概览

+ + {/* KPI */} +
+ {kpiData.map((k, i) => ( + +
+ {k.label} + {k.icon} +
+
{k.value}
+
+ {k.change}% 较上月 +
+
+ ))} +
+ + {/* 图表 */} +
+ + + + + + +
+ + {/* 最近操作 */} + + {t} }, + { title: '操作', dataIndex: 'action', key: 'action', render: (a: string) => {a} }, + { title: '目标', dataIndex: 'target', key: 'target' }, + { title: '操作人', dataIndex: 'operator', key: 'operator', render: (o: string) => {o} }, + ]} + /> + + + ) +} + export default AdminDashboard