import { Area, Line } from '@ant-design/charts'; import { BarChartOutlined, CommentOutlined, TeamOutlined } from '@ant-design/icons'; import { PageContainer } from '@ant-design/pro-components'; import React, { useEffect, useState } from 'react'; import { DataItemCard } from './components/DataItemCard'; import { DataSumItemCard } from './components/DataSumItemCard'; import styles from './index.module.scss'; const Workbench: React.FC = () => { const [data, setData] = useState([]); const asyncFetch = () => { fetch('https://gw.alipayobjects.com/os/bmw-prod/e00d52f4-2fa6-47ee-a0d7-105dd95bde20.json') .then((response) => response.json()) .then((json) => setData(json)) .catch((error) => { console.log('fetch data failed', error); }); }; useEffect(() => { asyncFetch(); }, []); const [dataArea, setDataArea] = useState([ { type: '订单数', date: '2021-02-01', value: 400 }, { type: '订单数', date: '2021-02-05', value: 900 }, { type: '订单数', date: '2021-02-08', value: 300 }, { type: '收衣数', date: '2021-02-01', value: 700 }, { type: '收衣数', date: '2021-02-05', value: 500 }, { type: '收衣数', date: '2021-02-08', value: 1000 }, ]); return (
数据总览 更新时间:2022-12-12 23:30:30
} count={111} /> } count={111} /> } count={111} />
客户数据
`${(v / 10e8).toFixed(1)} B`, // }, // },} legend={{ position: 'top', }} smooth={true} // @TODO 后续会换一种动画方式 animation={{ appear: { animation: 'path-in', duration: 3000, }, }} />
客群数据
); }; export default Workbench;