diff --git a/.env.development b/.env.development index 8527b4390..15d17438f 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ # just a flag NODE_ENV = 'development' -# VUE_APP_PRO = 'local' +VUE_APP_PRO = 'local' # base api # VUE_APP_BASE_API = 'https://joylink.club/jlcloud' diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue index 885311959..ed43d9651 100644 --- a/src/layout/components/Entry.vue +++ b/src/layout/components/Entry.vue @@ -94,7 +94,8 @@ export default { designxty: '/xty/login', gzb: '/designgzb/login', designgzb: '/gzb/login', - hyd: '/design/login' + hyd: '/design/login', + designhyd: '/login' } }; }, diff --git a/src/permission.js b/src/permission.js index a22076726..fae7dfe89 100644 --- a/src/permission.js +++ b/src/permission.js @@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) { return roles.some(role => permissionRoles.indexOf(role) >= 0); } -const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay', '/hyd/login']; // 不重定向白名单 +const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay']; // 不重定向白名单 const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/]; @@ -30,17 +30,17 @@ const loginXtyPage = whiteList[2]; const loginDesignXtyPage = whiteList[3]; const loginGzbPage = whiteList[4]; const loginDesignGzbPage = whiteList[5]; -const loginHydPage = whiteList[7]; const loginDesignPageMenu = { design: loginDesignPage, designxty: loginDesignXtyPage, - designgzb: loginDesignGzbPage + designgzb: loginDesignGzbPage, + designhyd: loginDesignPage }; const loginPageMenu = { login: loginPage, xty: loginXtyPage, gzb: loginGzbPage, - hyd: loginHydPage + hyd: loginPage }; // 获取路径数据 function getRouteInfo(to) { @@ -66,14 +66,6 @@ function getRouteInfo(to) { } else if ( /^\/gzb/.test(toRoutePath)) { loginPath = loginGzbPage; clientId = null; - } else if (/^\/hyd/.test(toRoutePath)) { - if (process.env.VUE_APP_PRO === 'local') { - loginPath = loginPage; - } else { - loginPath = loginHydPage; - } - clientId = null; - } else { loginPath = loginPageMenu[current_session] || loginPath; clientId = null; @@ -135,17 +127,16 @@ router.beforeEach((to, from, next) => { handleRoute(to, from, next, routeInfo); } } else { - //继电器使用 + // 继电器使用 console.log(to); // 未登录情况下 if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入 next(); - } else if(to.path.substr(0,13) == whiteList[6]){ + } else if (to.path.substr(0, 13) == whiteList[6]) { next(); - } - else{ + } else { // 否则全部重定向到登录页 next(routeInfo.loginPath); } diff --git a/src/router/index_Common.js b/src/router/index_Common.js index e80d74501..f467a4aea 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -185,16 +185,6 @@ export const constantRoutes = [ redirect: '/gzb/login', hidden: true }, - { - path: '/hyd/login', - component: Login, - hidden: true - }, - { - path: '/hyd', - redirect: '/hyd/login', - hidden: true - }, // 设计平台登录 { path: '/design/login', diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index f08ef89bc..8c1af282b 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -2244,7 +2244,11 @@ export const loginInfo = { }, hyd: { title: '城市轨道交通实训平台', - loginPath: '/hyd/login' + loginPath: '/login' + }, + designhyd: { + title: '城市轨道交通设计平台', + loginPath: '/design/login' } }; diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 8b39259bf..47b58daa5 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -4,8 +4,8 @@ {{ $t('map.publishedMapList') }}
- - + +
@@ -71,7 +71,7 @@ export default { removeSessionStorage('demonList'); }, mounted() { - if (this.project === 'designxty' || this.project === 'designgzb') { + if (this.project === 'designxty' || this.project === 'designgzb' || this.project === 'designhyd') { this.refresh(); } }, diff --git a/src/views/login/hydLogin.vue b/src/views/login/hydLogin.vue index dfeb522d3..a0ff99b9a 100644 --- a/src/views/login/hydLogin.vue +++ b/src/views/login/hydLogin.vue @@ -163,7 +163,7 @@ export default { this.modelType = 'design'; this.loginClient = 'Design'; this.path = UrlConfig.design.prefix; - sessionVal = 'design'; + sessionVal = 'designhyd'; } const nowLang = LangStorage.getLang('zh');