1006 lines
22 KiB
JavaScript
1006 lines
22 KiB
JavaScript
import Vue from 'vue';
|
|
import Router from 'vue-router';
|
|
|
|
Vue.use(Router);
|
|
|
|
/* Layout */
|
|
import Layout from '@/layout';
|
|
import LoginNew from '@/views/login/loginNew';
|
|
import Login from '@/views/login/index';
|
|
import LoginNewScreen from '@/views/login/loginNewScreen';
|
|
import LoginScreen from '@/views/login/loginScreen';
|
|
import LoginNewPlan from '@/views/login/loginNewPlan';
|
|
import LoginPlan from '@/views/login/loginPlan';
|
|
import LoginDesign from '@/views/login/loginDesign';
|
|
|
|
import Jlmap3dedit from '@/views/jlmap3d/edit/jlmap3dedit';
|
|
import Jlmap3d from '@/views/jlmap3d/drive/jl3ddrive';
|
|
import Display from '@/views/display/index';
|
|
import TrainRoom from '@/views/trainRoom/index';
|
|
import JointTraining from '@/views/jointTraining/index';
|
|
|
|
import Error401 from '@/views/error-page/401';
|
|
import Errpr404 from '@/views/error-page/404';
|
|
|
|
import SkinCode from '@/views/map/skinCode/index';
|
|
import SkinCodeDraft from '@/views/map/skinCode/draft';
|
|
import Mapdraft from '@/views/map/mapdraft/index';
|
|
import Mapedit from '@/views/map/mapdraft/mapedit/index';
|
|
import Runplan from '@/views/map/runplan/index';
|
|
import MapProduct from '@/views/map/product/index';
|
|
import RunplanView from '@/views/map/runplan/chart';
|
|
import Trainingrecord from '@/views/lesson/trainingrecord/index';
|
|
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
|
|
import Taskmanage from '@/views/lesson/taskmanage/list';
|
|
import TrainingRuleList from '@/views/lesson/trainingRule/list';
|
|
import TrainingRuleEdit from '@/views/lesson/trainingRule/detail/index';
|
|
import Trainingmanage from '@/views/lesson/trainingmanage/index';
|
|
import Lessoncategory from '@/views/lesson/lessoncategory/index';
|
|
import LessonHome from '@/views/lesson/home';
|
|
import LessonManage from '@/views/lesson/index';
|
|
|
|
import ScriptmanageHome from '@/views/scriptManage/home';
|
|
import ScriptDisplay from '@/views/scriptManage/display/index';
|
|
|
|
import TeachDetail from '@/views/teach/detail/index';
|
|
import TeachPractical from '@/views/teach/practical/index';
|
|
import Pay from '@/views/components/pay/index';
|
|
import ExamDetail from '@/views/exam/detail/examDetail';
|
|
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
|
import ExamResult from '@/views/exam/result';
|
|
|
|
import PublishExamRule from '@/views/publish/examRule/index';
|
|
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index';
|
|
|
|
import DemonstrationDetail from '@/views/demonstration/detail/index';
|
|
import ScreenMonitor from '@/views/screenMonitor/index';
|
|
import ScreenMonitorHome from '@/views/screenMonitor/home';
|
|
import ScreenMonitorDetail from '@/views/screenMonitor/detail/index';
|
|
|
|
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
|
|
import PlanMonitor from '@/views/planMonitor/index';
|
|
import PlanMonitorHome from '@/views/planMonitor/home';
|
|
import PlanMonitorDetail from '@/views/planMonitor/detail';
|
|
|
|
import DesignPlatformHome from '@/views/designPlatform/home';
|
|
import DesignPlatform from '@/views/designPlatform/index';
|
|
|
|
import Replay from '@/views/replay/index';
|
|
import Package from '@/views/package/index';
|
|
import PackageDraft from '@/views/package/draft/ruleForm';
|
|
import PackageDetail from '@/views/package/detail';
|
|
|
|
import PublishMap from '@/views/publish/publishMap/index';
|
|
import PublishMapDraft from '@/views/publish/publishMap/draft';
|
|
import PublishMapDetail from '@/views/publish/publishMap/list';
|
|
import RunPlanCommon from '@/views/publish/runPlanCommon/index';
|
|
import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft';
|
|
import RunPlanTemplate from '@/views/publish/runPlanTemplate/index';
|
|
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
|
|
import ProductStatus from '@/views/publish/productStatus/index';
|
|
import PublishLesson from '@/views/publish/publishLesson/index';
|
|
|
|
import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index';
|
|
import TrainingPlatform from '@/views/trainingPlatform/index';
|
|
import TrainingPlatformHome from '@/views/trainingPlatform/home';
|
|
|
|
import Commodity from '@/views/orderauthor/commodity/index';
|
|
import CommodityDraft from '@/views/orderauthor/commodity/draft';
|
|
import OrderList from '@/views/orderauthor/order/list';
|
|
import OrderDraft from '@/views/orderauthor/order/draft';
|
|
import Author from '@/views/orderauthor/author/index';
|
|
import AuthorDraft from '@/views/orderauthor/author/draft/ruleForm';
|
|
|
|
import Permission from '@/views/orderauthor/permission/index';
|
|
import PermissionDetail from '@/views/orderauthor/permission/detail';
|
|
import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm';
|
|
import PermissionCreate from '@/views/orderauthor/permission/create/index';
|
|
|
|
import UserRules from '@/views/orderauthor/rules/index';
|
|
import UserRulesDetail from '@/views/orderauthor/rules/detail';
|
|
|
|
import Dictionary from '@/views/management/dictionary/index';
|
|
import DictionaryDetail from '@/views/management/dictionaryDetail/index';
|
|
import UserControl from '@/views/management/userControl/index';
|
|
import UserTraining from '@/views/management/userTraining/index';
|
|
import UserExam from '@/views/management/userExam/index';
|
|
import UserSimulation from '@/views/management/userSimulation/index';
|
|
import ExistingSimulation from '@/views/management/existingSimulation/index';
|
|
|
|
import CacheControl from '@/views/management/cacheControl/index';
|
|
|
|
/**
|
|
* Note: sub-menu only appear when route children.length >= 1
|
|
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|
*
|
|
* hidden: true if set true, item will not show in the sidebar(default is false)
|
|
* alwaysShow: true if set true, will always show the root menu
|
|
* if not set alwaysShow, when item has more than one children route,
|
|
* it will becomes nested mode, otherwise not show the root menu
|
|
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
|
|
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
|
* meta : {
|
|
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
|
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
|
icon: 'svg-name' the icon show in the sidebar
|
|
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
|
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
}
|
|
*/
|
|
|
|
export const user = '01'; // 普通用户
|
|
export const mapCreater = '02'; // 地图创建权限
|
|
export const lessonCreater = '03'; // 课程创建权限
|
|
export const admin = '04'; // 管理员
|
|
export const superAdmin = '05'; // 超级管理员
|
|
|
|
export const userExam = '011'; // 考试系统
|
|
export const userLesson = '012'; // 教学系统
|
|
export const userSimulation = '013'; // 仿真系统
|
|
export const userScreen = '014'; // 大屏系统
|
|
export const userPlan = '015'; // 计划系统
|
|
export const userDesign='016'; // 设计系统
|
|
|
|
export const UrlConfig = {
|
|
display: '/display',
|
|
scriptDisplay: '/scriptDisplay',
|
|
examRuleDraft: '/examRule/draft',
|
|
examRuleManage: '/examRule/manage',
|
|
map: {
|
|
prefix: '/map',
|
|
draft: '/map/draw',
|
|
skinCode: '/system/skinCode',
|
|
skinCodeDraft: '/system/skinCode/draft',
|
|
runPlan: '/map/runPlan',
|
|
runPlanView: '/map/runPlan/view',
|
|
product: '/map/product',
|
|
productDraft: '/map/product/draft'
|
|
},
|
|
lesson: {
|
|
prefix: '/lesson',
|
|
record: '/lesson/record/training',
|
|
manage: '/lesson/manage/training'
|
|
},
|
|
dp: {
|
|
prefix: '/dp',
|
|
detail: '/dp/detail',
|
|
pay: '/dp/pay'
|
|
|
|
},
|
|
plan: {
|
|
prefix: '/plan',
|
|
tool: '/plan/tool',
|
|
detail: '/plan/detail',
|
|
pay: '/plan/pay'
|
|
},
|
|
design: {
|
|
prefix: '/design',
|
|
// tool: '/design/tool',
|
|
// detail: '/plan/detail',
|
|
// pay: '/plan/pay'
|
|
mapDraw: '/design/map/draw',
|
|
lessonEdit: '/design/lesson/edit',
|
|
lessonHome: '/design/lesson/home',
|
|
lessonManage: '/design/lesson/manage',
|
|
lessonTraining: '/design/lesson/training',
|
|
runPlan: '/design/runPlan/detail',
|
|
scriptHome: '/design/script/home'
|
|
},
|
|
replay: {
|
|
prefix: '/replay'
|
|
},
|
|
publish: {
|
|
prefix: '/publish',
|
|
map: '/publish/map',
|
|
mapDraft: '/publish/map/draft',
|
|
runPlanEveryDay: '/publish/runPlan/everyDay',
|
|
runPlanTemplate: '/publish/runPlan/template',
|
|
runPlanCommon: '/publish/runPlan/common',
|
|
runPlanView: '/publish/runPlan/view'
|
|
},
|
|
orderauthor: {
|
|
prefix: '/orderauthor',
|
|
commodityManage: '/orderauthor/commodity/manage',
|
|
commodityDraft: '/orderauthor/commodity/draft',
|
|
orderManage: '/orderauthor/order/manage',
|
|
orderDraft: '/orderauthor/order/draft',
|
|
authorMange: '/orderauthor/author/manage',
|
|
authorDetail: '/orderauthor/author/detail',
|
|
authorDraft: '/orderauthor/author/draft',
|
|
transferDetail: '/orderauthor/transfer/detail',
|
|
trainferPackage: '/orderauthor/transfer/package',
|
|
createPackage: '/orderauthor/transfer/create'
|
|
},
|
|
script: {
|
|
prefix: '/script',
|
|
detail: '/script/detail',
|
|
display: '/script/display'
|
|
},
|
|
ibp: {
|
|
prefix: 'ibp',
|
|
draft: '/ibp/draft',
|
|
edit: 'ibp/edit'
|
|
},
|
|
trainingPlatform: {
|
|
trainingPlatform: '/trainingPlatform',
|
|
trainingPlatformHome: '/trainingPlatform/home',
|
|
prodDetail: '/trainingPlatform/detail',
|
|
teachDetail: '/trainingPlatform/teach',
|
|
examDetail: '/trainingPlatform/exam',
|
|
examRuleManage: '/trainingPlatform/examRule/manage',
|
|
examRuleDraft: '/trainingPlatform/examRule/Draft',
|
|
course: '/trainingPlatform/course',
|
|
practical: '/trainingPlatform/practical',
|
|
permission: '/trainingPlatform/permission',
|
|
permissionDetails: '/trainingPlatform/permission/detail',
|
|
draft: '/trainingPlatform/draft',
|
|
pay: '/trainingPlatform/pay'
|
|
}
|
|
};
|
|
|
|
/**
|
|
* constantRoutes
|
|
* a base page that does not have permission requirements
|
|
* all roles can be accessed
|
|
*/
|
|
export const constantRoutes = [
|
|
{
|
|
path: '/login',
|
|
component: LoginNew,
|
|
hidden: true
|
|
},
|
|
|
|
{
|
|
path: '/login1',
|
|
component: Login,
|
|
hidden: true
|
|
},
|
|
// 扫码登录
|
|
{
|
|
path: '/dp/login',
|
|
component: LoginNewScreen,
|
|
hidden: true
|
|
},
|
|
// 密码登录
|
|
{
|
|
path: '/dp/login1',
|
|
component: LoginScreen,
|
|
hidden: true
|
|
},
|
|
// 扫码登录
|
|
{
|
|
path: '/plan/login',
|
|
component: LoginNewPlan,
|
|
hidden: true
|
|
},
|
|
// 密码登录
|
|
{
|
|
path: '/plan/login1',
|
|
component: LoginPlan,
|
|
hidden: true
|
|
},
|
|
// 密码登录
|
|
{
|
|
path: '/design/login1',
|
|
component: LoginDesign,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/jlmap3d/edit',
|
|
component: Jlmap3dedit,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/401',
|
|
component: Error401,
|
|
hidden: true
|
|
},
|
|
|
|
{
|
|
path: '/404',
|
|
component: Errpr404,
|
|
hidden: true
|
|
},
|
|
|
|
// {
|
|
// path: '/',
|
|
// component: Layout,
|
|
// redirect: '/dashboard',
|
|
// meta: {
|
|
// roles: [admin, user]
|
|
// },
|
|
// children: [{
|
|
// path: 'dashboard',
|
|
// component: Dashboard,
|
|
// meta: {
|
|
// i18n: 'router.homePage',
|
|
// icon: 'dashboard'
|
|
// }
|
|
// }]
|
|
// },
|
|
|
|
{ path: '*', redirect: '/404', hidden: true }
|
|
];
|
|
|
|
export const asyncRouter = [
|
|
{
|
|
path: '/design',
|
|
component: Layout,
|
|
hidden: true,
|
|
meta: {
|
|
roles: [admin, user, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: '',
|
|
redirect: '/design/home',
|
|
component: DesignPlatform,
|
|
meta: {
|
|
},
|
|
children: [
|
|
{
|
|
path: 'home',
|
|
component: DesignPlatformHome,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'map/draw/:mapId/:view',
|
|
component: Mapedit,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'lesson/edit',
|
|
component: Lessoncategory,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'runPlan/detail/:lessonId',
|
|
component: PlanMonitorDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'script/home/:mapId',
|
|
component: ScriptmanageHome,
|
|
meta: {
|
|
i18n: 'router.scriptManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'lesson/home',
|
|
component: LessonHome,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'lesson/manage',
|
|
component: LessonManage,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'lesson/training/:trainingId/:trainingName',
|
|
component: TrainingrecordManage,
|
|
hidden: true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/display/:mode',
|
|
component: Display,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/scriptDisplay/:mode',
|
|
component: ScriptDisplay,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/trainroom',
|
|
component: TrainRoom,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/jointTraining',
|
|
component: JointTraining,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/jlmap3d',
|
|
component: Jlmap3d,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/map',
|
|
meta: {
|
|
i18n: 'router.mapManage',
|
|
roles: [admin, mapCreater, userDesign]
|
|
},
|
|
hidden: true,
|
|
component: Layout,
|
|
children: [
|
|
// {
|
|
// path: 'skinCode',
|
|
// component: SkinCode,
|
|
// meta: {
|
|
// i18n: 'router.skinManage'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'skinCode/draft/:mode/:skinCodeId',
|
|
// hidden: true,
|
|
// component: SkinCodeDraft
|
|
// },
|
|
{
|
|
path: 'draw',
|
|
redirect: '/map/draw/0/draft',
|
|
component: Mapdraft,
|
|
meta: {
|
|
i18n: 'router.mapDraw'
|
|
},
|
|
children: [
|
|
{
|
|
path: ':mapId/:view',
|
|
component: Mapedit,
|
|
hidden: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'runPlan',
|
|
redirect: '/map/runPlan/view/draft',
|
|
component: Runplan,
|
|
meta: {
|
|
i18n: 'router.runPlanManage'
|
|
},
|
|
children: [{
|
|
path: 'view/:mode',
|
|
component: RunplanView,
|
|
hidden: true
|
|
}]
|
|
},
|
|
{
|
|
path: 'product',
|
|
component: MapProduct,
|
|
meta: {
|
|
i18n: 'router.productEdit'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/lesson',
|
|
component: Layout,
|
|
hidden: true,
|
|
meta: {
|
|
i18n: 'router.lessaonManage',
|
|
roles: [admin, lessonCreater, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'record',
|
|
redirect: '/lesson/record/training/0/null',
|
|
component: Trainingrecord,
|
|
meta: {
|
|
i18n: 'router.trainingRecord'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'training/:trainingId/:trainingName',
|
|
component: TrainingrecordManage,
|
|
hidden: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'manage/taskManage',
|
|
component: Taskmanage,
|
|
meta: {
|
|
i18n: 'router.taskManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'manage/trainingRule',
|
|
component: TrainingRuleList,
|
|
meta: {
|
|
i18n: 'router.trainingRule'
|
|
}
|
|
},
|
|
{
|
|
path: 'manage/trainingRule/detail',
|
|
hidden: true,
|
|
component: TrainingRuleEdit,
|
|
meta: {
|
|
}
|
|
},
|
|
{
|
|
path: 'manage/training',
|
|
component: Trainingmanage,
|
|
meta: {
|
|
i18n: 'router.trainingManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'edit',
|
|
component: Lessoncategory,
|
|
meta: {
|
|
i18n: 'router.lessonEdit'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/trainingPlatform',
|
|
component: Layout,
|
|
hidden: true,
|
|
meta: {
|
|
roles: [admin, userSimulation, user]
|
|
},
|
|
children: [
|
|
{
|
|
path: '',
|
|
redirect: '/trainingPlatform/home',
|
|
component: TrainingPlatform,
|
|
meta: {
|
|
},
|
|
children: [
|
|
{
|
|
path: 'home',
|
|
redirect: '/trainingPlatform/permission/14',
|
|
component: TrainingPlatformHome,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'detail/:mapId',
|
|
component: DemonstrationDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'teach',
|
|
component: TeachDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'exam/:examId',
|
|
component: ExamDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'practical/:trainingId/:lessonId',
|
|
component: TeachPractical,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'pay/:lessonId',
|
|
component: Pay,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'course/:mapId',
|
|
component: ExamCourseDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'result/:userExamId',
|
|
component: ExamResult,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'permission/:mapId',
|
|
component: Package,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'permission/detail/:id',
|
|
component: PackageDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'draft',
|
|
component: PackageDraft,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'examRule/manage',
|
|
component: PublishExamRule,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
|
component: PublishExamRuleDraft,
|
|
hidden: true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/dp',
|
|
hidden: true,
|
|
redirect: '/dp/home',
|
|
component: ScreenMonitor,
|
|
meta: {
|
|
roles: [admin, userScreen, user]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'home',
|
|
component: ScreenMonitorHome,
|
|
meta: {
|
|
i18n: 'router.dpSystem'
|
|
},
|
|
target: true
|
|
},
|
|
{
|
|
path: 'detail/:lessonId',
|
|
component: ScreenMonitorDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'pay/:lessonId',
|
|
component: Pay,
|
|
hidden: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/plan/tool',
|
|
component: PlanMonitorEditTool,
|
|
meta: {
|
|
},
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/plan',
|
|
redirect: '/plan/home',
|
|
component: PlanMonitor,
|
|
hidden: true,
|
|
meta: {
|
|
roles: [admin, user, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'home',
|
|
component: PlanMonitorHome,
|
|
meta: {
|
|
i18n: 'router.planSystem'
|
|
},
|
|
target: true
|
|
},
|
|
{
|
|
path: 'detail/:lessonId',
|
|
component: PlanMonitorDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'pay/:lessonId',
|
|
component: Pay,
|
|
hidden: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/replay',
|
|
component: Layout,
|
|
hidden: true,
|
|
meta: {
|
|
roles: [admin, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'manage',
|
|
component: Replay,
|
|
meta: {
|
|
i18n: 'router.replayManage'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/publish',
|
|
component: Layout,
|
|
meta: {
|
|
i18n: 'router.pulishManage',
|
|
roles: [admin, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'map',
|
|
component: PublishMap,
|
|
meta: {
|
|
i18n: 'router.publishMapManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'map/detail',
|
|
hidden: true,
|
|
component: PublishMapDetail
|
|
},
|
|
{
|
|
path: 'product',
|
|
component: ProductStatus,
|
|
meta: {
|
|
i18n: 'router.productStateManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'lesson',
|
|
component: PublishLesson,
|
|
meta: {
|
|
i18n: 'router.publishLessonManage'
|
|
}
|
|
},
|
|
// {
|
|
// path: 'script',
|
|
// component: SimulationScript,
|
|
// meta: {
|
|
// title: '仿真脚本管理',
|
|
// }
|
|
// },
|
|
{
|
|
path: 'runPlan/template',
|
|
component: RunPlanTemplate,
|
|
meta: {
|
|
i18n: 'router.runPlanTemplateManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'runPlan/common',
|
|
component: RunPlanCommon,
|
|
meta: {
|
|
i18n: 'router.runPlanCommonManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'runPlan/everyDay',
|
|
component: RunPlanEveryDay,
|
|
meta: {
|
|
i18n: 'router.runPlanEveryDayManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'examRule/manage',
|
|
component: PublishExamRule,
|
|
meta: {
|
|
i18n: 'router.examRuleManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'map/draft/:mode/:mapId',
|
|
component: PublishMapDraft,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
|
component: PublishExamRuleDraft,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'runPlan/common/:mode',
|
|
component: RunPlanCommonDraft,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'runPlan/view/:mode',
|
|
component: RunplanView,
|
|
hidden: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/orderauthor',
|
|
component: Layout,
|
|
meta: {
|
|
i18n: 'router.orderAuthorityManage',
|
|
roles: [admin, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'author/manage',
|
|
component: Author,
|
|
meta: {
|
|
i18n: 'router.authorityManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'commodity/manage',
|
|
component: Commodity,
|
|
meta: {
|
|
i18n: 'router.commodityManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'order/manage',
|
|
component: OrderList,
|
|
meta: {
|
|
i18n: 'router.orderManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'transfer/manage',
|
|
component: Permission,
|
|
meta: {
|
|
i18n: 'router.authorityTransferManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'rules/manage',
|
|
component: UserRules,
|
|
meta: {
|
|
i18n: 'router.userRulesManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'rules/manage/detail/:id',
|
|
hidden: true,
|
|
component: UserRulesDetail,
|
|
meta: {
|
|
i18n: 'router.userRulesManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'commodity/draft/:mode/:commodityId',
|
|
hidden: true,
|
|
component: CommodityDraft,
|
|
meta: {
|
|
i18n: 'router.addCommodity'
|
|
}
|
|
},
|
|
{
|
|
path: 'order/draft/:mode/:orderId',
|
|
hidden: true,
|
|
component: OrderDraft,
|
|
meta: {
|
|
i18n: 'router.addOrder'
|
|
}
|
|
},
|
|
{
|
|
path: 'author/manage/rules',
|
|
hidden: true,
|
|
component: AuthorDraft,
|
|
meta: {
|
|
i18n: 'router.addCoursePermissions'
|
|
}
|
|
},
|
|
{
|
|
path: 'transfer/detail/:permissionId',
|
|
component: PermissionDetail,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'transfer/package',
|
|
component: PermissionDraft,
|
|
hidden: true
|
|
},
|
|
{
|
|
path: 'transfer/create',
|
|
component: PermissionCreate,
|
|
hidden: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/system',
|
|
component: Layout,
|
|
meta: {
|
|
i18n: 'router.systemManage',
|
|
roles: [admin, userDesign]
|
|
},
|
|
children: [
|
|
{
|
|
path: 'skinCode',
|
|
component: SkinCode,
|
|
meta: {
|
|
i18n: 'router.skinManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'skinCode/draft/:mode/:skinCodeId',
|
|
hidden: true,
|
|
component: SkinCodeDraft
|
|
},
|
|
{
|
|
path: 'ibp/edit',
|
|
component: IbpEdit,
|
|
meta: {
|
|
i18n: 'router.ibpDraw'
|
|
}
|
|
},
|
|
{
|
|
path: 'dictionary',
|
|
component: Dictionary,
|
|
meta: {
|
|
i18n: 'router.dataDictionary'
|
|
}
|
|
},
|
|
{
|
|
path: 'dictionary/detail',
|
|
hidden: true,
|
|
component: DictionaryDetail,
|
|
meta: {
|
|
i18n: 'router.dataDictionaryDetails'
|
|
}
|
|
},
|
|
{
|
|
path: 'userManage',
|
|
component: UserControl,
|
|
meta: {
|
|
i18n: 'router.userManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'cache',
|
|
component: CacheControl,
|
|
meta: {
|
|
i18n: 'router.cacheManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'userTrainingManage',
|
|
component: UserTraining,
|
|
meta: {
|
|
i18n: 'router.userTrainingManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'userExamManage',
|
|
component: UserExam,
|
|
meta: {
|
|
i18n: 'router.userExamManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'userSimulationManage',
|
|
component: UserSimulation,
|
|
meta: {
|
|
i18n: 'router.userSimulationManage'
|
|
}
|
|
},
|
|
{
|
|
path: 'existingSimulation',
|
|
component: ExistingSimulation,
|
|
meta: {
|
|
i18n: 'router.existingSimulation'
|
|
}
|
|
}
|
|
]
|
|
}
|
|
];
|
|
|
|
const createRouter = () => new Router({
|
|
mode: 'history', // require service support
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
routes: constantRoutes
|
|
});
|
|
|
|
const router = createRouter();
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
const name = to.fullPath;
|
|
if (name.includes('/dp/') || name.includes('display/dp')) {
|
|
document.title = '琏课堂-大屏系统';
|
|
} else if (name.includes('/plan/') || name.includes('/planEdit/')) {
|
|
document.title = '琏计划';
|
|
} else if (name.includes('/trainingPlatform/')) {
|
|
document.title = '城市轨道交通实训平台';
|
|
} else if (name.includes('/design/')) {
|
|
document.title = '城市轨道交通设计平台';
|
|
} else {
|
|
document.title = '琏课堂';
|
|
}
|
|
next();
|
|
});
|
|
|
|
export default router;
|