feat(web): 路由和菜单集成 + 10 页面占位
- App.tsx 添加 10 条 lazy 路由(患者/医护/预约/随访/咨询) - MainLayout.tsx 添加健康管理菜单组(7 项菜单 + 10 条标题映射) - 创建 10 个页面占位组件
This commit is contained in:
@@ -24,6 +24,18 @@ const PluginGraphPage = lazy(() => import('./pages/PluginGraphPage').then((m) =>
|
||||
const PluginDashboardPage = lazy(() => import('./pages/PluginDashboardPage').then((m) => ({ default: m.PluginDashboardPage })));
|
||||
const PluginKanbanPage = lazy(() => import('./pages/PluginKanbanPage'));
|
||||
|
||||
// 健康管理模块
|
||||
const PatientList = lazy(() => import('./pages/health/PatientList'));
|
||||
const PatientDetail = lazy(() => import('./pages/health/PatientDetail'));
|
||||
const PatientTagManage = lazy(() => import('./pages/health/PatientTagManage'));
|
||||
const DoctorList = lazy(() => import('./pages/health/DoctorList'));
|
||||
const AppointmentList = lazy(() => import('./pages/health/AppointmentList'));
|
||||
const DoctorSchedule = lazy(() => import('./pages/health/DoctorSchedule'));
|
||||
const FollowUpTaskList = lazy(() => import('./pages/health/FollowUpTaskList'));
|
||||
const FollowUpRecordList = lazy(() => import('./pages/health/FollowUpRecordList'));
|
||||
const ConsultationList = lazy(() => import('./pages/health/ConsultationList'));
|
||||
const ConsultationDetail = lazy(() => import('./pages/health/ConsultationDetail'));
|
||||
|
||||
function PrivateRoute({ children }: { children: React.ReactNode }) {
|
||||
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
|
||||
return isAuthenticated ? <>{children}</> : <Navigate to="/login" replace />;
|
||||
@@ -153,6 +165,17 @@ export default function App() {
|
||||
<Route path="/plugins/:pluginId/dashboard" element={<PluginDashboardPage />} />
|
||||
<Route path="/plugins/:pluginId/kanban/:entityName" element={<PluginKanbanPage />} />
|
||||
<Route path="/plugins/:pluginId/:entityName" element={<PluginCRUDPage />} />
|
||||
{/* 健康管理 */}
|
||||
<Route path="/health/patients" element={<PatientList />} />
|
||||
<Route path="/health/patients/:id" element={<PatientDetail />} />
|
||||
<Route path="/health/tags" element={<PatientTagManage />} />
|
||||
<Route path="/health/doctors" element={<DoctorList />} />
|
||||
<Route path="/health/appointments" element={<AppointmentList />} />
|
||||
<Route path="/health/schedules" element={<DoctorSchedule />} />
|
||||
<Route path="/health/follow-up-tasks" element={<FollowUpTaskList />} />
|
||||
<Route path="/health/follow-up-records" element={<FollowUpRecordList />} />
|
||||
<Route path="/health/consultations" element={<ConsultationList />} />
|
||||
<Route path="/health/consultations/:id" element={<ConsultationDetail />} />
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
|
||||
Reference in New Issue
Block a user