fix: 恢复首页原有布局结构
首页布局恢复: - 快捷入口:出差申请、采购申请、备货录入 - 所有应用:审批、数据统计、系统设置 应用中心精简: - 只保留:出差申请、采购申请、数据报表、系统设置 - 删除:会议室、日程管理、报销申请、请假申请、用车申请、礼品申请、通讯录、文件中心 功能说明: - 采购申请、备货录入、数据统计点击后提示"系统开发中" - 系统设置包含修改密码、语言切换功能 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,15 +12,7 @@ interface AppItem {
|
|||||||
const apps: AppItem[] = [
|
const apps: AppItem[] = [
|
||||||
{ id: '1', icon: '✈️', label: '出差申请', path: '/business-trip/apply', color: '#1677ff', description: '提交出差申请' },
|
{ id: '1', icon: '✈️', label: '出差申请', path: '/business-trip/apply', color: '#1677ff', description: '提交出差申请' },
|
||||||
{ id: '2', icon: '📝', label: '采购申请', path: '/purchase/apply', color: '#52c41a', description: '物品采购审批' },
|
{ id: '2', icon: '📝', label: '采购申请', path: '/purchase/apply', color: '#52c41a', description: '物品采购审批' },
|
||||||
{ id: '3', icon: '🏠', label: '会议室', path: '/meeting-room', color: '#faad14', description: '会议室预定' },
|
|
||||||
{ id: '4', icon: '📅', label: '日程管理', path: '/schedule', color: '#722ed1', description: '个人日程安排' },
|
|
||||||
{ id: '5', icon: '💰', label: '报销申请', path: '/expense/apply', color: '#eb2f96', description: '费用报销审批' },
|
|
||||||
{ id: '6', icon: '📋', label: '请假申请', path: '/leave/apply', color: '#13c2c2', description: '请假审批' },
|
|
||||||
{ id: '7', icon: '🚗', label: '用车申请', path: '/car/apply', color: '#f759ab', description: '公车使用申请' },
|
|
||||||
{ id: '8', icon: '🎁', label: '礼品申请', path: '/gift/apply', color: '#ff7a45', description: '礼品采购申请' },
|
|
||||||
{ id: '9', icon: '📊', label: '数据报表', path: '/reports', color: '#1890ff', description: '业务数据统计' },
|
{ id: '9', icon: '📊', label: '数据报表', path: '/reports', color: '#1890ff', description: '业务数据统计' },
|
||||||
{ id: '10', icon: '👥', label: '通讯录', path: '/contacts', color: '#096dd9', description: '内部通讯录' },
|
|
||||||
{ id: '11', icon: '📁', label: '文件中心', path: '/files', color: '#595959', description: '文件共享管理' },
|
|
||||||
{ id: '12', icon: '⚙️', label: '系统设置', path: '/settings', color: '#8c8c8c', description: '系统偏好设置' },
|
{ id: '12', icon: '⚙️', label: '系统设置', path: '/settings', color: '#8c8c8c', description: '系统偏好设置' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ interface QuickAction {
|
|||||||
path: string
|
path: string
|
||||||
color: string
|
color: string
|
||||||
description?: string
|
description?: string
|
||||||
|
disabled?: boolean // 新增:标记是否禁用(开发中)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TodoItem {
|
interface TodoItem {
|
||||||
@@ -32,7 +33,14 @@ interface ActivityItem {
|
|||||||
// 从应用页面迁移的完整应用列表
|
// 从应用页面迁移的完整应用列表
|
||||||
const quickActions: QuickAction[] = [
|
const quickActions: QuickAction[] = [
|
||||||
{ id: '1', icon: '✈️', label: '出差申请', path: '/business-trip/apply', color: '#1677ff', description: '提交出差申请' },
|
{ id: '1', icon: '✈️', label: '出差申请', path: '/business-trip/apply', color: '#1677ff', description: '提交出差申请' },
|
||||||
{ id: '2', icon: '✍️', label: '审批', path: '/approval', color: '#52c41a', description: '待办事项审批' },
|
{ id: '2', icon: '📝', label: '采购申请', path: '/purchase/apply', color: '#52c41a', description: '物品采购审批', disabled: true },
|
||||||
|
{ id: '3', icon: '📦', label: '备货录入', path: '/stock/entry', color: '#faad14', description: '库存备货录入', disabled: true },
|
||||||
|
]
|
||||||
|
|
||||||
|
const allApps: QuickAction[] = [
|
||||||
|
{ id: '1', icon: '✍️', label: '审批', path: '/approval', color: '#52c41a', description: '待办事项审批' },
|
||||||
|
{ id: '2', icon: '📊', label: '数据统计', path: '/reports', color: '#1890ff', description: '业务数据统计', disabled: true },
|
||||||
|
{ id: '3', icon: '⚙️', label: '系统设置', path: '/settings', color: '#8c8c8c', description: '系统偏好设置' },
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
@@ -88,6 +96,10 @@ export default function Dashboard() {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const handleQuickAction = (action: QuickAction) => {
|
const handleQuickAction = (action: QuickAction) => {
|
||||||
|
if (action.disabled) {
|
||||||
|
Toast.show('系统开发中')
|
||||||
|
return
|
||||||
|
}
|
||||||
navigate(action.path)
|
navigate(action.path)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,6 +215,25 @@ export default function Dashboard() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* 所有应用 */}
|
||||||
|
<div className={styles.section}>
|
||||||
|
<h3 className={styles.sectionTitle}>所有应用</h3>
|
||||||
|
<div className={styles.actionGrid}>
|
||||||
|
{allApps.map((action) => (
|
||||||
|
<div
|
||||||
|
key={action.id}
|
||||||
|
className={styles.actionCard}
|
||||||
|
onClick={() => handleQuickAction(action)}
|
||||||
|
>
|
||||||
|
<div className={styles.actionIcon} style={{ backgroundColor: `${action.color}15` }}>
|
||||||
|
<span style={{ fontSize: 32 }}>{action.icon}</span>
|
||||||
|
</div>
|
||||||
|
<span className={styles.actionLabel}>{action.label}</span>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* 底部安全区域 */}
|
{/* 底部安全区域 */}
|
||||||
<div className={styles.safeArea} />
|
<div className={styles.safeArea} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user