修正可以显示出主页

This commit is contained in:
2025-12-11 15:23:16 +08:00
parent 3d797cc0e0
commit 8c84b6eb46
2 changed files with 29 additions and 32 deletions

View File

@@ -10,7 +10,7 @@
/> />
<!-- <link rel="icon" href="src/assets/images/ccu.png" /> --> <!-- <link rel="icon" href="src/assets/images/ccu.png" /> -->
<link rel="icon" href="src/assets/images/ccu.png" /> <link rel="icon" href="src/assets/images/ccu.png" />
<link rel="stylesheet" type="text/css" media="print" href="/public/print-lock.css"> <link rel="stylesheet" type="text/css" media="print" href="/print-lock.css">
<title>医院信息管理系统</title> <title>医院信息管理系统</title>
<!--[if lt IE 11 <!--[if lt IE 11
]><script> ]><script>

View File

@@ -1,6 +1,6 @@
import { createWebHistory, createRouter } from 'vue-router'; import { createWebHistory, createRouter } from 'vue-router'
/* Layout */ /* Layout */
import Layout from '@/layout'; import Layout from '@/layout'
/** /**
* Note: 路由配置项 * Note: 路由配置项
@@ -34,29 +34,24 @@ export const constantRoutes = [
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue'), component: () => import('@/views/redirect/index.vue')
}, }
], ]
}, },
{ {
path: '/login', path: '/login',
component: () => import('@/views/login'), component: () => import('@/views/login'),
hidden: true, hidden: true
}, },
{ {
path: '/register', path: '/register',
component: () => import('@/views/register'), component: () => import('@/views/register'),
hidden: true, hidden: true
},
{
path: '/:pathMatch(.*)*',
component: () => import('@/views/error/404'),
hidden: true,
}, },
{ {
path: '/401', path: '/401',
component: () => import('@/views/error/401'), component: () => import('@/views/error/401'),
hidden: true, hidden: true
}, },
{ {
path: '', path: '',
@@ -67,11 +62,10 @@ export const constantRoutes = [
path: '/index', path: '/index',
component: () => import('@/views/index'), component: () => import('@/views/index'),
name: 'Index', name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }, meta: { title: '首页', icon: 'dashboard', affix: true }
}, }
], ]
}, },
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,
@@ -79,6 +73,9 @@ export const constantRoutes = [
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{ {
path: 'profile',
component: () => import('@/views/system/user/profile/index'),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }
} }
] ]
@@ -265,9 +262,9 @@ export const dynamicRoutes = [
path: 'role/:userId(\\d+)', path: 'role/:userId(\\d+)',
component: () => import('@/views/system/user/authRole'), component: () => import('@/views/system/user/authRole'),
name: 'AuthRole', name: 'AuthRole',
meta: { title: '分配角色', activeMenu: '/system/user' }, meta: { title: '分配角色', activeMenu: '/system/user' }
}, }
], ]
}, },
{ {
path: '/system/role-auth', path: '/system/role-auth',
@@ -279,9 +276,9 @@ export const dynamicRoutes = [
path: 'user/:roleId(\\d+)', path: 'user/:roleId(\\d+)',
component: () => import('@/views/system/role/authUser'), component: () => import('@/views/system/role/authUser'),
name: 'AuthUser', name: 'AuthUser',
meta: { title: '分配用户', activeMenu: '/system/role' }, meta: { title: '分配用户', activeMenu: '/system/role' }
}, }
], ]
}, },
{ {
path: '/system/dict-data', path: '/system/dict-data',
@@ -293,9 +290,9 @@ export const dynamicRoutes = [
path: 'index/:dictId(\\d+)', path: 'index/:dictId(\\d+)',
component: () => import('@/views/system/dict/data'), component: () => import('@/views/system/dict/data'),
name: 'Data', name: 'Data',
meta: { title: '字典数据', activeMenu: '/system/dict' }, meta: { title: '字典数据', activeMenu: '/system/dict' }
}, }
], ]
}, },
{ {
path: '/monitor', path: '/monitor',
@@ -349,9 +346,9 @@ export const dynamicRoutes = [
path: 'index/:jobId(\\d+)', path: 'index/:jobId(\\d+)',
component: () => import('@/views/monitor/job/log'), component: () => import('@/views/monitor/job/log'),
name: 'JobLog', name: 'JobLog',
meta: { title: '调度日志', activeMenu: '/monitor/job' }, meta: { title: '调度日志', activeMenu: '/monitor/job' }
}, }
], ]
}, },
{ {
path: '/tool/gen-edit', path: '/tool/gen-edit',
@@ -384,9 +381,9 @@ const router = createRouter({
routes: allRoutes, routes: allRoutes,
scrollBehavior(to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
if (savedPosition) { if (savedPosition) {
return savedPosition; return savedPosition
} else { } else {
return { top: 0 }; return { top: 0 }
} }
}, },
}); });