first commit

This commit is contained in:
muzi
2025-06-16 14:42:26 +08:00
commit 6f06721506
149 changed files with 56883 additions and 0 deletions

50
src/router/index.ts Normal file
View File

@ -0,0 +1,50 @@
/*
* @Author: 田鑫
* @Date: 2023-03-05 18:14:17
* @LastEditors: 田鑫
* @LastEditTime: 2023-03-05 19:20:40
* @Description:
*/
import { createRouter, createWebHistory } from 'vue-router';
import { appRoutes } from './routes';
import { REDIRECT_MAIN, NOT_FOUND_ROUTE } from './routes/base';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import createRouteGuard from './guard';
NProgress.configure({ showSpinner: false }); // NProgress Configuration
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'workplace',
component: () => import('@/views/components/workplace'),
},
{
path: '/dataEngine',
name: 'dataEngine',
redirect: '@/views/components/dataEngine',
children: [...appRoutes, REDIRECT_MAIN, NOT_FOUND_ROUTE],
},
{
path: '/permission',
name: 'permission',
component: () => import('@/views/components/permission/choose-enterprise.vue'),
},
{
path: '/auth',
name: 'auth',
component: () => import('@/views/components/permission/auth.vue'),
},
],
scrollBehavior() {
return { top: 0 };
},
});
createRouteGuard(router);
export default router;