add procard in welcome

mgy
Dawn1Ocean 2024-04-02 19:21:12 +08:00
parent 54f7fe53a5
commit 01234a6042
3 changed files with 37 additions and 6 deletions

View File

@ -23,7 +23,7 @@ export default [
name: '值班管理', name: '值班管理',
icon: 'team', icon: 'team',
routes: [ routes: [
{ path: '/leader', redirect: '/admin/dutyinfo' }, { path: '/leader', redirect: '/leader/conclusion' },
{ path: '/leader/conclusion', name: '值班总结', component: './Leader/Conclusion' }, { path: '/leader/conclusion', name: '值班总结', component: './Leader/Conclusion' },
], ],
}, },

View File

@ -53,7 +53,11 @@ const Logs: React.FC = () => {
extra: { extra: {
dataIndex: 'time', dataIndex: 'time',
render: (_, row) => { render: (_, row) => {
return <div>{moment(row.time).format('YYYY-M-D HH:mm:ss')}</div>; return (
<div style={{ marginLeft: '3vh' }}>
{moment(row.time).format('YYYY-M-D HH:mm:ss')}
</div>
);
}, },
search: false, search: false,
}, },

View File

@ -1,12 +1,39 @@
import { Todo } from '@/components'; import { PageContainer, ProCard } from '@ant-design/pro-components';
import { PageContainer } from '@ant-design/pro-components'; import { Card, Statistic } from 'antd';
import { Card } from 'antd'; import RcResizeObserver from 'rc-resize-observer';
import { useState } from 'react';
const { Divider } = ProCard;
const Logs: React.FC = () => { const Logs: React.FC = () => {
const [responsive, setResponsive] = useState(false);
return ( return (
<PageContainer> <PageContainer>
<Card> <Card>
<Todo /> <RcResizeObserver
key="resize-observer"
onResize={(offset) => {
setResponsive(offset.width < 596);
}}
>
<ProCard.Group direction={responsive ? 'column' : 'row'}>
<ProCard>
<Statistic title="今日UV" value={79.0} precision={2} />
</ProCard>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<ProCard>
<Statistic title="冻结金额" value={112893.0} precision={2} />
</ProCard>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<ProCard>
<Statistic title="信息完整度" value={93} suffix="/ 100" />
</ProCard>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<ProCard>
<Statistic title="冻结金额" value={112893.0} />
</ProCard>
</ProCard.Group>
</RcResizeObserver>
</Card> </Card>
</PageContainer> </PageContainer>
); );