import React, { Suspense } from 'react' import { Routes, Route, Navigate } from 'react-router-dom' import { Spin, Layout } from 'antd' const { Content } = Layout // 懒加载页面组件 const ProjectsPage = React.lazy(() => import('./pages/projects/ProjectsPage')) const ProjectDetail = React.lazy(() => import('./pages/projects/ProjectDetail')) // 施工管理页面 const ConstructionList = React.lazy(() => import('./pages/construction/ConstructionList')) const ConstructionLog = React.lazy(() => import('./pages/construction/ConstructionLog')) const ConstructionMilestones = React.lazy(() => import('./pages/construction/ConstructionMilestones')) const BudgetProjectList = React.lazy(() => import('./pages/budget/BudgetProjectList')) const BudgetProjectCreate = React.lazy(() => import('./pages/budget/BudgetProjectCreate')) // 加载中组件 const LoadingFallback = () => (
) // 简单布局 const SimpleLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => ( {children} ) const App: React.FC = () => { return ( }> {/* 项目管理路由 */} } /> } /> {/* 预算报价路由 */} } /> } /> } /> {/* 施工管理路由 */} } /> } /> } /> {/* 默认重定向到项目列表 */} } /> {/* 404页面 */}

404 - 页面未找到

您访问的页面不存在或已被移除。

返回首页 } />
) } export default App