兰宝车间质量管理系统-前端
gssong
2024-03-24 cd129aa949dff285cda41080523eb89b1f7b68be
src/router/index.ts
@@ -1,4 +1,4 @@
import { createWebHistory, createRouter, RouteOption } from 'vue-router';
import { createWebHistory, createRouter, RouteRecordRaw } from 'vue-router';
/* Layout */
import Layout from '@/layout/index.vue';
@@ -25,7 +25,7 @@
 */
// 公共路由
export const constantRoutes: RouteOption[] = [
export const constantRoutes: RouteRecordRaw[] = [
  {
    path: '/redirect',
    component: Layout,
@@ -38,9 +38,9 @@
    ]
  },
  {
    path: '/social-login',
    path: '/social-callback',
    hidden: true,
    component: () => import('@/layout/components/SocialLogin/index.vue')
    component: () => import('@/layout/components/SocialCallback/index.vue')
  },
  {
    path: '/login',
@@ -92,7 +92,7 @@
];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes: RouteOption[] = [
export const dynamicRoutes: RouteRecordRaw[] = [
  {
    path: '/system/user-auth',
    component: Layout,
@@ -139,7 +139,7 @@
    path: '/system/oss-config',
    component: Layout,
    hidden: true,
    permissions: ['system:oss:list'],
    permissions: ['system:ossConfig:list'],
    children: [
      {
        path: 'index',
@@ -162,6 +162,20 @@
        meta: { title: '修改生成配置', activeMenu: '/tool/gen', icon: '' }
      }
    ]
  },
  {
    path: '/demo/leaveEdit',
    component: Layout,
    hidden: true,
    permissions: ['demo:leave:edit'],
    children: [
      {
        path: 'index',
        component: () => import('@/views/workflow/leave/leaveEdit.vue'),
        name: 'leaveEdit',
        meta: { title: '请假申请', activeMenu: '/demo/leave',noCache:true },
      }
    ]
  }
];
@@ -180,6 +194,5 @@
    }
  }
});
export default router;