| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { createRouter, createWebHistory } from 'vue-router';
- const router = createRouter({
- history: createWebHistory(import.meta.env.BASE_URL),
- routes: [
- { path: '/screen', name: 'screen', component: () => import('@/pages/screen.page.vue'), meta: { scan: true } },
- { path: '/register', component: () => import('@/pages/register.page.vue'), meta: { title: '建档', scan: true } },
- { path: '/pulse', component: () => import('@/modules/pulse/pulse.page.vue'), meta: { title: '脉诊' } },
- { path: '/pulse/result', component: () => import('@/modules/pulse/pulse-result.page.vue'), meta: { title: '脉象分析报告' } },
- { path: '/camera', component: () => import('@/modules/camera/camera.page.vue'), meta: { title: '拍摄' } },
- { path: '/camera/result', component: () => import('@/modules/report/report-analyse.page.vue'), meta: { title: '舌面象分析报告' } },
- { path: '/questionnaire', component: () => import('@/modules/questionnaire/page.vue'), meta: { title: '问卷' } },
- { path: '/alcohol/result', component: () => import('@/modules/alcohol/alcohol.page.vue'), meta: { title: '黄酒建议' } },
- { path: '/report/analysis', redirect: '/camera/result' },
- { path: '/report/:id/scheme', component: () => import('@/modules/report/scheme.page.vue'), meta: { title: '调理方案', toggle: true } },
- { path: '/report/:id(\\w+)?', component: () => import('@/modules/report/report.page.vue'), meta: { title: '健康分析报告' } },
- { path: '/scheme/:id(\\w+)?', component: () => import('@/modules/report/scheme.page.vue'), meta: { title: '调理方案', toggle: false } },
- { path: '/crossing/:flow(\\w+)?', component: () => import('@/pages/crossing.page.vue') },
- { path: '/', redirect: '/screen' },
- ],
- });
- export default router;
- export const flow_start = 'start';
- export const flow_router = {
- 'patient_file': '/register',
- 'pulse_upload': '/pulse',
- 'pulse_upload_result': '/pulse/result',
- 'tongueface_upload': '/camera',
- 'tongueface_analysis_result': '/camera/result',
- 'tongueface_analysis': '/questionnaire',
- 'alcohol_upload_result': '/alcohol/result',
- 'health_analysis': '/report',
- 'health_analysis_scheme': '/scheme',
- [flow_start]: '/screen',
- } as const;
- export function getRoutePath(key?: string) {
- key = key?.split('?')?.[0];
- return flow_router[key as keyof typeof flow_router];
- }
|