fix:更新优化
This commit is contained in:
parent
ef5b31c0e2
commit
5eb55f6ca7
@ -14,9 +14,9 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api/': {
|
'/api/': {
|
||||||
// target: 'http://10.39.13.78:8002/',
|
target: 'http://10.39.13.78:8002/',
|
||||||
// target: 'https://test-admin.linyikj.com.cn/',
|
// target: 'https://test-admin.linyikj.com.cn/',
|
||||||
target: 'https://admin.linyikj.com.cn/',
|
// target: 'https://admin.linyikj.com.cn/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: { '^': '' },
|
pathRewrite: { '^': '' },
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import {
|
||||||
|
DownOutlined,
|
||||||
LogoutOutlined,
|
LogoutOutlined,
|
||||||
UnlockOutlined,
|
UnlockOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
@ -62,6 +63,7 @@ export default function AvatarProps({ user }: { user: any }) {
|
|||||||
size={28}
|
size={28}
|
||||||
/>
|
/>
|
||||||
<span>{user?.username}</span>
|
<span>{user?.username}</span>
|
||||||
|
<DownOutlined />
|
||||||
</Space>
|
</Space>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -7,7 +7,10 @@ export const MyExport = (props: any) => {
|
|||||||
label: '当前页(含查询条件)',
|
label: '当前页(含查询条件)',
|
||||||
onClick: () =>
|
onClick: () =>
|
||||||
props?.keyParams
|
props?.keyParams
|
||||||
? props?.download?.({ download_type: 'page', ...props?.item })
|
? props?.download?.({
|
||||||
|
download_type: 'page',
|
||||||
|
...props?.item,
|
||||||
|
})
|
||||||
: props?.download?.Export?.({
|
: props?.download?.Export?.({
|
||||||
download_type: 'page',
|
download_type: 'page',
|
||||||
...props?.item,
|
...props?.item,
|
||||||
|
|||||||
@ -3,26 +3,19 @@ import {
|
|||||||
MyColumns,
|
MyColumns,
|
||||||
MyPageContainer,
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
import {
|
||||||
|
MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import AnnouncementCreate from './modals/AnnouncementCreate';
|
import AnnouncementCreate from './modals/AnnouncementCreate';
|
||||||
import AnnouncementShow from './modals/AnnouncementShow';
|
import AnnouncementShow from './modals/AnnouncementShow';
|
||||||
import AnnouncementUpdate from './modals/AnnouncementUpdate';
|
import AnnouncementUpdate from './modals/AnnouncementUpdate';
|
||||||
|
|
||||||
export default function Index({ title = '项目公告' }) {
|
export default function Index({ title = '项目公告' }) {
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'msg-property-announcements',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
title={title}
|
title={title}
|
||||||
@ -88,6 +81,12 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
valueEnum: MsgPropertyAnnouncementsPublishTypeEnum,
|
valueEnum: MsgPropertyAnnouncementsPublishTypeEnum,
|
||||||
search: false,
|
search: false,
|
||||||
}),
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '展示对象',
|
||||||
|
dataIndex: 'object',
|
||||||
|
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
title: '发布时间',
|
title: '发布时间',
|
||||||
dataIndex: 'schedule_publish_at',
|
dataIndex: 'schedule_publish_at',
|
||||||
|
|||||||
@ -8,7 +8,10 @@ import {
|
|||||||
import MyEditor from '@/common/components/Editor';
|
import MyEditor from '@/common/components/Editor';
|
||||||
import { Selects } from '@/components/Select';
|
import { Selects } from '@/components/Select';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
import {
|
||||||
|
MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
@ -67,6 +70,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
...rulesHelper.text,
|
...rulesHelper.text,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'publish_type',
|
key: 'publish_type',
|
||||||
title: '发布方式',
|
title: '发布方式',
|
||||||
@ -78,7 +82,17 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
...rulesHelper.text,
|
...rulesHelper.text,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'object',
|
||||||
|
title: '展示对象',
|
||||||
|
colProps: { span: 8 },
|
||||||
|
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
formItemProps: {
|
||||||
|
labelCol: { span: 8 },
|
||||||
|
wrapperCol: { span: 12 },
|
||||||
|
...rulesHelper.text,
|
||||||
|
},
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
name: ['publish_type'],
|
name: ['publish_type'],
|
||||||
valueType: 'dependency',
|
valueType: 'dependency',
|
||||||
|
|||||||
@ -7,7 +7,10 @@ import {
|
|||||||
} from '@/common';
|
} from '@/common';
|
||||||
import MyEditor from '@/common/components/Editor';
|
import MyEditor from '@/common/components/Editor';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
import {
|
||||||
|
MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
@ -66,7 +69,17 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
...rulesHelper.text,
|
...rulesHelper.text,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'object',
|
||||||
|
title: '展示对象',
|
||||||
|
colProps: { span: 8 },
|
||||||
|
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
formItemProps: {
|
||||||
|
labelCol: { span: 8 },
|
||||||
|
wrapperCol: { span: 12 },
|
||||||
|
...rulesHelper.text,
|
||||||
|
},
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
name: ['publish_type'],
|
name: ['publish_type'],
|
||||||
valueType: 'dependency',
|
valueType: 'dependency',
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import {
|
|||||||
MyColumns,
|
MyColumns,
|
||||||
MyPageContainer,
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { MyExport } from '@/components/MyExport';
|
import { MyExport } from '@/components/MyExport';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
@ -12,7 +11,6 @@ import {
|
|||||||
AssetHousesUsageEnum,
|
AssetHousesUsageEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import HousesShow from '../dictionary/modals/HousesShow';
|
import HousesShow from '../dictionary/modals/HousesShow';
|
||||||
@ -21,16 +19,11 @@ import HousesUpdate from '../dictionary/modals/HousesUpdate';
|
|||||||
export default function Index({ title = '房屋列表' }) {
|
export default function Index({ title = '房屋列表' }) {
|
||||||
const [getParams, setParams] = useState({});
|
const [getParams, setParams] = useState({});
|
||||||
|
|
||||||
const navigate = useNavigate();
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'asset-houses',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
return (
|
return (
|
||||||
<MyPageContainer title={title}>
|
<MyPageContainer title={title} enableTabs={false} tabKey="asset-houses">
|
||||||
<ProTable
|
<ProTable
|
||||||
{...MyProTableProps.props}
|
{...MyProTableProps.props}
|
||||||
|
headerTitle={title}
|
||||||
request={async (params, sort) => {
|
request={async (params, sort) => {
|
||||||
setParams(params);
|
setParams(params);
|
||||||
return MyProTableProps.request(
|
return MyProTableProps.request(
|
||||||
|
|||||||
@ -72,7 +72,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{
|
{
|
||||||
title: '重置登录密码',
|
title: '重置登录密码',
|
||||||
key: 'password',
|
key: 'password',
|
||||||
tooltip: '必须超过6位数,且包含数字、字母、符号',
|
tooltip: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
},
|
},
|
||||||
Selects?.Positions({
|
Selects?.Positions({
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
|
import { Card } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Card, Tooltip } from 'antd';
|
|
||||||
import { useNavigate } from 'umi';
|
import { useNavigate } from 'umi';
|
||||||
|
|
||||||
interface QuickActionCardProps {
|
interface QuickActionCardProps {
|
||||||
icon: React.ReactNode;
|
icon: React.ReactNode;
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description?: string;
|
||||||
themeColor: string;
|
themeColor: string;
|
||||||
to: string;
|
to: string;
|
||||||
}
|
}
|
||||||
@ -13,7 +13,6 @@ interface QuickActionCardProps {
|
|||||||
const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
description,
|
|
||||||
themeColor,
|
themeColor,
|
||||||
to,
|
to,
|
||||||
}) => {
|
}) => {
|
||||||
@ -24,68 +23,58 @@ const QuickActionCard: React.FC<QuickActionCardProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={title}>
|
<Card
|
||||||
<Card
|
hoverable
|
||||||
hoverable
|
onClick={handleClick}
|
||||||
onClick={handleClick}
|
tabIndex={0}
|
||||||
tabIndex={0}
|
role="button"
|
||||||
role="button"
|
onKeyDown={(e) => {
|
||||||
onKeyDown={(e) => {
|
if (e.key === 'Enter' || e.key === ' ') {
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
e.preventDefault();
|
||||||
e.preventDefault();
|
handleClick();
|
||||||
handleClick();
|
}
|
||||||
}
|
}}
|
||||||
}}
|
aria-label={title}
|
||||||
aria-label={`${title} - ${description}`}
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
height: 130,
|
||||||
|
borderRadius: 8,
|
||||||
|
transition: 'all 0.3s ease',
|
||||||
|
cursor: 'pointer',
|
||||||
|
border: 'none',
|
||||||
|
boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
|
||||||
|
}}
|
||||||
|
styles={{
|
||||||
|
body: {
|
||||||
|
padding: 30,
|
||||||
|
height: '100%',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 10,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onMouseEnter={(e) => {
|
||||||
|
e.currentTarget.style.transform = 'translateY(-4px)';
|
||||||
|
e.currentTarget.style.boxShadow = '0 4px 16px rgba(0,0,0,0.2)';
|
||||||
|
}}
|
||||||
|
onMouseLeave={(e) => {
|
||||||
|
e.currentTarget.style.transform = 'translateY(0)';
|
||||||
|
e.currentTarget.style.boxShadow = '0 2px 8px rgba(0,0,0,0.1)';
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ fontSize: 36, color: themeColor }}>{icon}</div>
|
||||||
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
fontSize: 16,
|
||||||
height: 160,
|
color: '#262626',
|
||||||
borderRadius: 8,
|
textAlign: 'center',
|
||||||
transition: 'all 0.3s ease',
|
|
||||||
cursor: 'pointer',
|
|
||||||
border: 'none',
|
|
||||||
boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
|
|
||||||
}}
|
|
||||||
styles={{
|
|
||||||
body: {
|
|
||||||
padding: 24,
|
|
||||||
height: '100%',
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 12,
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onMouseEnter={(e) => {
|
|
||||||
e.currentTarget.style.transform = 'translateY(-4px)';
|
|
||||||
e.currentTarget.style.boxShadow = '0 4px 16px rgba(0,0,0,0.2)';
|
|
||||||
}}
|
|
||||||
onMouseLeave={(e) => {
|
|
||||||
e.currentTarget.style.transform = 'translateY(0)';
|
|
||||||
e.currentTarget.style.boxShadow = '0 2px 8px rgba(0,0,0,0.1)';
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ fontSize: 48, color: themeColor }}>
|
{title}
|
||||||
{icon}
|
</div>
|
||||||
</div>
|
</Card>
|
||||||
<div style={{
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: 600,
|
|
||||||
color: '#262626',
|
|
||||||
textAlign: 'center'
|
|
||||||
}}>
|
|
||||||
{title}
|
|
||||||
</div>
|
|
||||||
<div style={{
|
|
||||||
fontSize: 14,
|
|
||||||
color: '#8c8c8c',
|
|
||||||
textAlign: 'center'
|
|
||||||
}}>
|
|
||||||
{description}
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
</Tooltip>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
import React from 'react';
|
|
||||||
import {
|
import {
|
||||||
|
AuditOutlined,
|
||||||
BuildOutlined,
|
BuildOutlined,
|
||||||
|
DollarOutlined,
|
||||||
ImportOutlined,
|
ImportOutlined,
|
||||||
TeamOutlined,
|
TeamOutlined,
|
||||||
ApartmentOutlined,
|
|
||||||
DollarOutlined,
|
|
||||||
AuditOutlined,
|
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
|
import React from 'react';
|
||||||
import QuickActionCard from './QuickActionCard';
|
import QuickActionCard from './QuickActionCard';
|
||||||
|
|
||||||
const QuickActionsGrid: React.FC = () => {
|
const QuickActionsGrid: React.FC = () => {
|
||||||
@ -32,13 +31,13 @@ const QuickActionsGrid: React.FC = () => {
|
|||||||
themeColor: '#fa8c16',
|
themeColor: '#fa8c16',
|
||||||
path: '/company/employees',
|
path: '/company/employees',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
icon: <ApartmentOutlined />,
|
// icon: <ApartmentOutlined />,
|
||||||
title: '导入楼栋',
|
// title: '导入楼栋',
|
||||||
description: '批量导入楼栋数据',
|
// description: '批量导入楼栋数据',
|
||||||
themeColor: '#722ed1',
|
// themeColor: '#722ed1',
|
||||||
path: '/asset/houses',
|
// path: '/asset/list',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
icon: <DollarOutlined />,
|
icon: <DollarOutlined />,
|
||||||
title: '创建收费标准',
|
title: '创建收费标准',
|
||||||
@ -60,7 +59,7 @@ const QuickActionsGrid: React.FC = () => {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
gridTemplateColumns: 'repeat(6, 1fr)',
|
gridTemplateColumns: 'repeat(5, 1fr)',
|
||||||
gap: '16px',
|
gap: '16px',
|
||||||
marginBottom: '24px',
|
marginBottom: '24px',
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -4,8 +4,6 @@ const StatisticsPlaceholder: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
minHeight: '60vh',
|
|
||||||
background: '#f0f2f5',
|
|
||||||
padding: '24px',
|
padding: '24px',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@ -13,9 +11,7 @@ const StatisticsPlaceholder: React.FC = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* 未来扩展:统计数据卡片、图表、报表等 */}
|
{/* 未来扩展:统计数据卡片、图表、报表等 */}
|
||||||
<div>
|
<div>{/* 当前阶段:完全空白,便于未来扩展 */}</div>
|
||||||
{/* 当前阶段:完全空白,便于未来扩展 */}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -7,18 +7,11 @@ export default function Index() {
|
|||||||
const username = snap.session?.user?.username || '用户';
|
const username = snap.session?.user?.username || '用户';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div>
|
||||||
style={{
|
|
||||||
padding: '24px',
|
|
||||||
minHeight: '100vh',
|
|
||||||
background: '#f0f2f5',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* 欢迎语区域 */}
|
{/* 欢迎语区域 */}
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
marginBottom: '32px',
|
marginBottom: '32px',
|
||||||
textAlign: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h1
|
<h1
|
||||||
|
|||||||
98
src/pages/index.tsx.backup
Normal file
98
src/pages/index.tsx.backup
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
import { useMyState } from '@/common';
|
||||||
|
import {
|
||||||
|
BuildOutlined,
|
||||||
|
ImportOutlined,
|
||||||
|
TeamOutlined,
|
||||||
|
} from '@ant-design/icons';
|
||||||
|
import QuickActionCard from './components/QuickActionCard';
|
||||||
|
|
||||||
|
export default function Index() {
|
||||||
|
const { snap } = useMyState();
|
||||||
|
const username = snap.session?.user?.username || '用户';
|
||||||
|
|
||||||
|
const quickActions = [
|
||||||
|
{
|
||||||
|
icon: <BuildOutlined />,
|
||||||
|
title: '添加机构',
|
||||||
|
themeColor: '#1890ff',
|
||||||
|
path: '/company/list',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: <ImportOutlined />,
|
||||||
|
title: '导入项目',
|
||||||
|
themeColor: '#52c41a',
|
||||||
|
path: '/asset/list',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: <TeamOutlined />,
|
||||||
|
title: '导入员工',
|
||||||
|
themeColor: '#fa8c16',
|
||||||
|
path: '/company/employees',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{
|
||||||
|
padding: '48px 24px',
|
||||||
|
minHeight: 'calc(100vh - 64px)',
|
||||||
|
background: '#f0f2f5',
|
||||||
|
}}>
|
||||||
|
<div style={{
|
||||||
|
maxWidth: 1200,
|
||||||
|
margin: '0 auto',
|
||||||
|
}}>
|
||||||
|
{/* 欢迎语区域 */}
|
||||||
|
<div style={{
|
||||||
|
marginBottom: 48,
|
||||||
|
textAlign: 'center',
|
||||||
|
}}>
|
||||||
|
<h1 style={{
|
||||||
|
fontSize: 32,
|
||||||
|
color: '#262626',
|
||||||
|
marginBottom: 12,
|
||||||
|
}}>
|
||||||
|
欢迎回来,{username}!
|
||||||
|
</h1>
|
||||||
|
<p style={{
|
||||||
|
fontSize: 16,
|
||||||
|
color: '#8c8c8c',
|
||||||
|
marginBottom: 0,
|
||||||
|
}}>
|
||||||
|
这里是您的快捷工作台,点击下方卡片快速开始常用操作
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 快捷操作卡片区域 */}
|
||||||
|
<div
|
||||||
|
className="quick-actions-grid"
|
||||||
|
style={{
|
||||||
|
display: 'grid',
|
||||||
|
gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))',
|
||||||
|
gap: 24,
|
||||||
|
maxWidth: 900,
|
||||||
|
margin: '0 auto',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{quickActions.map((action) => (
|
||||||
|
<QuickActionCard
|
||||||
|
key={action.path}
|
||||||
|
icon={action.icon}
|
||||||
|
title={action.title}
|
||||||
|
themeColor={action.themeColor}
|
||||||
|
to={action.path}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 移动端响应式样式 */}
|
||||||
|
<style>{`
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.quick-actions-grid {
|
||||||
|
grid-template-columns: 1fr !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
5
tmp/check-icons.js
Normal file
5
tmp/check-icons.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const icons = require('@ant-design/icons');
|
||||||
|
console.log('DollarOutlined:', typeof icons.DollarOutlined !== 'undefined');
|
||||||
|
console.log('AuditOutlined:', typeof icons.AuditOutlined !== 'undefined');
|
||||||
|
console.log('CheckCircleOutlined:', typeof icons.CheckCircleOutlined !== 'undefined');
|
||||||
|
console.log('FileSearchOutlined:', typeof icons.FileSearchOutlined !== 'undefined');
|
||||||
Loading…
x
Reference in New Issue
Block a user