Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
68340271f1
@ -3,6 +3,9 @@
|
||||
<div style="text-align:center; margin:auto;">
|
||||
<qrcode-vue v-loading="loading" :value="url" :size="400" />
|
||||
</div>
|
||||
<div v-if="group" style="text-align: center;font-size: 18px;font-weight: bold; margin-top:40px;">
|
||||
<span>{{ $t('global.roomId')+group }}</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="doClose">{{ $t('global.close') }}</el-button>
|
||||
</span>
|
||||
@ -20,7 +23,8 @@ export default {
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
loading: false,
|
||||
url: ''
|
||||
url: '',
|
||||
group: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -34,6 +38,7 @@ export default {
|
||||
this.url = data.url;
|
||||
this.title = data.title;
|
||||
this.dialogVisible = true;
|
||||
this.group = data.group;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
|
@ -205,5 +205,6 @@ export default {
|
||||
buyingTips: 'Function upgrade, stay tuned!',
|
||||
permissionAllNum:'Total permissions',
|
||||
set: 'Set',
|
||||
joinNewRoom: 'Join new room'
|
||||
joinNewRoom: 'Join new room',
|
||||
roomId: 'RoomId:'
|
||||
};
|
||||
|
@ -205,5 +205,6 @@ export default {
|
||||
buyingTips: '功能升级中, 敬请期待!',
|
||||
permissionAllNum:'权限总数',
|
||||
set: '设 置',
|
||||
joinNewRoom: '加入新房间'
|
||||
joinNewRoom: '加入新房间',
|
||||
roomId: '房间号:'
|
||||
};
|
||||
|
@ -189,7 +189,8 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -204,7 +205,8 @@ export default {
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -226,7 +228,8 @@ export default {
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ class Theme {
|
||||
constructor(code) {
|
||||
this._code = '02';
|
||||
this._mapMenu = {
|
||||
// '01': 'chengdu_01',
|
||||
'01': 'xian_02',
|
||||
'01': 'chengdu_01',
|
||||
// '01': 'xian_02',
|
||||
'02': 'fuzhou_01',
|
||||
'03': 'beijing_01',
|
||||
'04': 'chengdu_03',
|
||||
|
@ -166,7 +166,8 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -182,7 +183,8 @@ export default {
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -206,7 +208,8 @@ export default {
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import {PermissionParam} from '@/scripts/ProjectConfig';
|
||||
import NProgress from 'nprogress';
|
||||
import { admin} from './router/index_APP_TARGET';
|
||||
import { getToken, removeToken} from '@/utils/auth';
|
||||
@ -14,7 +15,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', '/xadt/login', '/designxadt/login']; // 不重定向白名单
|
||||
const whiteList = ['/login', '/design/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/];
|
||||
|
||||
@ -23,61 +24,35 @@ function isDesignPage(toRoutePath) {
|
||||
return item.test(toRoutePath);
|
||||
});
|
||||
}
|
||||
|
||||
for (const val in PermissionParam) {
|
||||
whiteList.push(PermissionParam[val].whitePage);
|
||||
}
|
||||
const loginPage = whiteList[0];
|
||||
const loginDesignPage = whiteList[1];
|
||||
const loginXtyPage = whiteList[2];
|
||||
const loginDesignXtyPage = whiteList[3];
|
||||
const loginGzbPage = whiteList[4];
|
||||
const loginDesignGzbPage = whiteList[5];
|
||||
const loginXasPage = whiteList[7];
|
||||
const loginDesignXasPage = whiteList[8];
|
||||
const loginDesignPageMenu = {
|
||||
design: loginDesignPage,
|
||||
designxty: loginDesignXtyPage,
|
||||
designgzb: loginDesignGzbPage,
|
||||
designhyd: loginDesignPage,
|
||||
designxadt: loginDesignXasPage
|
||||
};
|
||||
const loginPageMenu = {
|
||||
login: loginPage,
|
||||
xty: loginXtyPage,
|
||||
gzb: loginGzbPage,
|
||||
hyd: loginPage,
|
||||
xadt: loginXasPage
|
||||
};
|
||||
|
||||
// 获取路径数据
|
||||
function getRouteInfo(to) {
|
||||
let loginPath = '/login';
|
||||
let loginPath = '';
|
||||
let clientId = '';
|
||||
const toRoutePath = to.redirectedFrom || to.path;
|
||||
const current_session = getSessionStorage('project');
|
||||
if (/^\/designxty/.test(toRoutePath)) {
|
||||
loginPath = loginDesignXtyPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (/^\/designxadt/.test(toRoutePath)) {
|
||||
loginPath = loginDesignXasPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (/^\/designgzb/.test(toRoutePath)) {
|
||||
loginPath = loginDesignGzbPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (isDesignPage(toRoutePath)) {
|
||||
loginPath = loginDesignPageMenu[current_session] || loginDesignPage;
|
||||
for (const val in PermissionParam) {
|
||||
if (PermissionParam[val].reg.test(toRoutePath)) {
|
||||
loginPath = PermissionParam[val].whitePage;
|
||||
clientId = PermissionParam[val].clientId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isDesignPage(toRoutePath)) {
|
||||
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
||||
loginPath = whitePage || loginDesignPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
if (current_session && !current_session.startsWith('design')) {
|
||||
removeToken();
|
||||
}
|
||||
} else if ( /^\/xty/.test(toRoutePath)) {
|
||||
loginPath = loginXtyPage;
|
||||
clientId = null;
|
||||
} else if ( /^\/gzb/.test(toRoutePath)) {
|
||||
loginPath = loginGzbPage;
|
||||
clientId = null;
|
||||
} else if ( /^\/xadt/.test(toRoutePath)) {
|
||||
loginPath = loginXasPage;
|
||||
clientId = null;
|
||||
} else {
|
||||
loginPath = loginPageMenu[current_session] || loginPath;
|
||||
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
||||
loginPath = whitePage || loginPage;
|
||||
clientId = null;
|
||||
if (current_session && current_session.startsWith('design')) {
|
||||
removeToken();
|
||||
@ -143,7 +118,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next();
|
||||
} else if (to.path.substr(0, 13) == whiteList[6]) {
|
||||
} else if (to.path.substr(0, 13) == whiteList[2]) {
|
||||
next();
|
||||
} else {
|
||||
// 否则全部重定向到登录页
|
||||
|
@ -4,8 +4,9 @@ import FaviconXty from '@/assets/icon/favicon_xty.png';
|
||||
import FaviconGzb from '@/assets/icon/favicon_gzb.png';
|
||||
import FaviconHyd from '@/assets/icon/favicon_hyd.png';
|
||||
import FaviconXadt from '@/assets/icon/favicon_xas.png';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
|
||||
export const loginInfo = {
|
||||
export const loginInfo = { // 页面title & 退出登录跳转路径
|
||||
xty: {
|
||||
title: '西安铁路职业技术学院城市轨道交通实训平台',
|
||||
loginPath: '/xty/login'
|
||||
@ -73,8 +74,8 @@ export const ProjectCode = {
|
||||
};
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['hyd', 'designhyd']; // 案例展示隐藏的项目
|
||||
export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt'];// 需要在公共路由中生成登录页面的项目
|
||||
export const goOtherPlatformMenu = {
|
||||
export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt'];// 需要在公共路由中生成登录页面的项目&登录页样式
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
login: '/design/login',
|
||||
design: '/login',
|
||||
xty: '/designxty/login',
|
||||
@ -86,3 +87,40 @@ export const goOtherPlatformMenu = {
|
||||
xadt: '/designxadt/login',
|
||||
designxadt: '/xadt/login'
|
||||
};
|
||||
export const PermissionParam = { // 路径权限处理所需参数配置(跳转白名单&路径正则匹配&clientId)
|
||||
designxty: {
|
||||
whitePage: '/designxty/login',
|
||||
reg: /^\/designxty/,
|
||||
clientId: LoginParams.Design.clientId
|
||||
},
|
||||
designgzb: {
|
||||
whitePage: '/designgzb/login',
|
||||
reg: /^\/designgzb/,
|
||||
clientId: LoginParams.Design.clientId
|
||||
},
|
||||
designxadt: {
|
||||
whitePage: '/designxadt/login',
|
||||
reg: /^\/designxadt/,
|
||||
clientId: LoginParams.Design.clientId
|
||||
},
|
||||
xty: {
|
||||
whitePage: '/xty/login',
|
||||
reg: /^\/xty/,
|
||||
clientId: null
|
||||
},
|
||||
gzb: {
|
||||
whitePage: '/gzb/login',
|
||||
reg: /^\/gzb/,
|
||||
clientId: null
|
||||
},
|
||||
xadt: {
|
||||
whitePage: '/xadt/login',
|
||||
reg: /^\/xadt/,
|
||||
clientId: null
|
||||
}
|
||||
};
|
||||
export const ProjectList = [
|
||||
{value:'xty', label:'西铁院'},
|
||||
{value: 'gzb', label: '贵州装备'},
|
||||
{value: 'xadt', label: '西安地铁'}
|
||||
];
|
||||
|
@ -103,7 +103,7 @@ import { getLoginWmurl, checkLoginStatus } from '@/api/login';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import bgImg from '@/assets/bg1.jpg';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { loginInfo, ProjectIcon} from '@/scripts/ProjectConfig';
|
||||
import { loginInfo, ProjectIcon, GenerateRouteProjectList} from '@/scripts/ProjectConfig';
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import FloatPart from './floatPart';
|
||||
@ -167,7 +167,7 @@ export default {
|
||||
},
|
||||
isProject() {
|
||||
const projectName = this.$route.path.split('/')[1];
|
||||
return projectName.endsWith('xty') || projectName.endsWith('gzb') || projectName.endsWith('hyd') || projectName.endsWith('xadt');
|
||||
return GenerateRouteProjectList.includes(projectName);
|
||||
},
|
||||
logoImg() {
|
||||
const projectName = this.$route.path.split('/')[1];
|
||||
|
@ -64,25 +64,26 @@ export default {
|
||||
// this.validateText = this.$t('rules.pleaseEnterMapName');
|
||||
return false;
|
||||
}
|
||||
// const loading = this.$loading({
|
||||
// lock: true,
|
||||
// text: '正在导入中...',
|
||||
// spinner: 'el-icon-loading',
|
||||
// background: 'rgba(0, 0, 0, 0.7)'
|
||||
// });
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在导入中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const that = this;
|
||||
that.loading = true;
|
||||
this.jsonData.name = this.editModel.name;
|
||||
this.dialogShow = false;
|
||||
this.validateText = '';
|
||||
postBuildMapImport(this.jsonData).then(res => {
|
||||
// loading.close();
|
||||
loading.close();
|
||||
that.loading = false;
|
||||
that.$message.success('导入成功!');
|
||||
// that.loadInitData();
|
||||
this.$emit('loadInitData');
|
||||
// loading.close();
|
||||
this.close();
|
||||
}).catch(error => {
|
||||
// loading.close();
|
||||
loading.close();
|
||||
that.loading = false;
|
||||
this.close();
|
||||
that.$message.error('导入失败' + error.message);
|
||||
|
@ -11,6 +11,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { ProjectList} from '@/scripts/ProjectConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
export default {
|
||||
name: 'CreateSubSystem',
|
||||
@ -27,7 +28,6 @@ export default {
|
||||
dialogVisible: false,
|
||||
disabled:null,
|
||||
productList:[],
|
||||
projectList:[],
|
||||
typeList:[],
|
||||
formModel:{
|
||||
customized:'',
|
||||
@ -52,7 +52,7 @@ export default {
|
||||
form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: this.projectList},
|
||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: ProjectList},
|
||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList},
|
||||
{ prop: 'prdType', label: this.$t('system.prdType'), type: 'select', required: true, options:this.prdTypeList},
|
||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
||||
@ -105,7 +105,6 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
loadInitData() {
|
||||
this.projectList = [{value:'xty', label:'西铁院'}, {value: 'gzb', label: '贵州装备'}, {value: 'xadt', label: '西安地铁'}];
|
||||
const customeredProductType = ConstConfig.ConstSelect.customeredProductType;
|
||||
this.typeList = Cookies.get('user_lang') == 'en'
|
||||
? customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
||||
|
@ -385,7 +385,8 @@ export default {
|
||||
if (res.code == '200') {
|
||||
const param = {
|
||||
url: res.data,
|
||||
title: this.$t('trainRoom.distributeTheRoomQRCode')
|
||||
title: this.$t('trainRoom.distributeTheRoomQRCode'),
|
||||
group: this.group
|
||||
};
|
||||
if (this.$refs) {
|
||||
this.$refs.qrCode.doShow(param);
|
||||
|
Loading…
Reference in New Issue
Block a user