feat: 添加MSW模拟服务和数据源集成

refactor: 重构页面组件移除冗余Layout组件

feat: 实现WebSocket和事件总线系统

feat: 添加队列和调度系统

docs: 更新架构文档和服务映射

style: 清理重复接口定义使用数据源

chore: 更新依赖项配置

feat: 添加运行时系统和领域引导

ci: 配置ESLint边界检查规则

build: 添加Redis和WebSocket依赖

test: 添加MSW浏览器环境入口

perf: 优化数据获取逻辑使用统一数据源

fix: 修复类型定义和状态管理问题
This commit is contained in:
2026-03-19 01:39:34 +08:00
parent cd55097dbf
commit 0dac26d781
176 changed files with 47075 additions and 8404 deletions

View File

@@ -1,143 +1,119 @@
import React from 'react';
import { Card, Layout, Menu, Typography, Row, Col, Statistic } from 'antd';
import {
DashboardOutlined,
ShoppingOutlined,
UserOutlined,
TruckOutlined,
AuditOutlined,
AlertOutlined,
import { Card, Typography, Row, Col, Statistic, Divider } from 'antd';
import {
ShoppingOutlined,
FileTextOutlined,
ShopOutlined,
DollarOutlined,
BarChartOutlined,
SettingOutlined,
TeamOutlined
RiseOutlined,
FallOutlined,
} from '@ant-design/icons';
import { Link } from 'umi';
const { Header, Content, Sider } = Layout;
const { Title, Text } = Typography;
const Dashboard: React.FC = () => {
const menuItems = [
{
key: 'dashboard',
icon: <DashboardOutlined />,
label: <Link to="/"></Link>
},
{
key: 'products',
icon: <ShoppingOutlined />,
label: <Link to="/Product"></Link>
},
{
key: 'orders',
icon: <FileTextOutlined />,
label: <Link to="/Orders"></Link>
},
{
key: 'merchants',
icon: <UserOutlined />,
label: <Link to="/Merchant"></Link>
},
{
key: 'logistics',
icon: <TruckOutlined />,
label: <Link to="/Logistics"></Link>
},
{
key: 'aftersales',
icon: <AlertOutlined />,
label: <Link to="/AfterSales"></Link>
},
{
key: 'compliance',
icon: <AuditOutlined />,
label: <Link to="/Compliance"></Link>
},
{
key: 'blacklist',
icon: <AlertOutlined />,
label: <Link to="/Blacklist"></Link>
},
{
key: 'b2b',
icon: <DollarOutlined />,
label: <Link to="/B2B">B2B贸易</Link>
},
{
key: 'ads',
icon: <BarChartOutlined />,
label: <Link to="/Ad">广</Link>
},
{
key: 'users',
icon: <UserOutlined />,
label: <Link to="/User"></Link>
},
{
key: 'roles',
icon: <TeamOutlined />,
label: <Link to="/Role"></Link>
},
{
key: 'system',
icon: <SettingOutlined />,
label: <Link to="/System"></Link>
}
];
return (
<Layout style={{ minHeight: '100vh' }}>
<Header style={{ display: 'flex', alignItems: 'center', background: '#1890ff' }}>
<Title level={3} style={{ color: 'white', margin: 0 }}>Crawlful Hub </Title>
</Header>
<Layout>
<Sider width={200} style={{ background: '#f0f2f5' }}>
<Menu
mode="inline"
style={{ height: '100%', borderRight: 0 }}
defaultSelectedKeys={['dashboard']}
items={menuItems}
/>
</Sider>
<Layout style={{ padding: '0 24px 24px' }}>
<Content style={{ padding: 24, margin: 0, minHeight: 280, background: '#fff' }}>
<Title level={4}></Title>
<div>
<Title level={4}></Title>
<Text type="secondary"></Text>
<Divider />
{/* 核心指标卡片 */}
<Row gutter={[16, 16]}>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="商品数量"
value={1280}
prefix={<ShoppingOutlined style={{ color: '#1890ff' }} />}
valueStyle={{ color: '#1890ff' }}
/>
<div style={{ marginTop: 8 }}>
<Text type="success">
<RiseOutlined /> +12
</Text>
</div>
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="订单数量"
value={960}
prefix={<FileTextOutlined style={{ color: '#52c41a' }} />}
valueStyle={{ color: '#52c41a' }}
/>
<div style={{ marginTop: 8 }}>
<Text type="success">
<RiseOutlined /> +8%
</Text>
</div>
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="商户数量"
value={120}
prefix={<ShopOutlined style={{ color: '#722ed1' }} />}
valueStyle={{ color: '#722ed1' }}
/>
<div style={{ marginTop: 8 }}>
<Text type="secondary">
98
</Text>
</div>
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="总销售额"
value={1280000}
prefix={<DollarOutlined style={{ color: '#fa8c16' }} />}
valueStyle={{ color: '#fa8c16' }}
precision={2}
/>
<div style={{ marginTop: 8 }}>
<Text type="danger">
<FallOutlined /> -2%
</Text>
</div>
</Card>
</Col>
</Row>
{/* 系统功能介绍 */}
<Row gutter={[16, 16]} style={{ marginTop: 24 }}>
<Col span={24}>
<Card title="系统功能">
<Text>
使 Crawlful Hub
</Text>
<Divider />
<Row gutter={[16, 16]}>
<Col span={6}>
<Card>
<Statistic title="商品数量" value={1280} />
<Col xs={24} md={8}>
<Card type="inner" title="商品管理">
<Text></Text>
</Card>
</Col>
<Col span={6}>
<Card>
<Statistic title="订单数量" value={960} />
<Col xs={24} md={8}>
<Card type="inner" title="订单管理">
<Text></Text>
</Card>
</Col>
<Col span={6}>
<Card>
<Statistic title="商户数量" value={120} />
</Card>
</Col>
<Col span={6}>
<Card>
<Statistic title="总销售额" value={1280000} prefix="¥" />
<Col xs={24} md={8}>
<Card type="inner" title="数据分析">
<Text></Text>
</Card>
</Col>
</Row>
<div style={{ marginTop: 24 }}>
<Card title="系统功能">
<Text>
使 Crawlful Hub
</Text>
</Card>
</div>
</Content>
</Layout>
</Layout>
</Layout>
</Card>
</Col>
</Row>
</div>
);
};
export default Dashboard;
export default Dashboard;