diff --git a/.umirc.ts b/.umirc.ts index ae19b4f..7716b7c 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -14,9 +14,9 @@ export default defineConfig({ }, proxy: { '/api/': { - // target: 'http://10.39.13.78:8002/', + target: 'http://10.39.13.78:8002/', // target: 'https://test-admin.linyikj.com.cn/', - target: 'https://admin.linyikj.com.cn/', + // target: 'https://admin.linyikj.com.cn/', changeOrigin: true, pathRewrite: { '^': '' }, }, diff --git a/src/common/components/layout/AvatarProps.tsx b/src/common/components/layout/AvatarProps.tsx index 2b17f85..7549c82 100644 --- a/src/common/components/layout/AvatarProps.tsx +++ b/src/common/components/layout/AvatarProps.tsx @@ -1,5 +1,6 @@ import { Apis } from '@/gen/Apis'; import { + DownOutlined, LogoutOutlined, UnlockOutlined, UserOutlined, @@ -62,6 +63,7 @@ export default function AvatarProps({ user }: { user: any }) { size={28} /> {user?.username} + diff --git a/src/components/MyExport.tsx b/src/components/MyExport.tsx index d9363fe..851e08c 100644 --- a/src/components/MyExport.tsx +++ b/src/components/MyExport.tsx @@ -7,7 +7,10 @@ export const MyExport = (props: any) => { label: '当前页(含查询条件)', onClick: () => props?.keyParams - ? props?.download?.({ download_type: 'page', ...props?.item }) + ? props?.download?.({ + download_type: 'page', + ...props?.item, + }) : props?.download?.Export?.({ download_type: 'page', ...props?.item, diff --git a/src/pages/asset/announcement/index.tsx b/src/pages/asset/announcement/index.tsx index d1d1f6a..afa428f 100644 --- a/src/pages/asset/announcement/index.tsx +++ b/src/pages/asset/announcement/index.tsx @@ -3,26 +3,19 @@ import { MyColumns, MyPageContainer, MyProTableProps, - usePageTabs, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums'; +import { + MsgPropertyAnnouncementsObjectEnum, + MsgPropertyAnnouncementsPublishTypeEnum, +} from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; import { Space } from 'antd'; import AnnouncementCreate from './modals/AnnouncementCreate'; import AnnouncementShow from './modals/AnnouncementShow'; import AnnouncementUpdate from './modals/AnnouncementUpdate'; export default function Index({ title = '项目公告' }) { - const navigate = useNavigate(); - - // 注册当前页面为标签页 - usePageTabs({ - tabKey: 'msg-property-announcements', - tabLabel: title, - }); - return ( + { setParams(params); return MyProTableProps.request( diff --git a/src/pages/company/employees/modals/EmployeeUpdate.tsx b/src/pages/company/employees/modals/EmployeeUpdate.tsx index 6b4f3f6..baef3ca 100644 --- a/src/pages/company/employees/modals/EmployeeUpdate.tsx +++ b/src/pages/company/employees/modals/EmployeeUpdate.tsx @@ -72,7 +72,7 @@ export default function Update(props: MyBetaModalFormProps) { { title: '重置登录密码', key: 'password', - tooltip: '必须超过6位数,且包含数字、字母、符号', + tooltip: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符', colProps: { span: 24 }, }, Selects?.Positions({ diff --git a/src/pages/components/QuickActionCard.tsx b/src/pages/components/QuickActionCard.tsx index 1d53302..2406ee4 100644 --- a/src/pages/components/QuickActionCard.tsx +++ b/src/pages/components/QuickActionCard.tsx @@ -1,11 +1,11 @@ +import { Card } from 'antd'; import React from 'react'; -import { Card, Tooltip } from 'antd'; import { useNavigate } from 'umi'; interface QuickActionCardProps { icon: React.ReactNode; title: string; - description: string; + description?: string; themeColor: string; to: string; } @@ -13,7 +13,6 @@ interface QuickActionCardProps { const QuickActionCard: React.FC = ({ icon, title, - description, themeColor, to, }) => { @@ -24,68 +23,58 @@ const QuickActionCard: React.FC = ({ }; return ( - - { - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - handleClick(); - } - }} - aria-label={`${title} - ${description}`} + { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handleClick(); + } + }} + aria-label={title} + 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)'; + }} + > +
{icon}
+
{ - 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)'; + fontSize: 16, + color: '#262626', + textAlign: 'center', }} > -
- {icon} -
-
- {title} -
-
- {description} -
- - + {title} +
+
); }; diff --git a/src/pages/components/QuickActionsGrid.tsx b/src/pages/components/QuickActionsGrid.tsx index bae9491..5ac3d29 100644 --- a/src/pages/components/QuickActionsGrid.tsx +++ b/src/pages/components/QuickActionsGrid.tsx @@ -1,12 +1,11 @@ -import React from 'react'; import { + AuditOutlined, BuildOutlined, + DollarOutlined, ImportOutlined, TeamOutlined, - ApartmentOutlined, - DollarOutlined, - AuditOutlined, } from '@ant-design/icons'; +import React from 'react'; import QuickActionCard from './QuickActionCard'; const QuickActionsGrid: React.FC = () => { @@ -32,13 +31,13 @@ const QuickActionsGrid: React.FC = () => { themeColor: '#fa8c16', path: '/company/employees', }, - { - icon: , - title: '导入楼栋', - description: '批量导入楼栋数据', - themeColor: '#722ed1', - path: '/asset/houses', - }, + // { + // icon: , + // title: '导入楼栋', + // description: '批量导入楼栋数据', + // themeColor: '#722ed1', + // path: '/asset/list', + // }, { icon: , title: '创建收费标准', @@ -60,7 +59,7 @@ const QuickActionsGrid: React.FC = () => {
{ return (
{ }} > {/* 未来扩展:统计数据卡片、图表、报表等 */} -
- {/* 当前阶段:完全空白,便于未来扩展 */} -
+
{/* 当前阶段:完全空白,便于未来扩展 */}
); }; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 35e118d..4051452 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -7,18 +7,11 @@ export default function Index() { const username = snap.session?.user?.username || '用户'; return ( -
+
{/* 欢迎语区域 */}

, + title: '添加机构', + themeColor: '#1890ff', + path: '/company/list', + }, + { + icon: , + title: '导入项目', + themeColor: '#52c41a', + path: '/asset/list', + }, + { + icon: , + title: '导入员工', + themeColor: '#fa8c16', + path: '/company/employees', + }, + ]; + + return ( +
+
+ {/* 欢迎语区域 */} +
+

+ 欢迎回来,{username}! +

+

+ 这里是您的快捷工作台,点击下方卡片快速开始常用操作 +

+
+ + {/* 快捷操作卡片区域 */} +
+ {quickActions.map((action) => ( + + ))} +
+ + {/* 移动端响应式样式 */} + +
+
+ ); +} diff --git a/tmp/check-icons.js b/tmp/check-icons.js new file mode 100644 index 0000000..ab38129 --- /dev/null +++ b/tmp/check-icons.js @@ -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');