You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
3.8 KiB

3 years ago
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import { ERouterName } from '/@/types/index'
3 years ago
import CreatePlan from '../pages/project-app/projects/create-plan.vue'
import WaylinePanel from '/@/pages/project-app/projects/wayline.vue'
import DockPanel from '/@/pages/project-app/projects/dock.vue'
import LiveAgora from '/@/components/livestream-agora.vue'
import LiveOthers from '/@/components/livestream-others.vue'
3 years ago
const routes: Array<RouteRecordRaw> = [
{
3 years ago
path: '/',
redirect: '/' + ERouterName.PROJECT
},
{
path: '/' + ERouterName.PROJECT,
name: ERouterName.PROJECT,
component: () => import('/@/pages/project-app/index.vue')
},
{
path: '/' + ERouterName.HOME,
name: ERouterName.HOME,
component: () => import('/@/pages/project-app/home.vue'),
children: [
{
path: '/' + ERouterName.MEMBERS,
name: ERouterName.MEMBERS,
component: () => import('/@/pages/project-app/projects/members.vue')
},
{
path: '/' + ERouterName.DEVICES,
name: ERouterName.DEVICES,
component: () => import('/@/pages/project-app/projects/devices.vue')
}
]
},
{
path: '/' + ERouterName.WORKSPACE,
name: ERouterName.WORKSPACE,
component: () => import('/@/pages/project-app/projects/workspace.vue'),
redirect: '/' + ERouterName.TSA,
3 years ago
children: [
{
3 years ago
path: '/' + ERouterName.LIVESTREAM,
name: ERouterName.LIVESTREAM,
component: () => import('/@/pages/project-app/projects/livestream.vue'),
children: [
{
path: ERouterName.LIVING,
name: ERouterName.LIVING,
components: {
LiveAgora,
LiveOthers
}
}
]
3 years ago
},
{
3 years ago
path: '/' + ERouterName.TSA,
3 years ago
component: () => import('/@/pages/project-app/projects/tsa.vue')
},
{
3 years ago
path: '/' + ERouterName.LAYER,
name: ERouterName.LAYER,
3 years ago
component: () => import('/@/pages/project-app/projects/layer.vue')
},
{
3 years ago
path: '/' + ERouterName.MEDIA,
name: ERouterName.MEDIA,
3 years ago
component: () => import('/@/pages/project-app/projects/media.vue')
},
{
3 years ago
path: '/' + ERouterName.WAYLINE,
name: ERouterName.WAYLINE,
3 years ago
component: () => import('/@/pages/project-app/projects/wayline.vue')
},
3 years ago
{
path: '/' + ERouterName.TASK,
name: ERouterName.TASK,
component: () => import('/@/pages/project-app/projects/task.vue'),
children: [
{
path: ERouterName.CREATE_PLAN,
name: ERouterName.CREATE_PLAN,
component: CreatePlan,
children: [
{
path: ERouterName.SELECT_PLAN,
name: ERouterName.SELECT_PLAN,
components: {
WaylinePanel,
DockPanel
}
}
]
}
]
}
3 years ago
]
},
{
3 years ago
path: '/' + ERouterName.PILOT,
name: ERouterName.PILOT,
3 years ago
component: () => import('/@/pages/page-pilot/pilot-index.vue'),
},
{
3 years ago
path: '/' + ERouterName.PILOT_HOME,
3 years ago
component: () => import('/@/pages/page-pilot/pilot-home.vue')
},
{
3 years ago
path: '/' + ERouterName.PILOT_MEDIA,
3 years ago
component: () => import('/@/pages/page-pilot/pilot-media.vue')
},
{
3 years ago
path: '/' + ERouterName.PILOT_LIVESHARE,
3 years ago
component: () => import('/@/pages/page-pilot/pilot-liveshare.vue')
},
{
3 years ago
path: '/' + ERouterName.PILOT_BIND,
component: () => import('/@/pages/page-pilot/pilot-bind.vue')
},
{
path: '/' + ERouterName.ELEMENT,
name: ERouterName.ELEMENT,
3 years ago
component: () => import('/@/pages/elements/elements.vue')
}
]
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes
})
export default router