diff --git a/openhis-ui-vue3/src/router/index.js b/openhis-ui-vue3/src/router/index.js index a9e33aa3..53c218e3 100644 --- a/openhis-ui-vue3/src/router/index.js +++ b/openhis-ui-vue3/src/router/index.js @@ -87,7 +87,37 @@ export const constantRoutes = [ ] // 动态路由,基于用户权限动态去加载 -export const dynamicRoutes = [ + export const dynamicRoutes = [ + { + path: '/basicmanage', + component: Layout, + redirect: '/basicmanage/invoice-management', + name: 'BasicManage', + meta: { title: '基础管理', icon: 'component' }, + children: [ + { + path: 'invoice-management', + component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'), + name: 'invoice-management', + meta: { title: '发票管理' } + } + ] + }, + // 兼容系统业务管理路径 + { + path: '/system/ywgz', + component: Layout, + redirect: '/system/ywgz/InvoiceManagement', + hidden: true, + children: [ + { + path: 'InvoiceManagement', + component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'), + name: 'SystemInvoiceManagement', + meta: { title: '发票管理' } + } + ] + }, { path: '/maintainSystem', component: Layout, @@ -312,9 +342,12 @@ export const dynamicRoutes = [ } ] +// 合并常量路由和动态路由,确保所有路由都能被访问 +const allRoutes = [...constantRoutes, ...dynamicRoutes]; + const router = createRouter({ history: createWebHistory(), - routes: constantRoutes, + routes: allRoutes, scrollBehavior(to, from, savedPosition) { if (savedPosition) { return savedPosition diff --git a/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue b/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue new file mode 100644 index 00000000..585f99bd --- /dev/null +++ b/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue @@ -0,0 +1,1173 @@ + + + + + \ No newline at end of file