diff --git a/openhis-ui-vue3/src/router/index.js b/openhis-ui-vue3/src/router/index.js index dada00a9..6092f6d2 100644 --- a/openhis-ui-vue3/src/router/index.js +++ b/openhis-ui-vue3/src/router/index.js @@ -96,6 +96,32 @@ export const dynamicRoutes = [ }, ], }, + // 字典类型路由(直接复制这段) + { + path: '/system/dict', + component: Layout, + alwaysShow: true, + name: 'DictType', + meta: { + title: '字典类型管理', + icon: 'list' // 图标随便选一个,比如list、dict,不影响跳转 + }, + children: [ + { + path: '', + component: () => import('@/views/system/dict/index.vue'), + name: 'DictTypeList', + meta: {title: '字典类型', noCache: false} + }, + { + path: 'data/:dictId?', // 带字典ID参数,?表示可选 + component: () => import('@/views/system/dict/data.vue'), // 你的data.vue路径 + name: 'DictData', + hidden: true, // 不在侧边栏显示(子页面) + meta: {title: '字典数据', activeMenu: '/system/dict'} // 保持侧边栏高亮 + } + ] + }, ]; // 合并常量路由和动态路由,确保所有路由都能被访问 diff --git a/openhis-ui-vue3/src/views/system/dict/index.vue b/openhis-ui-vue3/src/views/system/dict/index.vue index c02555f8..a6db2ff1 100644 --- a/openhis-ui-vue3/src/views/system/dict/index.vue +++ b/openhis-ui-vue3/src/views/system/dict/index.vue @@ -1,55 +1,23 @@ - +
- +
@@ -194,7 +98,7 @@ {{ dict.label - }} + }} @@ -213,7 +117,7 @@