屏蔽暂时无用代码

This commit is contained in:
joylink_cuiweidong 2020-11-23 17:32:17 +08:00
parent ce5287964b
commit c8256de5c7
6 changed files with 66 additions and 56 deletions

View File

@ -91,7 +91,8 @@ export default {
}, },
subscribeMessage(res) { subscribeMessage(res) {
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) { 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.$refs.deomonTopic.doShow(res);
} }
this.$store.dispatch('socket/setSimulationInvite'); this.$store.dispatch('socket/setSimulationInvite');

View File

@ -61,28 +61,33 @@ export default {
handle: this.goEmpty, handle: this.goEmpty,
isHelp:true, isHelp:true,
style:'padding-right:0px;', 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', // name: 'global.scan', //
handle: this.qcodeEntry, 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', // name: 'global.quickEntry', //
handle: this.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' : '中文', name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文',
handle: this.switchLanguage, handle: this.switchLanguage,
hidden: getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'), hidden: false,
// getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'),
tip: true tip: true
}, },
{ {
name: 'global.help', name: 'global.help',
handle: this.goToHelp, 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')
} }
], ],

View File

@ -33,10 +33,10 @@ function getRouteInfo(to) {
if (to.query.projectDevice && to.query.type) { if (to.query.projectDevice && to.query.type) {
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`; loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
} }
if (current_session && current_session == 'jsxt' || current_session && current_session == 'refereeJsxt') { // if (current_session && current_session == 'jsxt' || current_session && current_session == 'refereeJsxt') {
const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id // const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
loginPath = `${loginPath}?raceId=${raceId}`; // loginPath = `${loginPath}?raceId=${raceId}`;
} // }
return loginPath; return loginPath;
} }
@ -91,9 +91,11 @@ router.beforeEach((to, from, next) => {
next(); next();
} else if (to.path.substr(0, 13) == whiteList[2]) { } else if (to.path.substr(0, 13) == whiteList[2]) {
next(); next();
} else if (to.path == '/jsxtApply') { }
next(); // else if (to.path == '/jsxtApply') {
} else { // next();
// }
else {
// 否则全部重定向到登录页 // 否则全部重定向到登录页
next(loginPath); next(loginPath);
} }

View File

@ -134,7 +134,7 @@ const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/ind
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport'); const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule'); const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
/** /**
@ -282,18 +282,18 @@ export const constantRoutes = [
{ path: '*', redirect: '/404', hidden: true } { path: '*', redirect: '/404', hidden: true }
]; ];
// 项目登录路径 // 项目登录路径
GenerateRouteProjectList.forEach(item => { // GenerateRouteProjectList.forEach(item => {
constantRoutes.push({ // constantRoutes.push({
path: `/${item}/login`, // path: `/${item}/login`,
component: Login, // component: Login,
hidden: true // hidden: true
}); // });
constantRoutes.push({ // constantRoutes.push({
path: `/${item}`, // path: `/${item}`,
redirect: `/${item}/login`, // redirect: `/${item}/login`,
hidden: true // hidden: true
}); // });
}); // });
// 公共路由不需要过滤 直接可以访问 // 公共路由不需要过滤 直接可以访问
export const publicAsyncRoute = [ export const publicAsyncRoute = [
{ {

View File

@ -205,24 +205,24 @@ export const loginInfo = {
navigationMarginLeft: '60px', navigationMarginLeft: '60px',
systemType: '012' systemType: '012'
}, },
jsxt:{ // jsxt:{
title: '城市轨道交通竞赛平台', // title: '城市轨道交通竞赛平台',
loginPath: '/jsxt/login', // loginPath: '/jsxt/login',
loginParam: 'DEFAULT', // loginParam: 'DEFAULT',
titleDistance: '-150px', // titleDistance: '-150px',
navigationLogoWidth: '40px', // navigationLogoWidth: '40px',
navigationMarginLeft: '60px', // navigationMarginLeft: '60px',
systemType: '015' // systemType: '015'
}, // },
refereeJsxt:{ // refereeJsxt:{
title: '城市轨道交通裁判平台', // title: '城市轨道交通裁判平台',
loginPath: '/refereeJsxt/login', // loginPath: '/refereeJsxt/login',
loginParam: 'DEFAULT', // loginParam: 'DEFAULT',
titleDistance: '-150px', // titleDistance: '-150px',
navigationLogoWidth: '40px', // navigationLogoWidth: '40px',
navigationMarginLeft: '60px', // navigationMarginLeft: '60px',
systemType: '015' // systemType: '015'
}, // },
jyd: { jyd: {
title: '城市轨道交通实训平台', title: '城市轨道交通实训平台',
loginPath:'/login?project=jyd', loginPath:'/login?project=jyd',
@ -364,8 +364,8 @@ export const ProjectIcon = {
designhyd: FaviconHeb, designhyd: FaviconHeb,
xadt: FaviconXadt, xadt: FaviconXadt,
designxadt: FaviconXadt, designxadt: FaviconXadt,
jsxt: Favicon, // jsxt: Favicon,
refereeJsxt: Favicon, // refereeJsxt: Favicon,
jyd: FaviconJyd, jyd: FaviconJyd,
designjyd: FaviconJyd, designjyd: FaviconJyd,
tky: FaviconTky, tky: FaviconTky,
@ -405,8 +405,9 @@ export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb',
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目 export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示 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 MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目 // 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']; // 登录页样式 // '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 NoQrcodeList = ['heb', 'designheb'];
export const NoSimulationQrCodeList = ['heb', 'bjd']; export const NoSimulationQrCodeList = ['heb', 'bjd'];
export const goOtherPlatformMenu = { // 导航栏快速切换平台 export const goOtherPlatformMenu = { // 导航栏快速切换平台

View File

@ -336,15 +336,16 @@ export default {
this.modelType = 'design'; this.modelType = 'design';
this.loginClient = 'Design'; this.loginClient = 'Design';
this.path = UrlConfig.design.prefix; 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'); const nowLang = LangStorage.getLang('zh');
if (nowLang === 'zh') { if (nowLang === 'zh') {