修改配置

This commit is contained in:
ival 2019-08-12 14:04:57 +08:00
parent 914b5d4e0e
commit ffd23c3adb
2 changed files with 187 additions and 1072 deletions

View File

@ -5,6 +5,95 @@ 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 Jlmap3dedit from '@/views/jlmap3d/jlmap3dedit';
import Jlmap3d from '@/views/jlmap3d/index';
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 Dashboard from '@/views/dashboard/index';
import Dashboard1 from '@/views/dashboard/index.vue';
import SkinStyle from '@/views/map/skinStyle/index';
import SkinStyleDraft from '@/views/map/skinStyle/draft';
import Mapdraft from '@/views/map/mapdraft/index';
import Mapedit from '@/views/map/mapdraft/mapedit/index';
import Runplan from '@/views/map/runplan/index';
import RunplanView from '@/views/map/runplan/chart';
import Trainingcategory from '@/views/lesson/trainingcategory/index';
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 Scriptmanage from '@/views/lesson/scriptmanage/list';
import Teach from '@/views/teach/index';
import TeachHome from '@/views/teach/home';
import TeachDetail from '@/views/teach/detail/index';
import TeachPractical from '@/views/teach/practical/index';
import Pay from '@/views/components/pay/index';
import Exam from '@/views/exam/index';
import ExamHome from '@/views/exam/home';
import ExamDetail from '@/views/exam/detail/examDetail';
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
import ExamQuestionDetail from '@/views/exam/detail/questionDetail';
import ExamResult from '@/views/exam/result';
import PublishExamRule from '@/views/publish/examRule/index';
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index';
import Demonstration from '@/views/demonstration/index';
import DemonstrationHome from '@/views/demonstration/home';
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 Replay from '@/views/replay/index';
import Package from '@/views/package/index';
import PackageDraft from '@/views/package/draft/ruleForm';
import PublishMap from '@/views/publish/publishMap/index';
import PublishMapDraft from '@/views/publish/publishMap/draft';
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 SimulationScript from '@/views/publish/simulationScript/index';
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';
import Permission from '@/views/orderauthor/permission/index';
import PermissionDetail from '@/views/orderauthor/permission/detail';
import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm';
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';
/**
* Note: sub-menu only appear when route children.length >= 1
@ -125,63 +214,63 @@ export const UrlConfig = {
export const constantRoutes = [
{
path: '/login',
components: import('@/views/login/loginNew'),
component: LoginNew,
hidden: true
},
{
path: '/login1',
components: import('@/views/login/index'),
component: Login,
hidden: true
},
// 扫码登录
{
path: '/dp/login',
components: import('@/views/login/loginNewScreen'),
component: LoginNewScreen,
hidden: true
},
// 密码登录
{
path: '/dp/login1',
components: import('@/views/login/loginScreen'),
component: LoginScreen,
hidden: true
},
// 扫码登录
{
path: '/plan/login',
components: import('@/views/login/loginNewPlan'),
component: LoginNewPlan,
hidden: true
},
// 密码登录
{
path: '/plan/login1',
components: import('@/views/login/loginPlan'),
component: LoginPlan,
hidden: true
},
{
path: '/jlmap3d/edit',
components: import('@/views/jlmap3d/jlmap3dedit'),
component: Jlmap3dedit,
hidden: true
},
{
path: '/401',
components: import('@/views/error-page/401'),
component: Error401,
hidden: true
},
{
path: '/404',
components: import('@/views/error-page/404'),
component: Errpr404,
hidden: true
},
{
path: '/',
components: Layout,
component: Layout,
redirect: '/dashboard',
children: [{
path: 'dashboard',
components: import('@/views/dashboard/index'),
component: Dashboard,
meta: {
i18n: 'router.homePage',
icon: 'dashboard'
@ -195,38 +284,38 @@ export const constantRoutes = [
export const asyncRouter = [
{
path: '/',
components: Layout,
component: Layout,
redirect: '/dashboard',
hidden: true,
children: [
{
path: 'dashboard',
components: import('@/views/dashboard/index.vue')
component: Dashboard1
}
]
},
{
path: '/display/:mode',
components: import('@/views/display/index'),
component: Display,
meta: {
},
hidden: true
},
{
path: '/trainroom',
components: import('@/views/trainRoom/index'),
component: TrainRoom,
meta: {
},
hidden: true
},
{
path: '/jointTraining',
components: import('@/views/jointTraining/index'),
component: JointTraining,
hidden: true
},
{
path: '/jlmap3d',
components: import('@/views/jlmap3d/index'),
component: Jlmap3d,
meta: {
},
hidden: true
@ -237,11 +326,11 @@ export const asyncRouter = [
i18n: 'router.mapManage',
roles: [admin, mapCreater]
},
components: Layout,
component: Layout,
children: [
{
path: 'skinStyle',
components: import('@/views/map/skinStyle/index'),
component: SkinStyle,
meta: {
i18n: 'router.skinManage'
}
@ -249,19 +338,19 @@ export const asyncRouter = [
{
path: 'skinStyle/draft/:mode/:skinStyleId',
hidden: true,
components: import('@/views/map/skinStyle/draft')
component: SkinStyleDraft
},
{
path: 'draw',
redirect: '/map/draw/0/draft',
components: import('@/views/map/mapdraft/index'),
component: Mapdraft,
meta: {
i18n: 'router.mapDraw'
},
children: [
{
path: ':mapId/:view',
components: import('@/views/map/mapdraft/mapedit/index'),
component: Mapedit,
hidden: true
}
]
@ -269,19 +358,19 @@ export const asyncRouter = [
{
path: 'runPlan',
redirect: '/map/runPlan/view/draft',
components: import('@/views/map/runplan/index'),
component: Runplan,
meta: {
i18n: 'router.runPlanManage'
},
children: [{
path: 'view/:mode',
components: import('@/views/map/runplan/chart'),
component: RunplanView,
hidden: true
}]
},
{
path: 'product',
components: import('@/views/lesson/trainingcategory/index'),
component: Trainingcategory,
meta: {
i18n: 'router.productEdit'
}
@ -290,7 +379,7 @@ export const asyncRouter = [
},
{
path: '/lesson',
components: Layout,
component: Layout,
meta: {
i18n: 'router.lessaonManage',
roles: [admin, lessonCreater]
@ -299,28 +388,28 @@ export const asyncRouter = [
{
path: 'record',
redirect: '/lesson/record/training/0/null',
components: import('@/views/lesson/trainingrecord/index'),
component: Trainingrecord,
meta: {
i18n: 'router.trainingRecord'
},
children: [
{
path: 'training/:trainingId/:trainingName',
components: import('@/views/lesson/trainingrecord/manage/index'),
component: TrainingrecordManage,
hidden: true
}
]
},
{
path: 'manage/taskManage',
components: import('@/views/lesson/taskmanage/list'),
component: Taskmanage,
meta: {
i18n: 'router.taskManage'
}
},
{
path: 'manage/trainingRule',
components: import('@/views/lesson/trainingRule/list'),
component: TrainingRuleList,
meta: {
i18n: 'router.trainingRule'
}
@ -328,20 +417,20 @@ export const asyncRouter = [
{
path: 'manage/trainingRule/detail',
hidden: true,
components: import('@/views/lesson/trainingRule/detail/index'),
component: TrainingRuleEdit,
meta: {
}
},
{
path: 'manage/training',
components: import('@/views/lesson/trainingmanage/index'),
component: Trainingmanage,
meta: {
i18n: 'router.trainingManage'
}
},
{
path: 'edit',
components: import('@/views/lesson/lessoncategory/index'),
component: Lessoncategory,
meta: {
i18n: 'router.lessonEdit'
}
@ -350,14 +439,14 @@ export const asyncRouter = [
},
{
path: '/script',
components: Layout,
component: Layout,
meta: {
roles: [admin, lessonCreater]
},
children: [
{
path: 'scriptManage',
components: import('@/views/lesson/scriptmanage/list'),
component: Scriptmanage,
meta: {
i18n: 'router.scriptManage'
}
@ -367,14 +456,14 @@ export const asyncRouter = [
{
path: '/teach',
redirect: '/teach/home',
components: import('@/views/teach/index'),
component: Teach,
meta: {
roles: [admin, userLesson, user]
},
children: [
{
path: 'home',
components: import('@/views/teach/home'),
component: TeachHome,
meta: {
i18n: 'router.teachSystem'
}
@ -382,7 +471,7 @@ export const asyncRouter = [
{
// 课程详情
path: 'detail/:lessonId',
components: import('@/views/teach/detail/index'),
component: TeachDetail,
meta: {
},
hidden: true
@ -390,14 +479,14 @@ export const asyncRouter = [
{
// 实训详情
path: 'practical/:trainingId/:lessonId',
components: import('@/views/teach/practical/index'),
component: TeachPractical,
meta: {
},
hidden: true
},
{
path: 'pay/:lessonId',
components: import('@/views/components/pay/index'),
component: Pay,
meta: {
},
hidden: true
@ -407,14 +496,14 @@ export const asyncRouter = [
{
path: '/exam',
redirect: '/exam/home',
components: import('@/views/exam/index'),
component: Exam,
meta: {
roles: [admin, userExam, user]
},
children: [
{
path: 'home',
components: import('@/views/exam/home'),
component: ExamHome,
meta: {
i18n: 'router.examSystem'
}
@ -422,40 +511,40 @@ export const asyncRouter = [
{
// 试卷详情
path: 'detail/:examId',
components: import('@/views/exam/detail/examDetail'),
component: ExamDetail,
hidden: true
},
{
path: 'course/:lessonId',
components: import('@/views/exam/detail/courseDetail'),
component: ExamCourseDetail,
hidden: true
},
{
// 规则管理
path: 'examRule/manage',
components: import('@/views/publish/examRule/index'),
component: PublishExamRule,
hidden: true
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
hidden: true,
components: import('@/views/publish/examRule/draft/index')
component: PublishExamRuleDraft
},
{
path: 'pay/:lessonId',
components: import('@/views/components/pay/index'),
component: Pay,
hidden: true
},
{
// 开始考试
path: 'questionDetail/:examQuestionId',
components: import('@/views/exam/detail/questionDetail'),
component: ExamQuestionDetail,
hidden: true
},
{
// 考试结果
path: 'result/:userExamId',
components: import('@/views/exam/result'),
component: ExamResult,
hidden: true
}
]
@ -463,26 +552,26 @@ export const asyncRouter = [
{
path: '/demonstration',
redirect: '/demonstration/home',
components: import('@/views/demonstration/index'),
component: Demonstration,
meta: {
roles: [admin, userSimulation, user]
},
children: [
{
path: 'home',
components: import('@/views/demonstration/home'),
component: DemonstrationHome,
meta: {
i18n: 'router.demonstrationSystem'
}
},
{
path: 'detail/:mapId',
components: import('@/views/demonstration/detail/index'),
component: DemonstrationDetail,
hidden: true
},
{
path: 'pay/:lessonId',
components: import('@/views/components/pay/index'),
component: Pay,
hidden: true
}
]
@ -490,14 +579,14 @@ export const asyncRouter = [
{
path: '/dp',
redirect: '/dp/home',
components: import('@/views/screenMonitor/index'),
component: ScreenMonitor,
meta: {
roles: [admin, userScreen, user]
},
children: [
{
path: 'home',
components: import('@/views/screenMonitor/home'),
component: ScreenMonitorHome,
meta: {
i18n: 'router.dpSystem'
},
@ -505,19 +594,19 @@ export const asyncRouter = [
},
{
path: 'detail/:lessonId',
components: import('@/views/screenMonitor/detail/index'),
component: ScreenMonitorDetail,
hidden: true
},
{
path: 'pay/:lessonId',
components: import('@/views/components/pay/index'),
component: Pay,
hidden: true
}
]
},
{
path: '/plan/tool',
components: import('@/views/planMonitor/editTool/index'),
component: PlanMonitorEditTool,
meta: {
},
hidden: true
@ -525,14 +614,14 @@ export const asyncRouter = [
{
path: '/plan',
redirect: '/plan/home',
components: import('@/views/planMonitor/index'),
component: PlanMonitor,
meta: {
roles: [admin, user]
},
children: [
{
path: 'home',
components: import('@/views/planMonitor/home'),
component: PlanMonitorHome,
meta: {
i18n: 'router.planSystem'
},
@ -540,26 +629,26 @@ export const asyncRouter = [
},
{
path: 'detail/:lessonId',
components: import('@/views/planMonitor/detail'),
component: PlanMonitorDetail,
hidden: true
},
{
path: 'pay/:lessonId',
components: import('@/views/components/pay/index'),
component: Pay,
hidden: true
}
]
},
{
path: '/replay',
components: Layout,
component: Layout,
meta: {
roles: [admin]
},
children: [
{
path: 'manage',
components: import('@/views/replay/index'),
component: Replay,
meta: {
i18n: 'router.replayManage'
}
@ -568,28 +657,28 @@ export const asyncRouter = [
},
{
path: '/permission',
components: Layout,
component: Layout,
meta: {
roles: [admin, user]
},
children: [
{
path: 'manage',
components: import('@/views/package/index'),
component: Package,
meta: {
i18n: 'router.permissionManage'
}
},
{
path: 'draft',
components: import('@/views/package/draft/ruleForm'),
component: PackageDraft,
hidden: true
}
]
},
{
path: '/publish',
components: Layout,
component: Layout,
meta: {
i18n: 'router.pulishManage',
roles: [admin]
@ -597,85 +686,85 @@ export const asyncRouter = [
children: [
{
path: 'map',
components: import('@/views/publish/publishMap/index'),
component: PublishMap,
meta: {
i18n: 'router.publishMapManage'
}
},
{
path: 'product',
components: import('@/views/publish/productStatus/index'),
component: ProductStatus,
meta: {
i18n: 'router.productStateManage'
}
},
{
path: 'lesson',
components: import('@/views/publish/publishLesson/index'),
component: PublishLesson,
meta: {
i18n: 'router.publishLessonManage'
}
},
// {
// path: 'script',
// components: import('@/views/publish/simulationScript/index'),
// component: SimulationScript,
// meta: {
// title: '仿真脚本管理',
// }
// },
{
path: 'runPlan/template',
components: import('@/views/publish/runPlanTemplate/index'),
component: RunPlanTemplate,
meta: {
i18n: 'router.runPlanTemplateManage'
}
},
{
path: 'runPlan/common',
components: import('@/views/publish/runPlanCommon/index'),
component: RunPlanCommon,
meta: {
i18n: 'router.runPlanCommonManage'
}
},
{
path: 'runPlan/everyDay',
components: import('@/views/publish/runPlanEveryDay/index'),
component: RunPlanEveryDay,
meta: {
i18n: 'router.runPlanEveryDayManage'
}
},
{
path: 'examRule/manage',
components: import('@/views/publish/examRule/index'),
component: PublishExamRule,
meta: {
i18n: 'router.examRuleManage'
}
},
{
path: 'map/draft/:mode/:mapId',
components: import('@/views/publish/publishMap/draft'),
component: PublishMapDraft,
hidden: true
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
components: import('@/views/publish/examRule/draft/index'),
component: PublishExamRuleDraft,
hidden: true
},
{
path: 'runPlan/common/:mode',
components: import('@/views/publish/runPlanCommon/draft'),
component: RunPlanCommonDraft,
hidden: true
},
{
path: 'runPlan/view/:mode',
components: import('@/views/map/runplan/chart'),
component: RunplanView,
hidden: true
}
]
},
{
path: '/orderauthor',
components: Layout,
component: Layout,
meta: {
i18n: 'router.orderAuthorityManage',
roles: [admin]
@ -683,28 +772,28 @@ export const asyncRouter = [
children: [
{
path: 'commodity/manage',
components: import('@/views/orderauthor/commodity/index'),
component: Commodity,
meta: {
i18n: 'router.commodityManage'
}
},
{
path: 'order/manage',
components: import('@/views/orderauthor/order/list'),
component: OrderList,
meta: {
i18n: 'router.orderManage'
}
},
{
path: 'author/manage',
components: import('@/views/orderauthor/author/index'),
component: Author,
meta: {
i18n: 'router.authorityManage'
}
},
{
path: 'transfer/manage',
components: import('@/views/orderauthor/permission/index'),
component: Permission,
meta: {
i18n: 'router.authorityTransferManage'
}
@ -712,7 +801,7 @@ export const asyncRouter = [
{
path: 'commodity/draft/:mode/:commodityId',
hidden: true,
components: import('@/views/orderauthor/commodity/draft'),
component: CommodityDraft,
meta: {
i18n: 'router.addCommodity'
}
@ -720,7 +809,7 @@ export const asyncRouter = [
{
path: 'order/draft/:mode/:orderId',
hidden: true,
components: import('@/views/orderauthor/order/draft'),
component: OrderDraft,
meta: {
i18n: 'router.addOrder'
}
@ -728,26 +817,26 @@ export const asyncRouter = [
{
path: 'author/draft/:mode/:userId',
hidden: true,
components: import('@/views/orderauthor/author/draft'),
component: AuthorDraft,
meta: {
i18n: 'router.addCoursePermissions'
}
},
{
path: 'transfer/detail/:permissionId',
components: import('@/views/orderauthor/permission/detail'),
component: PermissionDetail,
hidden: true
},
{
path: 'transfer/package',
components: import('@/views/orderauthor/permission/draft/ruleForm'),
component: PermissionDraft,
hidden: true
}
]
},
{
path: '/system',
components: Layout,
component: Layout,
meta: {
i18n: 'router.systemManage',
roles: [admin]
@ -755,7 +844,7 @@ export const asyncRouter = [
children: [
{
path: 'dictionary',
components: import('@/views/management/dictionary/index'),
component: Dictionary,
meta: {
i18n: 'router.dataDictionary'
}
@ -763,42 +852,42 @@ export const asyncRouter = [
{
path: 'dictionary/detail',
hidden: true,
components: import('@/views/management/dictionaryDetail/index'),
component: DictionaryDetail,
meta: {
i18n: 'router.dataDictionaryDetails'
}
},
{
path: 'userManage',
components: import('@/views/management/userControl/index'),
component: UserControl,
meta: {
i18n: 'router.userManage'
}
},
{
path: 'userTrainingManage',
components: import('@/views/management/userTraining/index'),
component: UserTraining,
meta: {
i18n: 'router.userTrainingManage'
}
},
{
path: 'userExamManage',
components: import('@/views/management/userExam/index'),
component: UserExam,
meta: {
i18n: 'router.userExamManage'
}
},
{
path: 'userSimulationManage',
components: import('@/views/management/userSimulation/index'),
component: UserSimulation,
meta: {
i18n: 'router.userSimulationManage'
}
},
{
path: 'existingSimulation',
components: import('@/views/management/existingSimulation/index'),
component: ExistingSimulation,
meta: {
i18n: 'router.existingSimulation'
}

View File

@ -1,974 +0,0 @@
/* eslint-disable no-unused-vars */
import Vue from 'vue';
import Router from 'vue-router';
// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
Vue.use(Router);
/* Dashboard */
import Dashboard from '@/views/dashboard/index.vue';
/* Layout */
import Layout from '@/views/layout/Layout';
import Login from '@/views/login/index';
import LoginNew from '@/views/login/loginNew';
import Page404 from '@/views/404';
import LoginScreen from '@/views/login/loginScreen';
import LoginNewScreen from '@/views/login/loginNewScreen';
import LoginPlan from '@/views/login/loginPlan';
import LoginNewPlan from '@/views/login/loginNewPlan';
//地图绘制
import MapManage from '@/views/map/mapdraft/index';
import MapEdit from '@/views/map/mapdraft/mapedit/index';
import SkinStyle from '@/views/map/skinStyle/index';
import SkinStyleDraft from '@/views/map/skinStyle/draft';
//列车运行表
import ListPlan from '@/views/map/runplan/index';
//运行图视图
import ViewPlan from '@/views/map/runplan/chart';
//实训管理和编辑
import TrainingManage from '@/views/lesson/trainingrecord/index';
import TrainingEdit from '@/views/lesson/trainingrecord/manage/index';
//产品管理
import TrainingCategory from '@/views/lesson/trainingcategory/index';
import ProductList from '@/views/map/product/list';
import ProductDraft from '@/views/map/product/draft';
//课程管理
import LessonCategory from '@/views/lesson/lessoncategory/index';
//自动生成实训
import TrainingGeneration from '@/views/lesson/trainingmanage/index';
import TrainingRule from '@/views/lesson/trainingRule/list';
import TrainingRuleDetail from '@/views/lesson/trainingRule/detail/index';
//购买页面
import PayPage from '@/views/components/pay/index';
//教学系统
import Teach from '@/views/teach/index';
import TeachHome from '@/views/teach/home';
import TeachDetail from '@/views/teach/detail/index';
import TeachPracticalDetail from '@/views/teach/practical/index';
import TaskManageList from '@/views/lesson/taskmanage/list';
import ScriptManage from '@/views/lesson/scriptmanage/list';
//考试系统
import Exam from '@/views/exam/index';
import ExamHome from '@/views/exam/home';
import ExamDetail from '@/views/exam/detail/examDetail';
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
import ExamQuestionDetail from '@/views/exam/detail/questionDetail';
import ExamResult from '@/views/exam/result';
//考试规则
import ExamRuleList from '@/views/publish/examRule/index';
import ExamRuleDraft from '@/views/publish/examRule/draft/index';
//仿真系统
import Demonstration from '@/views/demonstration/index';
import DemonstrationHome from '@/views/demonstration/home';
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 PlanMonitor from '@/views/planMonitor/index';
import PlanMonitorHome from '@/views/planMonitor/home';
import PlanMonitorDetail from '@/views/planMonitor/detail';
import PlanEditTool from '@/views/planMonitor/editTool/index';
//回放管理
import replay from '@/views/replay/index';
//权限管理
import PermissionList from '@/views/package/index';
import PermissionDraft from '@/views/package/draft/ruleForm';
// 产品状态管理
import ProductStatus from '@/views/publish/productStatus/index';
// 发布地图管理
import PublishMap from '@/views/publish/publishMap/index';
import PublishMapDraft from '@/views/publish/publishMap/draft';
// 发布课程管理
import PublishLesson from '@/views/publish/publishLesson/index';
// 仿真脚本管理
import SimulationScript from '@/views/publish/simulationScript/index';
// 运行图模板管理
import PlanTemplate from '@/views/publish/runPlanTemplate/index';
import PlanCommon from '@/views/publish/runPlanCommon/index';
import PlanCommonDraft from '@/views/publish/runPlanCommon/draft';
// 运行图每日加载管理
import PlanEveryDay from '@/views/publish/runPlanEveryDay/index';
// 系统字典管理
import Dictionary from '@/views/management/dictionary/index';
import DictionaryDetail from '@/views/management/dictionaryDetail/index';
// 用户考试管理
import UserExam from '@/views/management/userExam/index';
// 用户仿真管理
import UserSimulation from '@/views/management/userSimulation/index';
// 存在仿真管理
import ExistingSimulation from '@/views/management/existingSimulation/index';
// 用户实训管理
import UserTraining from '@/views/management/userTraining/index';
// 用户管理
import UserControl from '@/views/management/userControl/index';
// 商品管理
import commodityList from '@/views/orderauthor/commodity/index';
import CommodityDraft from '@/views/orderauthor/commodity/draft';
//课程权限管理
import LessonPermission from '@/views/orderauthor/author/index';
import LessonPermissionDraft from '@/views/orderauthor/author/draft';
//订单操作
import OrderList from '@/views/orderauthor/order/list';
import OrderDraft from '@/views/orderauthor/order/draft';
import runPlan from '../store/modules/runplan';
//打包管理
import PackageMange from '@/views/orderauthor/permission/index';
import PackageDetail from '@/views/orderauthor/permission/detail';
import PackageDraft from '@/views/orderauthor/permission/draft/ruleForm';
//综合演练
import trainRoom from '@/views/trainRoom/index';
import JointTrainingDraft from '@/views/jointTraining/index';
import ThreeTest from '@/views/jlmap3d/index';//test
import ThreeDrawTest from '@/views/jlmap3d/jlmap3dedit';//test
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
export const UrlConfig = {
display: '/display',
examRuleDraft: '/examRule/draft',
examRuleManage: '/examRule/manage',
map: {
prefix: '/map',
draft: '/map/draw',
skinStyle: '/map/skinStyle',
skinStyleDraft: '/map/skinStyle/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'
},
teach: {
prefix: '/teach',
detail: '/teach/detail',
practical: '/teach/practical',
pay: '/teach/pay',
},
exam: {
prefix: '/exam',
detail: '/exam/detail',
course: '/exam/course',
examRuleManage: '/exam/examRule/manage',
pay: '/exam/pay'
},
demonstration: {
prefix: '/demonstration',
detail: '/demonstration/detail',
pay: '/demonstration/pay'
},
dp: {
prefix: '/dp',
detail: '/dp/detail',
pay: '/dp/pay'
},
plan: {
prefix: '/plan',
tool: '/plan/tool',
detail: '/plan/detail',
pay: '/plan/pay'
},
replay: {
prefix: '/replay'
},
permission: {
prefix: '/permission',
permissionList: '/permission/manage',
permissionDraft: '/permission/draft',
permission: '/permission/restore'
},
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',
authorDraft: '/orderauthor/author/draft',
transferDetail: '/orderauthor/transfer/detail',
trainferPackage: '/orderauthor/transfer/package'
}
};
export const constantRouterMap = [
{ path: '/dp/login', component: resolve => require(['@/views/login/loginNewScreen'], resolve), hidden: true }, //扫码登录
{ path: '/dp/login1', component: resolve => require(['@/views/login/loginScreen'], resolve), hidden: true }, //密码登录
{ path: '/plan/login', component: resolve => require(['@/views/login/loginNewPlan'], resolve), hidden: true }, //扫码登录
{ path: '/plan/login1', component: resolve => require(['@/views/login/loginPlan'], resolve), hidden: true }, //密码登录
{ path: '/login', component: resolve => require(['@/views/login/loginNew'], resolve), hidden: true }, //扫码登录
{ path: '/login1', component: resolve => require(['@/views/login/index'], resolve), hidden: true }, //密码登录
{ path: '/jlmap3d/edit', component: resolve => require(['@/views/jlmap3d/jlmap3dedit'], resolve), hidden: true },
{ path: '/404', component: resolve => require(['@/views/404'], resolve), hidden: true },
{ path: '*', redirect: '/404', hidden: true }
];
export default new Router({
mode: 'history', //后端支持可开
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
});
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 asyncRouterMap = [
{
path: '/',
component: resolve => require(['@/views/layout/Layout'], resolve),
redirect: '/dashboard',
name: 'Dashboard',
hidden: true,
children: [
{
path: 'dashboard',
component: resolve => require(['@/views/dashboard/index.vue'], resolve)
},
]
},
{
path: '/display/:mode',
component: resolve => require(['@/views/display/index'], resolve),
meta: {
title: '实训视图'
},
hidden: true
},
{
path: '/trainroom',
component: resolve => require(['@/views/trainRoom/index'], resolve),
meta: {
title: '综合演练房间'
},
hidden: true,
},
{
path: '/jointTraining',
name: '联合演练试图',
component: resolve => require(['@/views/jointTraining/index'], resolve),
hidden: true
},
{
path: '/jlmap3d',
name: '三维test',
component: resolve => require(['@/views/jlmap3d/index'], resolve),
meta: {
title: '三维test'
},
hidden: true
},
{
path: '/map',
name: '地图管理',
meta: {
title: '地图管理',
roles: [admin, mapCreater],
},
component: resolve => require(['@/views/layout/Layout'], resolve),
children: [
{
path: 'skinStyle',
name: '皮肤管理',
component: resolve => require(['@/views/map/skinStyle/index'], resolve),
meta: {
title: '皮肤管理',
},
},
{
path: 'skinStyle/draft/:mode/:skinStyleId',
name: '操作权限',
hidden: true,
component: resolve => require(['@/views/map/skinStyle/draft'], resolve),
meta: {
title: '操作权限'
}
},
{
path: 'draw',
redirect: '/map/draw/0/draft',
component: resolve => require(['@/views/map/mapdraft/index'], resolve),
meta: {
title: '地图绘制',
},
children: [
{
path: ':mapId/:view',
component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve),
meta: {
title: '地图绘制',
},
hidden: true
}
]
},
{
path: 'runPlan',
redirect: '/map/runPlan/view/draft',
name: '运行图管理',
component: resolve => require(['@/views/map/runplan/index'], resolve),
meta: {
title: '运行图管理'
},
children: [{
path: 'view/:mode',
component: resolve => require(['@/views/map/runplan/chart'], resolve),
hidden: true
}],
},
{
path: 'product',
name: '产品编辑',
component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve),
meta: {
title: '产品编辑',
}
}
]
},
{
path: '/lesson',
component: resolve => require(['@/views/layout/Layout'], resolve),
name: '课程管理',
meta: {
title: '课程管理',
roles: [admin, lessonCreater],
},
children: [
{
path: 'record',
redirect: '/lesson/record/training/0/null',
component: resolve => require(['@/views/lesson/trainingrecord/index'], resolve),
meta: {
title: '实训录制',
},
children: [
{
path: 'training/:trainingId/:trainingName',
component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve),
meta: {
title: '实训录制',
},
hidden: true
},
]
},
{
path: 'manage/taskmanage',
name: '任务管理',
component: resolve => require(['@/views/lesson/taskmanage/list'], resolve),
meta: {
title: '任务管理'
}
},
{
path: 'manage/trainingRule',
name: '操作定义',
component: resolve => require(['@/views/lesson/trainingRule/list'], resolve),
meta: {
title: '操作定义'
},
},
{
path: 'manage/trainingRule/detail',
name: '操作定义明细',
hidden: true,
component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve),
meta: {
title: '操作定义明细'
}
},
{
path: 'manage/training',
name: '实训管理',
component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve),
meta: {
title: '实训管理'
}
},
{
path: 'edit',
name: '课程编辑',
component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve),
meta: {
title: '课程编辑',
}
},
{
path: 'manage/scriptmanage',
name: '剧本管理',
component: resolve => require(['@/views/lesson/scriptmanage/list'], resolve),
meta: {
title: '剧本管理'
}
}
]
},
{
path: '/teach',
redirect: '/teach/home',
name: '教学系统',
component: resolve => require(['@/views/teach/index'], resolve),
meta: {
roles: [admin, userLesson, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/teach/home'], resolve),
meta: {
title: '教学系统'
},
},
{
path: 'detail/:lessonId',
name: '课程详情',
component: resolve => require(['@/views/teach/detail/index'], resolve),
meta: {
title: '课程详情'
},
hidden: true
},
{
path: 'practical/:trainingId/:lessonId',
name: '实训详情',
component: resolve => require(['@/views/teach/practical/index'], resolve),
meta: {
title: '实训详情'
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/exam',
redirect: '/exam/home',
component: resolve => require(['@/views/exam/index'], resolve),
name: '考试系统',
meta: {
roles: [admin, userExam, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/exam/home'], resolve),
meta: {
title: '考试系统'
},
},
{
path: 'detail/:examId',
name: '试卷详情',
component: resolve => require(['@/views/exam/detail/examDetail'], resolve),
meta: {
title: '试卷详情'
},
hidden: true,
},
{
path: 'course/:lessonId',
component: resolve => require(['@/views/exam/detail/courseDetail'], resolve),
meta: {
},
hidden: true,
},
{
path: 'examRule/manage',
name: '试题设置',
component: resolve => require(['@/views/publish/examRule/index'], resolve),
meta: {
title: '试题设置'
},
hidden: true,
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
hidden: true,
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
meta: {
title: '添加订单'
}
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
},
{
path: 'questionDetail/:examQuestionId',
name: '开始考试',
component: resolve => require(['@/views/exam/detail/questionDetail'], resolve),
meta: {
title: '开始考试',
},
hidden: true,
},
{
path: 'result/:userExamId',
name: '考试结果',
component: resolve => require(['@/views/exam/result'], resolve),
meta: {
title: '考试结果',
},
hidden: true
},
]
},
{
path: '/demonstration',
redirect: '/demonstration/home',
component: resolve => require(['@/views/demonstration/index'], resolve),
name: '仿真系统',
meta: {
roles: [admin, userSimulation, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/demonstration/home'], resolve),
meta: {
title: '仿真系统'
},
},
{
path: 'detail/:mapId',
name: '地图详情',
component: resolve => require(['@/views/demonstration/detail/index'], resolve),
meta: {
title: '地图详情'
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/dp',
redirect: '/dp/home',
component: resolve => require(['@/views/screenMonitor/index'], resolve),
name: '大屏系统',
meta: {
roles: [admin, userScreen],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/screenMonitor/home'], resolve),
meta: {
title: '大屏系统'
},
target: true
},
{
path: 'detail/:lessonId',
component: resolve => require(['@/views/screenMonitor/detail/index'], resolve),
meta: {
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/plan/tool',
component: resolve => require(['@/views/planMonitor/editTool/index'], resolve),
meta: {
},
hidden: true
},
{
path: '/plan',
redirect: '/plan/home',
component: resolve => require(['@/views/planMonitor/index'], resolve),
name: '琏计划',
meta: {
roles: [admin, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/planMonitor/home'], resolve),
meta: {
title: '琏计划'
},
target: true
},
{
path: 'detail/:lessonId',
component: resolve => require(['@/views/planMonitor/detail'], resolve),
meta: {
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/replay',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
roles: [admin],
},
children: [
{
path: 'manage',
component: resolve => require(['@/views/replay/index'], resolve),
meta: {
title: '回放管理'
},
}
]
},
{
path: '/permission',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
roles: [admin, user],
},
children: [
{
path: 'manage',
component: resolve => require(['@/views/package/index'], resolve),
meta: {
title: '权限管理'
},
},
{
path: 'draft',
component: resolve => require(['@/views/package/draft/ruleForm'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/publish',
name: '发布内容管理',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
title: '发布内容管理',
roles: [admin],
},
children: [
{
path: 'map',
name: '发布地图管理',
component: resolve => require(['@/views/publish/publishMap/index'], resolve),
meta: {
title: '发布地图管理',
}
},
{
path: 'product',
name: '产品状态管理',
component: resolve => require(['@/views/publish/productStatus/index'], resolve),
meta: {
title: '产品状态管理',
}
},
{
path: 'lesson',
name: '发布课程管理',
component: resolve => require(['@/views/publish/publishLesson/index'], resolve),
meta: {
title: '发布课程管理',
}
},
// {
// path: 'script',
// name: '仿真脚本管理',
// component: resolve => require(['@/views/publish/simulationScript/index'], resolve),
// meta: {
// title: '仿真脚本管理',
// }
// },
{
path: 'runPlan/template',
component: resolve => require(['@/views/publish/runPlanTemplate/index'], resolve),
meta: {
title: '运行图模板管理'
}
},
{
path: 'runPlan/common',
component: resolve => require(['@/views/publish/runPlanCommon/index'], resolve),
meta: {
title: '运行图通用管理'
}
},
{
path: 'runPlan/everyDay',
component: resolve => require(['@/views/publish/runPlanEveryDay/index'], resolve),
meta: {
title: '运行图每日管理'
}
},
{
path: 'examRule/manage',
name: '试题管理',
component: resolve => require(['@/views/publish/examRule/index'], resolve),
meta: {
title: '试题管理'
}
},
{
path: 'map/draft/:mode/:mapId',
component: resolve => require(['@/views/publish/publishMap/draft'], resolve),
meta: {
},
hidden: true
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
hidden: true,
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
meta: {
}
},
{
path: 'runPlan/common/:mode',
component: resolve => require(['@/views/publish/runPlanCommon/draft'], resolve),
meta: {
},
hidden: true
},
{
path: 'runPlan/view/:mode',
component: resolve => require(['@/views/map/runplan/chart'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/orderauthor',
component: resolve => require(['@/views/layout/Layout'], resolve),
name: '订单权限管理',
meta: {
title: '订单权限管理',
roles: [admin]
},
children: [
{
path: 'commodity/manage',
name: '商品管理',
component: resolve => require(['@/views/orderauthor/commodity/index'], resolve),
meta: {
title: '商品管理'
}
},
{
path: 'order/manage',
name: '订单管理',
component: resolve => require(['@/views/orderauthor/order/list'], resolve),
meta: {
title: '订单管理'
}
},
{
path: 'author/manage',
name: '权限管理',
component: resolve => require(['@/views/orderauthor/author/index'], resolve),
meta: {
title: '权限管理'
}
},
{
path: 'transfer/manage',
name: '权限分发管理',
component: resolve => require(['@/views/orderauthor/permission/index'], resolve),
meta: {
title: '权限分发管理'
}
},
{
path: 'commodity/draft/:mode/:commodityId',
name: '添加商品',
hidden: true,
component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve),
meta: {
title: '添加商品'
}
},
{
path: 'order/draft/:mode/:orderId',
name: '添加订单',
hidden: true,
component: resolve => require(['@/views/orderauthor/order/draft'], resolve),
meta: {
title: '添加订单'
}
},
{
path: 'author/draft/:mode/:userId',
name: '添加课程权限',
hidden: true,
component: resolve => require(['@/views/orderauthor/author/draft'], resolve),
meta: {
title: '添加课程权限'
}
},
{
path: 'transfer/detail/:permissionId',
component: resolve => require(['@/views/orderauthor/permission/detail'], resolve),
meta: {
},
hidden: true
},
{
path: 'transfer/package',
component: resolve => require(['@/views/orderauthor/permission/draft/ruleForm'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/system',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
title: '系统管理',
roles: [admin],
},
children: [
{
path: 'dictionary',
name: 'Dictionary',
component: resolve => require(['@/views/management/dictionary/index'], resolve),
meta: {
title: '数据字典'
}
},
{
path: 'dictionary/detail',
name: '数据字典明细',
hidden: true,
component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve),
meta: {
title: '数据字典明细'
}
},
{
path: 'userManage',
name: '用户管理',
component: resolve => require(['@/views/management/userControl/index'], resolve),
meta: {
title: '用户管理',
}
},
{
path: 'userTrainingManage',
name: '用户实训管理',
component: resolve => require(['@/views/management/userTraining/index'], resolve),
meta: {
title: '用户实训管理',
}
},
{
path: 'userExamManage',
name: '用户考试管理',
component: resolve => require(['@/views/management/userExam/index'], resolve),
meta: {
title: '用户考试管理',
}
},
{
path: 'userSimulationManage',
name: '用户仿真管理',
component: resolve => require(['@/views/management/userSimulation/index'], resolve),
meta: {
title: '用户仿真管理',
}
},
{
path: 'existingSimulation',
name: '存在仿真管理',
component: resolve => require(['@/views/management/existingSimulation/index'], resolve),
meta: {
title: '存在仿真管理',
}
}
]
},
];