修正ts类型

This commit is contained in:
Zy
2026-05-13 15:28:25 +08:00
parent 1b738c0f4d
commit a1750bc67b
114 changed files with 2346 additions and 613 deletions

View File

@@ -89,33 +89,45 @@ export const constantRoutes: RouteRecordRaw[] = [
{
path: '',
component: Layout,
redirect: '/index',
// redirect: '/index',
redirect: import.meta.env.VITE_LOGIN_BACK_URL,
// redirect: '/equipment/WaterDevice',
children: [
{
path: '/index',
component: () => import('@/views/workbench/index2.vue'),
name: 'Index',
// hidden: true,
meta: { title: '工作台', icon: 'dashboard', affix: true }
}
]
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: () => import('@/views/system/user/profile/index.vue'),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' }
}
// {
// path: '/index',
// component: () => import('@/views/workbench/index2.vue'),
// name: 'Index',
// // hidden: true,
// meta: { title: '工作台', icon: 'dashboard', affix: true }
// }
]
}
// {
// path: '/user',
// component: Layout,
// hidden: true,
// redirect: 'noredirect',
// children: [
// {
// path: 'profile',
// component: () => import('@/views/system/user/profile/index.vue'),
// name: 'Profile',
// meta: { title: '个人中心', icon: 'user' }
// }
// ]
// }
];
if (import.meta.env.VITE_APP_SHOW_WORK_PLATFORM === 'true') {
const find = constantRoutes.find((item) => item.path === '');
if (find) {
find.children?.push({
path: '/index',
component: () => import('@/views/workbench/index2.vue'),
name: 'Index',
meta: { title: '工作台', icon: 'dashboard', affix: true }
});
}
}
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes: RouteRecordRaw[] = [];