哈尔滨本地项目调整

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
NODE_ENV = 'development'
# VUE_APP_PRO = 'local'
VUE_APP_PRO = 'local'
# base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

@ -94,7 +94,8 @@ export default {
designxty: '/xty/login',
gzb: '/designgzb/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);
}
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);
}

View File

@ -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',

View File

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

View File

@ -4,8 +4,8 @@
<span>{{ $t('map.publishedMapList') }}</span>
</div>
<div class="text_item">
<filter-city v-if="project==='design'" 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 />
<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'|| project==='designhyd'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<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">
<span slot-scope="{ node:tnode, data }">
@ -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();
}
},

View File

@ -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');