Files
makemd/dashboard/src/pages/index.tsx

126 lines
3.5 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { Card, Layout, Menu, Typography, Row, Col, Statistic } from 'antd';
import {
DashboardOutlined,
ShoppingOutlined,
UserOutlined,
TruckOutlined,
AuditOutlined,
AlertOutlined,
FileTextOutlined,
DollarOutlined,
BarChartOutlined
} 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>
}
];
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>
<Row gutter={[16, 16]}>
<Col span={6}>
<Card>
<Statistic title="商品数量" value={1280} />
</Card>
</Col>
<Col span={6}>
<Card>
<Statistic title="订单数量" value={960} />
</Card>
</Col>
<Col span={6}>
<Card>
<Statistic title="商户数量" value={120} />
</Card>
</Col>
<Col span={6}>
<Card>
<Statistic title="总销售额" value={1280000} prefix="¥" />
</Card>
</Col>
</Row>
<div style={{ marginTop: 24 }}>
<Card title="系统功能">
<Text>
使 Crawlful Hub
</Text>
</Card>
</div>
</Content>
</Layout>
</Layout>
</Layout>
);
};
export default Dashboard;