哈尔滨本地项目调整

This commit is contained in:
fan 2020-04-03 13:33:33 +08:00
parent 62131c2166
commit ba759b1d77
7 changed files with 19 additions and 33 deletions

View File

@ -1,6 +1,6 @@
# just a flag # just a flag
NODE_ENV = 'development' NODE_ENV = 'development'
# VUE_APP_PRO = 'local' VUE_APP_PRO = 'local'
# base api # base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud' # VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

@ -94,7 +94,8 @@ export default {
designxty: '/xty/login', designxty: '/xty/login',
gzb: '/designgzb/login', gzb: '/designgzb/login',
designgzb: '/gzb/login', designgzb: '/gzb/login',
hyd: '/design/login' hyd: '/design/login',
designhyd: '/login'
} }
}; };
}, },

View File

@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) {
return roles.some(role => permissionRoles.indexOf(role) >= 0); 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/]; 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 loginDesignXtyPage = whiteList[3];
const loginGzbPage = whiteList[4]; const loginGzbPage = whiteList[4];
const loginDesignGzbPage = whiteList[5]; const loginDesignGzbPage = whiteList[5];
const loginHydPage = whiteList[7];
const loginDesignPageMenu = { const loginDesignPageMenu = {
design: loginDesignPage, design: loginDesignPage,
designxty: loginDesignXtyPage, designxty: loginDesignXtyPage,
designgzb: loginDesignGzbPage designgzb: loginDesignGzbPage,
designhyd: loginDesignPage
}; };
const loginPageMenu = { const loginPageMenu = {
login: loginPage, login: loginPage,
xty: loginXtyPage, xty: loginXtyPage,
gzb: loginGzbPage, gzb: loginGzbPage,
hyd: loginHydPage hyd: loginPage
}; };
// 获取路径数据 // 获取路径数据
function getRouteInfo(to) { function getRouteInfo(to) {
@ -66,14 +66,6 @@ function getRouteInfo(to) {
} else if ( /^\/gzb/.test(toRoutePath)) { } else if ( /^\/gzb/.test(toRoutePath)) {
loginPath = loginGzbPage; loginPath = loginGzbPage;
clientId = null; clientId = null;
} else if (/^\/hyd/.test(toRoutePath)) {
if (process.env.VUE_APP_PRO === 'local') {
loginPath = loginPage;
} else {
loginPath = loginHydPage;
}
clientId = null;
} else { } else {
loginPath = loginPageMenu[current_session] || loginPath; loginPath = loginPageMenu[current_session] || loginPath;
clientId = null; clientId = null;
@ -135,17 +127,16 @@ router.beforeEach((to, from, next) => {
handleRoute(to, from, next, routeInfo); handleRoute(to, from, next, routeInfo);
} }
} else { } else {
//继电器使用 // 继电器使用
console.log(to); console.log(to);
// 未登录情况下 // 未登录情况下
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入 // 在免登录白名单,直接进入
next(); next();
} else if(to.path.substr(0,13) == whiteList[6]){ } else if (to.path.substr(0, 13) == whiteList[6]) {
next(); next();
} } else {
else{
// 否则全部重定向到登录页 // 否则全部重定向到登录页
next(routeInfo.loginPath); next(routeInfo.loginPath);
} }

View File

@ -185,16 +185,6 @@ export const constantRoutes = [
redirect: '/gzb/login', redirect: '/gzb/login',
hidden: true hidden: true
}, },
{
path: '/hyd/login',
component: Login,
hidden: true
},
{
path: '/hyd',
redirect: '/hyd/login',
hidden: true
},
// 设计平台登录 // 设计平台登录
{ {
path: '/design/login', path: '/design/login',

View File

@ -2244,7 +2244,11 @@ export const loginInfo = {
}, },
hyd: { hyd: {
title: '城市轨道交通实训平台', title: '城市轨道交通实训平台',
loginPath: '/hyd/login' loginPath: '/login'
},
designhyd: {
title: '城市轨道交通设计平台',
loginPath: '/design/login'
} }
}; };

View File

@ -4,8 +4,8 @@
<span>{{ $t('map.publishedMapList') }}</span> <span>{{ $t('map.publishedMapList') }}</span>
</div> </div>
<div class="text_item"> <div class="text_item">
<filter-city v-if="project==='design'" ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" /> <filter-city v-if="project==='design'|| project==='designhyd'" ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
<el-input v-if="project==='design'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable /> <el-input v-if="project==='design'|| project==='designhyd'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<div class="tree_mian_box"> <div class="tree_mian_box">
<el-tree ref="tree" class="tree_box" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent"> <el-tree ref="tree" class="tree_box" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">
<span slot-scope="{ node:tnode, data }"> <span slot-scope="{ node:tnode, data }">
@ -71,7 +71,7 @@ export default {
removeSessionStorage('demonList'); removeSessionStorage('demonList');
}, },
mounted() { mounted() {
if (this.project === 'designxty' || this.project === 'designgzb') { if (this.project === 'designxty' || this.project === 'designgzb' || this.project === 'designhyd') {
this.refresh(); this.refresh();
} }
}, },

View File

@ -163,7 +163,7 @@ export default {
this.modelType = 'design'; this.modelType = 'design';
this.loginClient = 'Design'; this.loginClient = 'Design';
this.path = UrlConfig.design.prefix; this.path = UrlConfig.design.prefix;
sessionVal = 'design'; sessionVal = 'designhyd';
} }
const nowLang = LangStorage.getLang('zh'); const nowLang = LangStorage.getLang('zh');