|
|
|
@ -9,6 +9,10 @@ import Layout from '@/layout/index.vue' |
|
|
|
// import chartsRouter from './modules/charts'
|
|
|
|
// import tableRouter from './modules/table'
|
|
|
|
// import nestedRouter from './modules/nested'
|
|
|
|
import taskRouter from './modules/task' |
|
|
|
import adminRouter from './modules/admin' |
|
|
|
import apigatewayRouter from './modules/apigateway' |
|
|
|
import identityServerRouter from './modules/identityServer' |
|
|
|
|
|
|
|
Vue.use(Router) |
|
|
|
|
|
|
|
@ -88,273 +92,10 @@ export const constantRoutes: RouteConfig[] = [ |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// // {
|
|
|
|
// // path: '/documentation',
|
|
|
|
// // component: Layout,
|
|
|
|
// // children: [
|
|
|
|
// // {
|
|
|
|
// // path: 'index',
|
|
|
|
// // component: () => import(/* webpackChunkName: "documentation" */ '@/views/documentation/index.vue'),
|
|
|
|
// // name: 'Documentation',
|
|
|
|
// // meta: { title: 'documentation', icon: 'documentation', affix: true }
|
|
|
|
// // }
|
|
|
|
// // ]
|
|
|
|
// // },
|
|
|
|
// {
|
|
|
|
// path: '/guide',
|
|
|
|
// component: Layout,
|
|
|
|
// redirect: '/guide/index',
|
|
|
|
// children: [
|
|
|
|
// {
|
|
|
|
// path: 'index',
|
|
|
|
// component: () => import(/* webpackChunkName: "guide" */ '@/views/guide/index.vue'),
|
|
|
|
// name: 'Guide',
|
|
|
|
// meta: {
|
|
|
|
// title: 'guide',
|
|
|
|
// icon: 'guide',
|
|
|
|
// noCache: true
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
path: '/icon', |
|
|
|
component: Layout, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'index', |
|
|
|
component: () => import(/* webpackChunkName: "icons" */ '@/views/icons/index.vue'), |
|
|
|
name: 'Icons', |
|
|
|
meta: { |
|
|
|
title: 'icons', |
|
|
|
icon: 'icon', |
|
|
|
noCache: true |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
/** when your routing map is too long, you can split it into small modules **/ |
|
|
|
// componentsRouter,
|
|
|
|
// chartsRouter,
|
|
|
|
// nestedRouter,
|
|
|
|
// tableRouter,
|
|
|
|
{ |
|
|
|
path: '/error', |
|
|
|
component: Layout, |
|
|
|
redirect: 'noredirect', |
|
|
|
meta: { |
|
|
|
title: 'errorPages', |
|
|
|
icon: '404' |
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: '401', |
|
|
|
component: () => import(/* webpackChunkName: "error-page-401" */ '@/views/error-page/401.vue'), |
|
|
|
name: 'Page401', |
|
|
|
meta: { |
|
|
|
title: 'page401', |
|
|
|
noCache: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '404', |
|
|
|
component: () => import(/* webpackChunkName: "error-page-404" */ '@/views/error-page/404.vue'), |
|
|
|
name: 'Page404', |
|
|
|
meta: { |
|
|
|
title: 'page404', |
|
|
|
noCache: true |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
export const asyncRoutes: RouteConfig[] = [ |
|
|
|
{ |
|
|
|
path: '/task', |
|
|
|
component: Layout, |
|
|
|
redirect: '/task', |
|
|
|
meta: { |
|
|
|
title: 'tasks', |
|
|
|
icon: 'lock', |
|
|
|
roles: ['AbpIdentity.Roles', 'TaskManagement.Task'], // you can set roles in root nav
|
|
|
|
alwaysShow: true // will always show the root menu
|
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'list', |
|
|
|
component: () => import(/* webpackChunkName: "permission-page" */ '@/views/task/index.vue'), |
|
|
|
name: 'tasks', |
|
|
|
meta: { |
|
|
|
title: 'tasks', |
|
|
|
roles: ['AbpIdentity.Roles', 'TaskManagement.Task'] // or you can only set roles in sub nav
|
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/permission', |
|
|
|
component: Layout, |
|
|
|
redirect: '/permission/directive', |
|
|
|
meta: { |
|
|
|
title: 'permission', |
|
|
|
icon: 'lock', |
|
|
|
roles: ['admin', 'editor', 'AbpIdentity.Roles'], // you can set roles in root nav
|
|
|
|
alwaysShow: true // will always show the root menu
|
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'page', |
|
|
|
component: () => import(/* webpackChunkName: "permission-page" */ '@/views/permission/page.vue'), |
|
|
|
name: 'PagePermission', |
|
|
|
meta: { |
|
|
|
title: 'pagePermission', |
|
|
|
roles: ['admin'] // or you can only set roles in sub nav
|
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'directive', |
|
|
|
component: () => import(/* webpackChunkName: "permission-directive" */ '@/views/permission/directive.vue'), |
|
|
|
name: 'DirectivePermission', |
|
|
|
meta: { |
|
|
|
title: 'directivePermission' |
|
|
|
// if do not set roles, means: this page does not require permission
|
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'role', |
|
|
|
component: () => import(/* webpackChunkName: "permission-role" */ '@/views/permission/role.vue'), |
|
|
|
name: 'RolePermission', |
|
|
|
meta: { |
|
|
|
title: 'rolePermission', |
|
|
|
roles: ['admin'] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/i18n', |
|
|
|
component: Layout, |
|
|
|
meta: { |
|
|
|
roles: ['AbpIdentity.Roles'] |
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'index', |
|
|
|
component: () => import('@/views/i18n-demo/index.vue'), |
|
|
|
name: 'I18n', |
|
|
|
meta: { |
|
|
|
title: 'i18n', |
|
|
|
icon: 'international' |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/apigateway', |
|
|
|
component: Layout, |
|
|
|
meta: { |
|
|
|
title: 'apigateway', |
|
|
|
icon: 'manager', |
|
|
|
roles: ['ApiGateway.RouteGroup', 'ApiGateway.Global', 'ApiGateway.Route', 'ApiGateway.DynamicRoute', 'ApiGateway.AggregateRoute'], |
|
|
|
alwaysShow: true |
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'group', |
|
|
|
component: () => import('@/views/admin/apigateway/group.vue'), |
|
|
|
name: 'group', |
|
|
|
meta: { |
|
|
|
title: 'group', |
|
|
|
icon: 'group', |
|
|
|
roles: ['ApiGateway.RouteGroup'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'global', |
|
|
|
component: () => import('@/views/admin/apigateway/global.vue'), |
|
|
|
name: 'global', |
|
|
|
meta: { |
|
|
|
title: 'global', |
|
|
|
icon: 'global', |
|
|
|
roles: ['ApiGateway.Global'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'route', |
|
|
|
component: () => import('@/views/admin/apigateway/route.vue'), |
|
|
|
name: 'route', |
|
|
|
meta: { |
|
|
|
title: 'route', |
|
|
|
icon: 'route', |
|
|
|
roles: ['ApiGateway.Route'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'aggregateRoute', |
|
|
|
component: () => import('@/views/admin/apigateway/aggregateRoute.vue'), |
|
|
|
name: 'aggregateRoute', |
|
|
|
meta: { |
|
|
|
title: 'aggregateRoute', |
|
|
|
icon: 'aggregateRoute', |
|
|
|
roles: ['ApiGateway.AggregateRoute'] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/admin', |
|
|
|
component: Layout, |
|
|
|
meta: { |
|
|
|
title: 'admin', |
|
|
|
icon: 'manager', |
|
|
|
roles: ['AbpIdentity.Users', 'AbpIdentity.Roles', 'AbpSettingManagement.Settings', 'AbpTenantManagement.Tenants'], // you can set roles in root nav
|
|
|
|
alwaysShow: true // will always show the root menu
|
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'settings', |
|
|
|
component: () => import('@/views/admin/settings/index.vue'), |
|
|
|
name: 'settings', |
|
|
|
meta: { |
|
|
|
title: 'settings', |
|
|
|
icon: 'setting', |
|
|
|
roles: ['AbpSettingManagement.Settings'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'users', |
|
|
|
component: () => import('@/views/admin/users/index.vue'), |
|
|
|
name: 'users', |
|
|
|
meta: { |
|
|
|
title: 'users', |
|
|
|
icon: 'user', |
|
|
|
roles: ['AbpIdentity.Users'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'roles', |
|
|
|
component: () => import('@/views/admin/roles/index.vue'), |
|
|
|
name: 'roles', |
|
|
|
meta: { |
|
|
|
title: 'roles', |
|
|
|
icon: 'role', |
|
|
|
roles: ['AbpIdentity.Roles'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'tenants', |
|
|
|
component: () => import('@/views/admin/tenants/index.vue'), |
|
|
|
name: 'tenants', |
|
|
|
meta: { |
|
|
|
title: 'tenants', |
|
|
|
icon: 'tenants', |
|
|
|
roles: ['AbpTenantManagement.Tenants'] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/profile', |
|
|
|
component: Layout, |
|
|
|
@ -373,48 +114,10 @@ export const asyncRoutes: RouteConfig[] = [ |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/identityServer', |
|
|
|
component: Layout, |
|
|
|
meta: { |
|
|
|
title: 'identityServer', |
|
|
|
icon: 'manager', |
|
|
|
roles: ['IdentityServer.Clients', 'IdentityServer.ApiResources', 'IdentityServer.IdentityResources'], |
|
|
|
alwaysShow: true |
|
|
|
}, |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
path: 'clients', |
|
|
|
component: () => import('@/views/admin/identityServer/client/index.vue'), |
|
|
|
name: 'clients', |
|
|
|
meta: { |
|
|
|
title: 'clients', |
|
|
|
icon: 'clients', |
|
|
|
roles: ['IdentityServer.Clients'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'apiresources', |
|
|
|
component: () => import('@/views/admin/identityServer/api-resources/index.vue'), |
|
|
|
name: 'apiresources', |
|
|
|
meta: { |
|
|
|
title: 'apiresources', |
|
|
|
icon: 'apiresources', |
|
|
|
roles: ['IdentityServer.ApiResources'] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'identityresources', |
|
|
|
component: () => import('@/views/admin/identityServer/identity-resources/index.vue'), |
|
|
|
name: 'identityresources', |
|
|
|
meta: { |
|
|
|
title: 'identityresources', |
|
|
|
icon: 'identityresources', |
|
|
|
roles: ['IdentityServer.IdentityResources'] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
taskRouter, |
|
|
|
adminRouter, |
|
|
|
apigatewayRouter, |
|
|
|
identityServerRouter, |
|
|
|
{ |
|
|
|
path: '*', |
|
|
|
component: () => import(/* webpackChunkName: "error-page-404" */ '@/views/error-page/404.vue'), |
|
|
|
|