From c8256de5c7b21d2d8ebebc4e4ba9fb190cdaea20 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 23 Nov 2020 17:32:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E6=9A=82=E6=97=B6=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 ++- src/layout/components/Entry.vue | 15 +++++++---- src/permission.js | 16 +++++++----- src/router/index_Common.js | 26 +++++++++---------- src/scripts/ProjectConfig.js | 45 +++++++++++++++++---------------- src/views/login/index.vue | 17 +++++++------ 6 files changed, 66 insertions(+), 56 deletions(-) diff --git a/src/App.vue b/src/App.vue index 140e6bfeb..48b7c900a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -91,7 +91,8 @@ export default { }, subscribeMessage(res) { if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) { - if (getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' && !(getSessionStorage('project').includes('design'))) { + // getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' && + if (!(getSessionStorage('project').includes('design'))) { this.$refs.deomonTopic.doShow(res); } this.$store.dispatch('socket/setSimulationInvite'); diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue index fef6d8cf0..b9e0b79a3 100644 --- a/src/layout/components/Entry.vue +++ b/src/layout/components/Entry.vue @@ -61,28 +61,33 @@ export default { handle: this.goEmpty, isHelp:true, style:'padding-right:0px;', - hidden:getSessionStorage('project').endsWith('heb') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') + hidden:getSessionStorage('project').endsWith('heb') + // || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') }, { name: 'global.scan', // 扫码 handle: this.qcodeEntry, - hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local' || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') + hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local' + // || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') }, { name: 'global.quickEntry', // 快速入口 handle: this.quickEntry, - hidden: getSessionStorage('project').startsWith('design') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') + hidden: getSessionStorage('project').startsWith('design') + // || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') }, { name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文', handle: this.switchLanguage, - hidden: getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'), + hidden: false, + // getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'), tip: true }, { name: 'global.help', handle: this.goToHelp, - hidden: getSessionStorage('project').endsWith('heb') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') + hidden: getSessionStorage('project').endsWith('heb') + // || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt') } ], diff --git a/src/permission.js b/src/permission.js index 756f714ac..dbba522de 100644 --- a/src/permission.js +++ b/src/permission.js @@ -33,10 +33,10 @@ function getRouteInfo(to) { if (to.query.projectDevice && to.query.type) { loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`; } - if (current_session && current_session == 'jsxt' || current_session && current_session == 'refereeJsxt') { - const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id - loginPath = `${loginPath}?raceId=${raceId}`; - } + // if (current_session && current_session == 'jsxt' || current_session && current_session == 'refereeJsxt') { + // const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id + // loginPath = `${loginPath}?raceId=${raceId}`; + // } return loginPath; } @@ -91,9 +91,11 @@ router.beforeEach((to, from, next) => { next(); } else if (to.path.substr(0, 13) == whiteList[2]) { next(); - } else if (to.path == '/jsxtApply') { - next(); - } else { + } + // else if (to.path == '/jsxtApply') { + // next(); + // } + else { // 否则全部重定向到登录页 next(loginPath); } diff --git a/src/router/index_Common.js b/src/router/index_Common.js index d27b240de..1dbdb7412 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -134,7 +134,7 @@ const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/ind const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport'); const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule'); -import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; +// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { getSessionStorage } from '@/utils/auth'; /** @@ -282,18 +282,18 @@ export const constantRoutes = [ { path: '*', redirect: '/404', hidden: true } ]; // 项目登录路径 -GenerateRouteProjectList.forEach(item => { - constantRoutes.push({ - path: `/${item}/login`, - component: Login, - hidden: true - }); - constantRoutes.push({ - path: `/${item}`, - redirect: `/${item}/login`, - hidden: true - }); -}); +// GenerateRouteProjectList.forEach(item => { +// constantRoutes.push({ +// path: `/${item}/login`, +// component: Login, +// hidden: true +// }); +// constantRoutes.push({ +// path: `/${item}`, +// redirect: `/${item}/login`, +// hidden: true +// }); +// }); // 公共路由不需要过滤 直接可以访问 export const publicAsyncRoute = [ { diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index d18cab427..147f3c3e4 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -205,24 +205,24 @@ export const loginInfo = { navigationMarginLeft: '60px', systemType: '012' }, - jsxt:{ - title: '城市轨道交通竞赛平台', - loginPath: '/jsxt/login', - loginParam: 'DEFAULT', - titleDistance: '-150px', - navigationLogoWidth: '40px', - navigationMarginLeft: '60px', - systemType: '015' - }, - refereeJsxt:{ - title: '城市轨道交通裁判平台', - loginPath: '/refereeJsxt/login', - loginParam: 'DEFAULT', - titleDistance: '-150px', - navigationLogoWidth: '40px', - navigationMarginLeft: '60px', - systemType: '015' - }, + // jsxt:{ + // title: '城市轨道交通竞赛平台', + // loginPath: '/jsxt/login', + // loginParam: 'DEFAULT', + // titleDistance: '-150px', + // navigationLogoWidth: '40px', + // navigationMarginLeft: '60px', + // systemType: '015' + // }, + // refereeJsxt:{ + // title: '城市轨道交通裁判平台', + // loginPath: '/refereeJsxt/login', + // loginParam: 'DEFAULT', + // titleDistance: '-150px', + // navigationLogoWidth: '40px', + // navigationMarginLeft: '60px', + // systemType: '015' + // }, jyd: { title: '城市轨道交通实训平台', loginPath:'/login?project=jyd', @@ -364,8 +364,8 @@ export const ProjectIcon = { designhyd: FaviconHeb, xadt: FaviconXadt, designxadt: FaviconXadt, - jsxt: Favicon, - refereeJsxt: Favicon, + // jsxt: Favicon, + // refereeJsxt: Favicon, jyd: FaviconJyd, designjyd: FaviconJyd, tky: FaviconTky, @@ -405,8 +405,9 @@ export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目 export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示 export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示 -export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目 -export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式 +// export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目 +// 'jsxt', 'refereeJsxt', +export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式 export const NoQrcodeList = ['heb', 'designheb']; export const NoSimulationQrCodeList = ['heb', 'bjd']; export const goOtherPlatformMenu = { // 导航栏快速切换平台 diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ebc7b37c3..a4f1a0b96 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -336,15 +336,16 @@ export default { this.modelType = 'design'; this.loginClient = 'Design'; this.path = UrlConfig.design.prefix; - } else if (this.project.startsWith('jsxt')) { - this.path = '/jsxt/home'; - } else if (this.project.startsWith('refereeJsxt')) { - this.cookiesName = 'UserDesignName'; - this.cookiesToken = 'UserDesignToken'; - this.modelType = 'design'; - this.loginClient = 'Design'; - this.path = '/refereeJsxt/home'; } + // else if (this.project.startsWith('jsxt')) { + // this.path = '/jsxt/home'; + // } else if (this.project.startsWith('refereeJsxt')) { + // this.cookiesName = 'UserDesignName'; + // this.cookiesToken = 'UserDesignToken'; + // this.modelType = 'design'; + // this.loginClient = 'Design'; + // this.path = '/refereeJsxt/home'; + // } const nowLang = LangStorage.getLang('zh'); if (nowLang === 'zh') {