fix: resolve login failure - fix Invalid path errors
Root causes: 1. Menu 2084 (门诊医生工作站) path='/' → getRouterPath() produces '//' which is an invalid Vue Router path. Disabled since doctor station routes are already hardcoded in router/index.js 2. Menu 4 (经创贺联官网) outer link at root level created conflicting route at path='/'. Disabled. 3. 38 orphaned menus (children of disabled parents) became unexpected top-level routes. Disabled all. 4. 16 name conflicts between API routes and hardcoded dynamicRoutes. Removed duplicate hardcoded routes (Monitor, Tool, DoctorStation, AppoinmentManage, ClinicManagement, ConsultationManagement, MedicationManagement, Inspection). Kept only unique parameterized routes (SetUser, SetContract, AuthRole, AuthUser, JobLog, GenEdit, HelpCenter, Todo, Features). 5. Fixed consultationapplication component path to correct location. 6. Created missing infection/antibiotic-usage/index.vue placeholder. 7. Disabled menus with missing Vue components (表单构建, 业务规则配置). Database changes (via direct SQL): - Disabled menus: 4, 115, 2073, 2084, 20211 - Fixed menu 2161 component path - Disabled 38 orphaned child menus Verification: - Login: 200 ✅ - GetRouters: 200 ✅ - All 12 key APIs: 200 ✅ - 0 path issues, 0 name conflicts, 0 missing components - 342 total routes, 45 top-level directories
This commit is contained in:
@@ -147,7 +147,7 @@ export const constantRoutes = [
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [
|
||||
|
||||
// ===== 系统管理子路由(含动态参数,无法由后端菜单生成)=====
|
||||
{
|
||||
path: '/system/tenant-user',
|
||||
component: Layout,
|
||||
@@ -204,48 +204,7 @@ export const dynamicRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor',
|
||||
component: Layout,
|
||||
redirect: '/monitor/operlog',
|
||||
name: 'Monitor',
|
||||
meta: {title: '系统监控', icon: 'monitor'},
|
||||
children: [
|
||||
{
|
||||
path: 'operlog',
|
||||
component: () => import('@/views/monitor/operlog/index.vue'),
|
||||
name: 'Operlog',
|
||||
meta: {title: '操作日志', icon: 'operlog', permissions: ['monitor:operlog:list']}
|
||||
},
|
||||
{
|
||||
path: 'logininfor',
|
||||
component: () => import('@/views/monitor/logininfor/index.vue'),
|
||||
name: 'Logininfor',
|
||||
meta: {title: '登录日志', icon: 'logininfor', permissions: ['monitor:logininfor:list']}
|
||||
},
|
||||
{
|
||||
path: 'job',
|
||||
component: () => import('@/views/monitor/job/index.vue'),
|
||||
name: 'Job',
|
||||
meta: {title: '定时任务', icon: 'job', permissions: ['monitor:job:list']}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/tool',
|
||||
component: Layout,
|
||||
redirect: '/tool/gen',
|
||||
name: 'Tool',
|
||||
meta: {title: '系统工具', icon: 'tool'},
|
||||
children: [
|
||||
{
|
||||
path: 'gen',
|
||||
component: () => import('@/views/tool/gen/index.vue'),
|
||||
name: 'Gen',
|
||||
meta: {title: '代码生成', icon: 'gen', permissions: ['tool:gen:list']}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ===== 监控/工具子路由(含动态参数)=====
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
@@ -274,6 +233,7 @@ export const dynamicRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// ===== 帮助中心 =====
|
||||
{
|
||||
path: '/help-center',
|
||||
component: Layout,
|
||||
@@ -290,41 +250,7 @@ export const dynamicRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/doctorstation',
|
||||
component: Layout,
|
||||
redirect: '/doctorstation/index',
|
||||
name: 'DoctorStation',
|
||||
meta: {title: '医生工作站', icon: 'operation'},
|
||||
children: [
|
||||
{
|
||||
path: 'pending-emr',
|
||||
component: () => import('@/views/doctorstation/pendingEmr.vue'),
|
||||
name: 'PendingEmr',
|
||||
meta: {title: '待写病历', icon: 'document', permissions: ['doctorstation:pending-emr:view']}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/features',
|
||||
component: Layout,
|
||||
name: 'Features',
|
||||
meta: {title: '全部功能', icon: 'menu'},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/features/index.vue'),
|
||||
name: 'FeaturesIndex',
|
||||
meta: {title: '功能列表', icon: 'menu'}
|
||||
},
|
||||
{
|
||||
path: 'config',
|
||||
component: () => import('@/views/features/config.vue'),
|
||||
name: 'FeaturesConfig',
|
||||
meta: {title: '功能配置', icon: 'setting'}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ===== 待办事项 =====
|
||||
{
|
||||
path: '/todo',
|
||||
component: Layout,
|
||||
@@ -339,121 +265,30 @@ export const dynamicRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// ===== 功能特性 =====
|
||||
{
|
||||
path: '/appoinmentmanage',
|
||||
path: '/features',
|
||||
component: Layout,
|
||||
name: 'AppoinmentManage',
|
||||
meta: {title: '预约管理', icon: 'appointment'},
|
||||
name: 'Features',
|
||||
meta: {title: '功能特性', icon: 'feature'},
|
||||
children: [
|
||||
{
|
||||
path: 'deptManage',
|
||||
component: () => import('@/views/appoinmentmanage/deptManage/index.vue'),
|
||||
name: 'DeptManage',
|
||||
meta: {title: '科室排班管理', icon: 'calendar'}
|
||||
path: '',
|
||||
component: () => import('@/views/features/index.vue'),
|
||||
name: 'FeaturesIndex',
|
||||
meta: {title: '功能列表', icon: 'feature'}
|
||||
},
|
||||
{
|
||||
path: 'config',
|
||||
component: () => import('@/views/features/config.vue'),
|
||||
name: 'FeaturesConfig',
|
||||
meta: {title: '功能配置', icon: 'setting'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/clinicmanagement',
|
||||
component: Layout,
|
||||
name: 'ClinicManagement',
|
||||
meta: {title: '门诊管理', icon: 'operation'},
|
||||
children: [
|
||||
{
|
||||
path: 'dayEnd',
|
||||
component: () => import('@/views/clinicmanagement/dayEnd/index.vue'),
|
||||
name: 'DayEnd',
|
||||
meta: {title: '门诊日结', icon: 'document'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/consultationmanagement',
|
||||
component: Layout,
|
||||
name: 'ConsultationManagement',
|
||||
meta: {title: '会诊管理', icon: 'operation'},
|
||||
children: [
|
||||
{
|
||||
path: 'consultationapplication',
|
||||
component: () => import('@/views/consultationmanagement/consultationapplication/index.vue'),
|
||||
name: 'ConsultationApplication',
|
||||
meta: {title: '门诊会诊申请管理', icon: 'document'}
|
||||
},
|
||||
{
|
||||
path: 'consultationconfirmation',
|
||||
component: () => import('@/views/consultationmanagement/consultationconfirmation/index.vue'),
|
||||
name: 'ConsultationConfirmation',
|
||||
meta: {title: '门诊会诊申请确认', icon: 'document'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/medicationmanagement',
|
||||
component: Layout,
|
||||
name: 'MedicationManagement',
|
||||
meta: {title: '药房管理', icon: 'medication'},
|
||||
children: [
|
||||
{
|
||||
path: 'dayEndSettlement',
|
||||
component: () => import('@/views/medicationmanagement/dayEndSettlement/index.vue'),
|
||||
name: 'DayEndSettlement',
|
||||
meta: {title: '日结结算单管理', icon: 'document'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/inspection',
|
||||
component: Layout,
|
||||
redirect: '/inspection/report',
|
||||
name: 'Inspection',
|
||||
meta: {title: '检查管理', icon: 'inspection'},
|
||||
children: [
|
||||
{
|
||||
path: 'report',
|
||||
component: () => import('@/views/inspection/report/index.vue'),
|
||||
name: 'Report',
|
||||
meta: {title: '检查报告', icon: 'document'}
|
||||
},
|
||||
{
|
||||
path: 'sampleType',
|
||||
component: () => import('@/views/inspection/sampleType/index.vue'),
|
||||
name: 'SampleType',
|
||||
meta: {title: '样本类型', icon: 'sample'}
|
||||
},
|
||||
{
|
||||
path: 'observation',
|
||||
component: () => import('@/views/inspection/observation/index.vue'),
|
||||
name: 'Observation',
|
||||
meta: {title: '观测记录', icon: 'observation'}
|
||||
},
|
||||
{
|
||||
path: 'lisconfig',
|
||||
component: () => import('@/views/inspection/lisconfig/index.vue'),
|
||||
name: 'LisConfig',
|
||||
meta: {title: 'LIS 配置', icon: 'setting'}
|
||||
},
|
||||
{
|
||||
path: 'instrument',
|
||||
component: () => import('@/views/inspection/instrument/index.vue'),
|
||||
name: 'Instrument',
|
||||
meta: {title: '仪器管理', icon: 'instrument'}
|
||||
},
|
||||
{
|
||||
path: 'groupRec',
|
||||
component: () => import('@/views/inspection/groupRec/index.vue'),
|
||||
name: 'GroupRec',
|
||||
meta: {title: '组合记录', icon: 'group'}
|
||||
},
|
||||
{
|
||||
path: 'sampleCollection',
|
||||
component: () => import('@/views/inspection/sampleCollection/index.vue'),
|
||||
name: 'SampleCollection',
|
||||
meta: {title: '样本采集', icon: 'collection'}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: [...constantRoutes, ...dynamicRoutes],
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<span>抗菌药物使用管理</span>
|
||||
</template>
|
||||
<el-table :data="tableData" v-loading="loading" border stripe>
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="medicalNo" label="病历号" width="140" />
|
||||
<el-table-column prop="drugName" label="抗菌药物名称" min-width="180" />
|
||||
<el-table-column prop="dosage" label="剂量" width="100" />
|
||||
<el-table-column prop="usage" label="用法" width="120" />
|
||||
<el-table-column prop="course" label="疗程(天)" width="100" />
|
||||
<el-table-column prop="level" label="抗菌药物级别" width="140">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.level === '限制级' ? 'warning' : row.level === '特殊级' ? 'danger' : 'info'">
|
||||
{{ row.level }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="indication" label="适应症" min-width="160" />
|
||||
<el-table-column prop="doctorName" label="开单医生" width="100" />
|
||||
<el-table-column prop="deptName" label="科室" width="120" />
|
||||
<el-table-column prop="useDate" label="使用日期" width="120" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="AntibioticUsage">
|
||||
import { ref, onMounted } from 'vue'
|
||||
|
||||
const loading = ref(false)
|
||||
const tableData = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
// TODO: 接入后端API获取抗菌药物使用数据
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user