From fc7f93172850b54f07e9cec06262b7dc62e78eb2 Mon Sep 17 00:00:00 2001 From: Bronya <2650301730@qq.com> Date: Fri, 5 Dec 2025 16:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A5=97=E9=A4=90=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2=E4=B8=AD=E7=9A=84=E5=A5=97=E9=A4=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=B9=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=9B=B8=E5=BA=94=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openhis-ui-vue3/src/router/index.js | 40 +- .../src/store/modules/permission.js | 3 + .../Inspection/PackageManagement.vue | 802 ++++++++++++++++++ .../views/maintainSystem/Inspection/index.vue | 33 +- 4 files changed, 855 insertions(+), 23 deletions(-) create mode 100644 openhis-ui-vue3/src/views/maintainSystem/Inspection/PackageManagement.vue diff --git a/openhis-ui-vue3/src/router/index.js b/openhis-ui-vue3/src/router/index.js index 53c218e3..94ff9cda 100644 --- a/openhis-ui-vue3/src/router/index.js +++ b/openhis-ui-vue3/src/router/index.js @@ -47,11 +47,6 @@ export const constantRoutes = [ component: () => import('@/views/register'), hidden: true }, - { - path: "/:pathMatch(.*)*", - component: () => import('@/views/error/404'), - hidden: true - }, { path: '/401', component: () => import('@/views/error/401'), @@ -83,6 +78,20 @@ export const constantRoutes = [ meta: { title: '个人中心', icon: 'user' } } ] + }, + // 添加套餐管理相关路由到公共路由,确保始终可用 + { + path: '/maintainSystem/Inspection/PackageManagement', + component: Layout, + hidden: true, + children: [ + { + path: '', + component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'), + name: 'DirectPackageManagement', + meta: { title: '套餐管理' } + } + ] } ] @@ -134,6 +143,20 @@ export const constantRoutes = [ component: () => import('@/views/maintainSystem/chargeConfig/index.vue'), name: 'ChargeConfig', meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] } + }, + { + path: 'Inspection', + component: () => import('@/views/maintainSystem/Inspection/index.vue'), + name: 'Inspection', + meta: { title: '检验管理', icon: 'inspection' }, + children: [ + { + path: 'PackageManagement', + component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'), + name: 'PackageManagement', + meta: { title: '套餐管理' } + } + ] } ] }, @@ -345,6 +368,13 @@ export const constantRoutes = [ // 合并常量路由和动态路由,确保所有路由都能被访问 const allRoutes = [...constantRoutes, ...dynamicRoutes]; +// 添加404路由到所有路由的最后 +allRoutes.push({ + path: "/:pathMatch(.*)*", + component: () => import('@/views/error/404'), + hidden: true +}); + const router = createRouter({ history: createWebHistory(), routes: allRoutes, diff --git a/openhis-ui-vue3/src/store/modules/permission.js b/openhis-ui-vue3/src/store/modules/permission.js index 958fe636..f31a8ec8 100644 --- a/openhis-ui-vue3/src/store/modules/permission.js +++ b/openhis-ui-vue3/src/store/modules/permission.js @@ -123,6 +123,9 @@ export function filterDynamicRoutes(routes) { if (auth.hasRoleOr(route.roles)) { res.push(route) } + } else { + // 如果没有权限设置,默认允许访问 + res.push(route) } }) return res diff --git a/openhis-ui-vue3/src/views/maintainSystem/Inspection/PackageManagement.vue b/openhis-ui-vue3/src/views/maintainSystem/Inspection/PackageManagement.vue new file mode 100644 index 00000000..110041ed --- /dev/null +++ b/openhis-ui-vue3/src/views/maintainSystem/Inspection/PackageManagement.vue @@ -0,0 +1,802 @@ + + + + + + + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue b/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue index c9197576..bc983f2b 100644 --- a/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue +++ b/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue @@ -421,9 +421,13 @@