From b248e69ffec2e4ca5555981c336017eeb0ddb1d8 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 11 Jan 2021 10:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AD=A6=E7=94=9F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C&=E5=93=88?= =?UTF-8?q?=E5=B0=94=E6=BB=A8=E6=89=93=E5=8C=85=E4=B8=8D=E5=86=8D=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E8=B7=AF=E7=94=B1=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 2 +- src/permission.js | 2 +- src/router/{index_Common.js => index.js} | 21 - src/router/index_HEB.js | 742 ------------------ src/scripts/cmdPlugin/CommandHandler.js | 2 +- src/scripts/cmdPlugin/Handler.js | 2 +- src/store/modules/permission.js | 2 +- src/utils/request.js | 2 +- src/views/designPlatform/demonList.vue | 2 +- src/views/exam/index.vue | 2 +- .../lessoncategory/edit/lesson/publish.vue | 2 +- src/views/messageBoard/index.vue | 2 +- .../newDesignUser/mapmanage/operateMenu.vue | 2 +- src/views/orderauthor/permission/index.vue | 2 +- src/views/organization/index.vue | 19 +- src/views/package/index.vue | 2 +- src/views/publish/publishMap/index.vue | 2 +- src/views/publish/runPlanCommon/index.vue | 2 +- src/views/publish/runPlanEveryDay/index.vue | 2 +- src/views/publish/runPlanTemplate/index.vue | 2 +- src/views/scriptManage/home.vue | 2 +- src/views/studentManage/index.vue | 695 ---------------- src/views/teach/index.vue | 2 +- vue.config.js | 12 +- 24 files changed, 43 insertions(+), 1484 deletions(-) rename src/router/{index_Common.js => index.js} (98%) delete mode 100644 src/router/index_HEB.js delete mode 100644 src/views/studentManage/index.vue diff --git a/src/main.js b/src/main.js index fea23a6f5..0e17c5626 100644 --- a/src/main.js +++ b/src/main.js @@ -11,7 +11,7 @@ import App from './App'; import VueI18n from 'vue-i18n'; import store from './store/index'; -import router from './router/index_APP_TARGET'; +import router from './router/index'; import CancelMouseState from '@/mixin/CancelMouseState.js'; Vue.mixin(CancelMouseState); diff --git a/src/permission.js b/src/permission.js index b69fa3d35..24d6c8894 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import store from '@/store/index'; -import router from './router/index_APP_TARGET'; +import router from './router/index'; import {loginInfo} from '@/scripts/ProjectConfig'; import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; diff --git a/src/router/index_Common.js b/src/router/index.js similarity index 98% rename from src/router/index_Common.js rename to src/router/index.js index c4febc0f1..ed9cb433b 100644 --- a/src/router/index_Common.js +++ b/src/router/index.js @@ -124,7 +124,6 @@ const UserRules = () => import('@/views/orderauthor/rules/index'); const UserRulesDetail = () => import('@/views/orderauthor/rules/detail'); const DeviceManage = () => import('@/views/system/deviceManage/index'); -const StudentManage = () => import('@/views/studentManage'); const BankManage = () => import('@/views/competitionManage/bankList/index'); const Scene = () => import('@/views/drts/scene/index'); @@ -1088,26 +1087,6 @@ export const asyncRouter = [ /* merge 是否再路由处理中与asyncRouter进行合并 mergeIndex合并进入asyncRouter【mergeIndex】 慎重调整asyncRouter顺序 */ export const projectRoute = { designgzb: [ - { - path: '/design/student', - redirect: '/design/student/home', - component: Layout, - meta: { - i18n: 'router.studentManage', - roles: [admin, lessonCreater] - }, - children: [ - { - path: 'home', - component: StudentManage, - meta: { - i18n: 'router.studentManage', - icon: 'design', - hidden: true - } - } - ] - }, { // 系统管理 path: '/system', component: Layout, diff --git a/src/router/index_HEB.js b/src/router/index_HEB.js deleted file mode 100644 index 0f6d79c75..000000000 --- a/src/router/index_HEB.js +++ /dev/null @@ -1,742 +0,0 @@ -import Vue from 'vue'; -import VueRouter from 'vue-router'; -// import VueRouter from 'vue-router'; - -Vue.use(VueRouter); - -/* Layout */ -const Layout = () => import('@/layout'); -// const Login = () => import('@/views/login/hydLogin'); -const Login = () => import('@/views/login/index'); - -const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit'); -const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive'); -const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation'); -const Jlmap3dModel = () => import('@/views/jlmap3d/device/jl3ddevice'); -const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow'); -const DisplayNew = () => import('@/views/newMap/displayNew/index'); - -const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index'); - -const Errpr404 = () => import('@/views/error-page/404'); - -const Dictionary = () => import('@/views/system/dictionary/index'); -const DictionaryDetail = () => import('@/views/system/dictionaryDetail/index'); -const UserControl = () => import('@/views/system/userControl/index'); -const UserTraining = () => import('@/views/system/userTraining/index'); -const UserExam = () => import('@/views/system/userExam/index'); -const UserSimulation = () => import('@/views/system/userSimulation/index'); -const ExistingSimulation = () => import('@/views/system/existingSimulation/index'); -const CacheControl = () => import('@/views/system/cacheControl/index'); -const SystemGenerate = () => import('@/views/system/systemGenerate/index'); -const News = () => import('@/views/system/news/index'); -const CommandDictionary = () => import('@/views/system/commandDictionary/index'); -const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit'); -const configLine = () => import('@/views/system/configLine/index'); - -const IscsSystem = () => import('@/views/iscs/iscsSystem/index'); -const IscsConfig = () => import('@/views/iscs/iscsSystem/config/index'); - -const Taskmanage = () => import('@/views/lesson/taskmanage/list'); -const TrainingRuleList = () => import('@/views/lesson/trainingRule/list'); -const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index'); -const Trainingmanage = () => import('@/views/lesson/trainingmanage/index'); -const LessonEdit = () => import('@/views/lesson/lessoncategory/index'); -const LessonHome = () => import('@/views/lesson/home'); -const LessonDetail = () => import('@/views/lesson/details'); -const BigScreen = () => import('@/views/designPlatform/bigScreen'); -const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen'); -const TestRunplan = () => import('@/views/designPlatform/testRunplan'); - -const ScriptmanageHome = () => import('@/views/scriptManage/home'); - -const IbpHome = () => import('@/views/ibp/home'); -const IbpDraw = () => import('@/views/ibp/ibpDraw/index'); - -const TeachDetail = () => import('@/views/teach/detail/index'); -const TeachHome = () => import('@/views/teach/index'); -const Pay = () => import('@/views/components/pay/index'); - -const ExamHome = () => import('@/views/exam/index'); -const ExamResult = () => import('@/views/exam/result'); -const ExamDetail = () => import('@/views/exam/detail/examDetail'); -const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail'); - -const DemonstrationDetail = () => import('@/views/demonstration/detail/index'); - -const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index'); -const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index'); -const PlanMonitorDetail = () => import('@/views/planMonitor/detail'); - -const DesignPlatformHome = () => import('@/views/designPlatform/home'); -const DesignPlatform = () => import('@/views/designPlatform/index'); -const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew'); - -const Package = () => import('@/views/package/index'); - -const PublishMap = () => import('@/views/publish/publishMap/index'); -const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史 -const PublishLesson = () => import('@/views/publish/publishLesson/index'); -const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index'); -const RunPlanCommon = () => import('@/views/publish/runPlanCommon/index'); -const RunPlanCommonDraft = () => import('@/views/publish/runPlanCommon/draft'); -const RunPlanEveryDay = () => import('@/views/publish/runPlanEveryDay/index'); -const RunplanView = () => import('@/views/publish/runPlanEveryDay/runPlanView'); -const PublishExamRule = () => import('@/views/publish/examRule/index'); -const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index'); - -const TrainingPlatform = () => import('@/views/trainingPlatform/index'); - -const Commodity = () => import('@/views/orderauthor/commodity/index'); -const OrderList = () => import('@/views/orderauthor/order/list'); -const OrderDraft = () => import('@/views/orderauthor/order/draft'); -const Author = () => import('@/views/orderauthor/author/index'); -const Permission = () => import('@/views/orderauthor/permission/index'); -const PermissionDetail = () => import('@/views/orderauthor/permission/detail'); -const PermissionCreate = () => import('@/views/orderauthor/permission/create/index'); -const UserRules = () => import('@/views/orderauthor/rules/index'); -const UserRulesDetail = () => import('@/views/orderauthor/rules/detail'); - -const DeviceManage = () => import('@/views/system/deviceManage/index'); -const Approval = () => import('@/views/approval/index'); - -// import { loginInfo } from '@/scripts/ProjectConfig'; -// import { getSessionStorage } from '@/utils/auth'; - -/** - * 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 (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 projectTrain = '011'; // 城市轨道项目 -export const projectXian = '012'; // 西安地铁项目 -export const projectXty = '013'; // 西铁院 -export const projectGzzb = '014'; // 贵州装备 -export const projectJsxt = '015'; // 竞赛系统 -export const projectJyd = '017'; // 竞业达 -export const projectTky = '018'; // 铁科院 -export const projectHeb = '019'; // 哈盈达 - -export const userTrainingPlatform = '016'; // 实训系统 -// export const refereePlatform = '017'; // 裁判系统 - -/** - * constantRoutes - * a base page that does not have permission requirements - * all roles can be accessed - */ -export const constantRoutes = [ - // 实训平台登录 - { - path: '/login', - component: Login, - hidden: true - }, - // 设计平台登录 - { - path: '/design', - redirect: '/design/login', - hidden: true - }, - { - path: '/design/login', - component: Login, - hidden: true - }, - { - path: '/design/jlmap3d/edit', - component: Jlmap3dedit, - hidden: true - }, - { - path: '/jlmap3d/sandbox', - component: Jlmap3dSandbox, - hidden: true - }, - { - path: '/jlmap3d/devicemodel', - component: Jlmap3dModel, - hidden: true - }, - { - path: '/jlmap3d/passengerflow', - component: Jlmap3dPassFlow, - hidden: true - }, - { - path: '/404', - component: Errpr404, - hidden: true - }, - { path: '*', redirect: '/404', hidden: true } -]; -// 公共路由不需要过滤 直接可以访问 -export const publicAsyncRoute = [ - { - path: '/displayNew/:mode', - component: DisplayNew, - hidden: true - }, - { // 剧本编辑 战场图 - path: '/scriptDisplayNew/:mode', - component: DisplayNew, - hidden: true - }, - { - path: '/jointTrainingNew', - component: JointTrainingNew, - hidden: true - }, - { - path: '/displayBigScreen/:mapId', - component: BigScreen, - hidden: true - }, - { // 大屏切分 - path: '/bigSplitScreen/:mapId', - component: BigSplitScreen, - hidden: true - }, - { - path: '/jlmap3d', - component: Jlmap3d, - hidden: true - }, - { // 运行图编辑 - path: '/plan/tool', - component: PlanMonitorEditTool, - hidden: true - }, - { // 哈尔滨运行图编辑 - path: '/plan/newTool', - component: PlanMonitorNewEditTool, - hidden: true - }, - { - path: '/displayIscs/system', - component: IscsSystem, - hidden: true, - children: [ - { - path: 'config/:mode', - component: IscsConfig, - hidden: true - } - ] - }, - { - path: '/device/teachDetail', - component: TeachDetail, - hidden: true - }, - { - path: '/device/course', - component: ExamCourseDetail, - hidden: true - }, - { - path: '/device/examRule/manage', - component: PublishExamRule, - hidden: true - }, - { - path: '/device/examRule/draft/:mode/:ruleId/:lessonId', - component: PublishExamRuleDraft, - hidden: true - }, - { // 试卷详情 - path: '/device/exam/:examId', - component: ExamDetail, - hidden: true - }, - { // 考试结果 - path: '/device/result/:userExamId', - component: ExamResult, - hidden: true - }, - { - // 运行图测试(仿真,仅有按计划行车和初始化操作) - path: '/design/runPlan/testRunplan', - component: TestRunplan, - hidden: true - } -]; -export const asyncRouter = [ - { // 公共地图 - path: '/design', - component: Layout, - redirect: '/design/home', - meta: { - roles: [admin, user] - }, - children: [ - { - path: '', - redirect: '/design/home', - component: DesignPlatform, - meta: { - i18n: 'router.designhomePage', - icon: 'design' - }, - children: [ - { - path: 'home', - component: DesignPlatformHome, - meta: { - } - }, - { // 运行图设计 - path: 'runPlan/detail/:mapId', - component: PlanMonitorDetail, - hidden: true - }, - { // 剧本 - path: 'script/home/:mapId', - component: ScriptmanageHome, - meta: { - i18n: 'router.scriptManage' - }, - hidden: true - }, - { // 课程列表 - path: 'lesson/home/:mapId', - component: LessonHome, - hidden: true - }, - { // 操作定义 - path: 'lesson/trainingRule', - component: TrainingRuleList, - hidden: true - }, - { // 操作定义步骤 - path: 'lesson/trainingRule/detail', - hidden: true, - component: TrainingRuleEdit - }, - { // 任务管理 - path: 'lesson/taskManage', - component: Taskmanage, - hidden: true - }, - { // 实训管理 - path: 'lesson/trainingManage', - component: Trainingmanage, - hidden: true - }, - { // 创建课程 - path: 'lesson/edit/:type', - component: LessonEdit, - hidden: true - }, - { // 课程详情 - path: 'lesson/details', - component: LessonDetail, - hidden: true, - children: [ - { - path: 'edit/:type', - component: LessonEdit, - hidden: true - } - ] - }, - { // 新版地图预览 - path: 'mapPreviewNew/:mapId', - component: MapPreviewNew, - hidden: true - }, - { - path: 'bigScreen/:mapId', - component: BigScreen, - hidden: true - }, - { // ibp列表 - path: 'ibp/home/:mapId', - component: IbpHome, - hidden: true - }, - { - path: 'ibp/edit', - component: IbpDraw, - hidden: true - } - ] - } - ] - }, - { // 实训平台 - path: '/trainingPlatform', - component: Layout, - hidden: true, - meta: { - roles: [admin, user, userTrainingPlatform] - }, - children: [ - { - path: '', - component: TrainingPlatform, - meta: { - }, - children: [ - { // 仿真详情 - path: 'detail/:subSystem', - component: DemonstrationDetail, - hidden: true - }, - { // 教学系统 课程列表 - path: 'teachHome/:subSystem', - component: TeachHome, - hidden: true - }, - { // 课程详情 - path: 'teach/:subSystem', - component: TeachDetail, - hidden: true - }, - { // 试卷列表 - path: 'course/:subSystem', - component: ExamCourseDetail, - hidden: true - }, - { // 考试系统 课程列表 - path: 'examHome/:subSystem', - component: ExamHome, - hidden: true - }, - { // 试卷详情 - path: 'exam/:examId', - component: ExamDetail, - hidden: true - }, - { // 试卷列表 - path: 'examRule/manage', - component: PublishExamRule, - hidden: true - }, - { // 创建试卷 - path: 'examRule/draft/:mode/:ruleId/:lessonId', - component: PublishExamRuleDraft, - hidden: true - }, - { // 购买 - path: 'pay/:lessonId', - component: Pay, - hidden: true - }, - { // 考试结果 - path: 'result/:userExamId', - component: ExamResult, - hidden: true - }, - { // 线路权限列表 - path: 'permission/:mapId', - component: Package, - hidden: true - } - ] - } - ] - }, - { // 发布内容管理 - path: '/publish', - component: Layout, - meta: { - i18n: 'router.pulishManage', - roles: [admin] - }, - children: [ - { // 发布地图 - path: 'map', - component: PublishMap, - meta: { - i18n: 'router.publishMapManage' - } - }, - { // 发布历史 - path: 'map/detail', - hidden: true, - component: PublishMapDetail - }, - { // 发布课程 - path: 'lesson', - component: PublishLesson, - meta: { - i18n: 'router.publishLessonManage' - } - }, - { // 模板运行图 - path: 'runPlan/template', - component: RunPlanTemplate, - meta: { - i18n: 'router.runPlanTemplateManage' - } - }, - { // 加载运行图管理 - path: 'runPlan/common', - component: RunPlanCommon, - meta: { - i18n: 'router.runPlanCommonManage' - } - }, - { // 新增加载运行图 - path: 'runPlan/common/:mode', - component: RunPlanCommonDraft, - hidden: true - }, - { // 运行图预览 - path: 'runPlan/view/:mode', - component: RunplanView, - hidden: true - }, - { // 每日运行图 - path: 'runPlan/everyDay', - component: RunPlanEveryDay, - meta: { - i18n: 'router.runPlanEveryDayManage' - } - }, - { // 考试规则列表 - path: 'examRule/manage', - component: PublishExamRule, - meta: { - i18n: 'router.examRuleManage' - } - }, - { - path: 'examRule/draft/:mode/:ruleId/:lessonId', - component: PublishExamRuleDraft, - hidden: true - } - ] - }, - { // 订单权限管理 - path: '/orderauthor', - component: Layout, - meta: { - i18n: 'router.orderAuthorityManage', - roles: [admin] - }, - 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: 'order/draft/:mode/:orderId', - hidden: true, - component: OrderDraft, - meta: { - i18n: 'router.addOrder' - } - }, - { - path: 'transfer/detail/:permissionId', - component: PermissionDetail, - hidden: true - }, - { - path: 'transfer/create', - component: PermissionCreate, - hidden: true - } - ] - }, - { // 系统管理 - path: '/system', - component: Layout, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - 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' - } - }, - { - // 子系统生成 - path: 'systemGenerate', - component: SystemGenerate, - meta: { - i18n: 'router.subsystemGeneration' - } - }, - { // 消息公告 - path: 'news', - component: News, - meta: { - i18n: 'router.newsBulletin' - } - }, - { // 命令管理 - path: 'commands', - component: CommandDictionary, - meta: { - i18n: 'router.commandDictionary' - } - }, - { - path: 'commands/Detail', - hidden: true, - component: CommandDictionaryDetail - }, - { // 线路管理 - path: 'configLine', - component: configLine, - meta: { - i18n: 'router.configLine' - } - }, - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - }, - {// 发布申请 - path: 'approval', - component: Approval, - meta: { - i18n: 'router.releaseApplication' - } - } - ] - } -]; - -const createRouter = () => new VueRouter({ - mode: 'history', // require service support - scrollBehavior: () => ({ y: 0 }), - routes: constantRoutes -}); - -const router = createRouter(); - -// router.beforeEach((to, from, next) => { -// const project = getSessionStorage('project'); -// document.title = loginInfo[project || 'login'].title; -// next(); -// }); - -// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式 -const originalPush = VueRouter.prototype.push; -VueRouter.prototype.push = function push(location) { - return originalPush.call(this, location).catch(err => err); -}; - -export default router; diff --git a/src/scripts/cmdPlugin/CommandHandler.js b/src/scripts/cmdPlugin/CommandHandler.js index f92d043e3..f6bbf9c17 100644 --- a/src/scripts/cmdPlugin/CommandHandler.js +++ b/src/scripts/cmdPlugin/CommandHandler.js @@ -1,5 +1,5 @@ import { sendCommandNew } from '@/api/jmap/training'; -import router from '@/router/index_APP_TARGET'; +import router from '@/router/index'; import Command from './Command'; import Handler from './Handler'; diff --git a/src/scripts/cmdPlugin/Handler.js b/src/scripts/cmdPlugin/Handler.js index d19640426..574b3d2ea 100644 --- a/src/scripts/cmdPlugin/Handler.js +++ b/src/scripts/cmdPlugin/Handler.js @@ -1,5 +1,5 @@ import store from '@/store/index'; -import router from '@/router/index_APP_TARGET'; +import router from '@/router/index'; import CommandHandler from './CommandHandler.js'; import ValidateHandler from './ValidateHandler.js'; import { State2SimulationMap } from './Config.js'; diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 387ce6e2e..8314f639e 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -1,4 +1,4 @@ -import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index_APP_TARGET'; +import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index'; import { loginInfo } from '@/scripts/ProjectConfig'; import { getSessionStorage } from '@/utils/auth'; diff --git a/src/utils/request.js b/src/utils/request.js index df7bc8d42..dcd2705bf 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,7 +8,7 @@ import { getBaseUrl } from '@/utils/baseUrl'; import { EventBus } from '@/scripts/event-bus'; import ConstConfig from '@/scripts/ConstConfig'; import Vue from 'vue'; -import router from '../router/index_APP_TARGET'; +import router from '../router/index'; const BASE_API = getBaseUrl(); diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index cbf1f8f18..1c22495f0 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -22,7 +22,7 @@ - diff --git a/src/views/teach/index.vue b/src/views/teach/index.vue index 094fecccf..c352ac2f7 100644 --- a/src/views/teach/index.vue +++ b/src/views/teach/index.vue @@ -34,7 +34,7 @@ import { getSubSystemDetail } from '@/api/trainingPlatform'; import { UrlConfig } from '@/scripts/ConstDic'; import { forceDeleteLesson } from '@/api/jmap/lesson'; import { getSessionStorage } from '@/utils/auth'; -import { lessonCreater, superAdmin, admin } from '@/router/index_APP_TARGET'; +import { lessonCreater, superAdmin, admin } from '@/router/index'; import { putLessonOffLine, updatePublishLesson } from '@/api/jmap/lesson'; import UpdateOperate from '@/views/publish/publishLesson/draft.vue'; import localStore from 'storejs'; diff --git a/vue.config.js b/vue.config.js index cf61eacda..9fc9cd204 100644 --- a/vue.config.js +++ b/vue.config.js @@ -65,12 +65,12 @@ module.exports = { // }, // parallel: require('os').cpus().length > 1, // 是否为 Babel 或 TypeScript 使用 thread-loader。该选项在系统的 CPU 有多于一个内核时自动启用,仅作用于生产构建。 configureWebpack: config => { - const appTarget = process.env.VUE_APP_PRO == 'local' ? 'HEB' : 'Common'; // 其他环境变量 区分配置 - config.plugins.push(new webpack.NormalModuleReplacementPlugin(/(.*)_APP_TARGET(\.*)/, - function (resourse) { - resourse.request = resourse.request.replace(/APP_TARGET/, `${appTarget}`); - }) - ); + // const appTarget = process.env.VUE_APP_PRO == 'local' ? 'HEB' : 'Common'; // 其他环境变量 区分配置 + // config.plugins.push(new webpack.NormalModuleReplacementPlugin(/(.*)_APP_TARGET(\.*)/, + // function (resourse) { + // resourse.request = resourse.request.replace(/APP_TARGET/, `${appTarget}`); + // }) + // ); if (process.env.NODE_ENV != 'development') { config.mode = 'production';