修正可以显示出主页

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="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>
<!--[if lt IE 11
]><script>

View File

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