|
@@ -19,7 +19,8 @@ export const registerComponent = (componentPath: string) => {
|
|
|
}
|
|
|
/* Layout */
|
|
|
export const Layout = () => import('@/layout/Layout.vue')
|
|
|
-
|
|
|
+/* oaLayout */
|
|
|
+export const OaLayout = () => import('@/views/OaSystem/oaLayout/index.vue')
|
|
|
export const getParentLayout = () => {
|
|
|
return () =>
|
|
|
new Promise((resolve) => {
|
|
@@ -63,6 +64,8 @@ export const getRawRoute = (route: RouteLocationNormalized): RouteLocationNormal
|
|
|
export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecordRaw[] => {
|
|
|
const res: AppRouteRecordRaw[] = []
|
|
|
const modulesRoutesKeys = Object.keys(modules)
|
|
|
+ console.log(routes)
|
|
|
+
|
|
|
for (const route of routes) {
|
|
|
const meta = {
|
|
|
title: route.name,
|
|
@@ -108,8 +111,13 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord
|
|
|
} else {
|
|
|
// 目录
|
|
|
if (route.children) {
|
|
|
- data.component = Layout
|
|
|
- data.redirect = getRedirect(route.path, route.children)
|
|
|
+ if (route.path == '/oaSystem') {
|
|
|
+ data.component = OaLayout
|
|
|
+ data.redirect = getRedirect(route.path, route.children)
|
|
|
+ } else {
|
|
|
+ data.component = Layout
|
|
|
+ data.redirect = getRedirect(route.path, route.children)
|
|
|
+ }
|
|
|
// 外链
|
|
|
} else if (isUrl(route.path)) {
|
|
|
data = {
|