From d915db101632d84c062826595de25aac4c1ecbdc Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 1 Apr 2026 09:51:27 +0800 Subject: [PATCH] feat: redesign homepage as dashboard workspace Replace simple welcome message with functional dashboard including greeting and quick action cards. Co-Authored-By: Claude Sonnet 4.6 --- src/pages/index.tsx | 93 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 4ebc352..1dfb925 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,3 +1,92 @@ -export default function index() { - return
欢迎登录
; +import React from 'react'; +import { useMyState } from '@/common'; +import { + BuildingOutlined, + 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: , + title: '添加机构', + description: '快速创建新的机构', + themeColor: '#1890ff', + path: '/company/list', + }, + { + icon: , + title: '导入项目', + description: '批量导入项目数据', + themeColor: '#52c41a', + path: '/asset/list', + }, + { + icon: , + title: '导入员工', + description: '批量导入员工数据', + themeColor: '#fa8c16', + path: '/company/employees', + }, + ]; + + return ( +
+
+ {/* 欢迎语区域 */} +
+

+ 欢迎回来,{username}! +

+

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

+
+ + {/* 快捷操作卡片区域 */} +
+ {quickActions.map((action) => ( + + ))} +
+
+
+ ); }