Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
87c86536df
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-button ref="menuButton" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
|
@ -113,6 +113,7 @@ import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
@ -121,6 +122,14 @@ export default {
|
||||
PasswordBox,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
@ -142,6 +151,7 @@ export default {
|
||||
timer: null,
|
||||
deviceTimer: null,
|
||||
routeDataMap: null,
|
||||
routeButtonCodeList: [], // 进路点击按钮名称拼接name list
|
||||
guideLockRightFlag: false,
|
||||
guideLockLeftFlag: false
|
||||
};
|
||||
@ -232,16 +242,7 @@ export default {
|
||||
methods: {
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.overNext) {
|
||||
operate = {
|
||||
over: true,
|
||||
code: data.code,
|
||||
operation: data.operation,
|
||||
cmdType: this.cmdType,
|
||||
param: data.param
|
||||
};
|
||||
|
||||
} else if (data.nextCmdType) {
|
||||
if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
@ -255,7 +256,6 @@ export default {
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
@ -336,9 +336,7 @@ export default {
|
||||
const operationList = [
|
||||
this.Signal.humanTrainRoute.button.operation,
|
||||
this.Section.fault.button.operation
|
||||
// this.Switch.guideLock.leftButton.operation
|
||||
];
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
@ -371,10 +369,21 @@ export default {
|
||||
},
|
||||
handleRouteDataMap() {
|
||||
this.routeDataMap = {};
|
||||
this.routeButtonCodeList = [];
|
||||
this.routeList.forEach(item => {
|
||||
this.routeDataMap[item.btnCodeList.join('-')] = item;
|
||||
const name = item.btnCodeList.join('-');
|
||||
this.routeDataMap[name] = item;
|
||||
this.routeButtonCodeList.push(name);
|
||||
});
|
||||
},
|
||||
checkHaveRoute(deviceList) {
|
||||
let name = '';
|
||||
deviceList.forEach((device, index) =>{
|
||||
name = name + (index ? '-' : '') + device.code;
|
||||
});
|
||||
console.log(name, this.routeButtonCodeList);
|
||||
return this.routeButtonCodeList.some(item => item.includes(name));
|
||||
},
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
@ -384,14 +393,17 @@ export default {
|
||||
if (this.deviceTimer) {
|
||||
clearTimeout(this.deviceTimer);
|
||||
}
|
||||
const _that = this;
|
||||
if (!this.checkHaveRoute(deviceList)) {
|
||||
this.clearOperate();
|
||||
return;
|
||||
}
|
||||
this.deviceTimer = setTimeout(() => {
|
||||
if (deviceList[0]._type === 'SignalButton') {
|
||||
_that.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING') {
|
||||
_that.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
}
|
||||
_that.deviceList = [];
|
||||
this.deviceList = [];
|
||||
}, 15000);
|
||||
let signal = {};
|
||||
if (deviceList[0]._type === 'Signal') {
|
||||
@ -441,7 +453,7 @@ export default {
|
||||
if (deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING') {
|
||||
_that.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
}
|
||||
this.deviceTimer && clearTimeout(this.deviceTimer);
|
||||
}).catch(() => {
|
||||
@ -499,7 +511,6 @@ export default {
|
||||
handleTotalHumanSolution(model) {
|
||||
const operate = {
|
||||
send: true,
|
||||
overNext: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
@ -639,6 +650,9 @@ export default {
|
||||
}
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||
if (this.selected._event !== MouseEvent.Left) {
|
||||
return;
|
||||
}
|
||||
const subType = this.$store.state.menuOperation.subType; // 选择设备的子元素
|
||||
const switchOperation = [
|
||||
this.Switch.lock.button.operation,
|
||||
|
@ -98,6 +98,16 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '011'
|
||||
},
|
||||
wjls: {
|
||||
title: '微机联锁仿真系统',
|
||||
loginPath: '/login?project=wjls',
|
||||
loginParam: 'WJLS',
|
||||
loginTitle: '空串',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
logoWidth: '0',
|
||||
systemType: '011'
|
||||
},
|
||||
drts: {
|
||||
title: '2020年“新誉杯”全国行车调度员大赛训练系统',
|
||||
loginPath: '/login?project=drts',
|
||||
@ -430,6 +440,7 @@ export const ProjectIcon = {
|
||||
designcrsc: FaviconCrsc,
|
||||
hls: FaviconHls,
|
||||
designhls: FaviconHls,
|
||||
wjls: Favicon,
|
||||
drts: Favicon,
|
||||
designdrts: Favicon,
|
||||
nty: FaviconNty,
|
||||
@ -457,6 +468,7 @@ export const ProjectCode = {
|
||||
designheb: 'HEB',
|
||||
xadt: 'XADT',
|
||||
designxadt: 'XADT',
|
||||
wjls: 'WJLS',
|
||||
drts: 'DRTS',
|
||||
designdrts: 'DRTS',
|
||||
nty: 'NTY',
|
||||
@ -473,12 +485,12 @@ export const ProjectCode = {
|
||||
designcgy: 'CGY'
|
||||
};
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角主体不展示
|
||||
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', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'designntyl'];
|
||||
export const NoSimulationQrCodeList = ['heb', 'bjd'];
|
||||
export const RegisterCodeList = ['cgy', 'designcgy'];
|
||||
@ -530,7 +542,8 @@ export const ProjectList = [
|
||||
{value: 'bjd', label: '北交大'},
|
||||
{value: 'urtss', label: '陪标项目'},
|
||||
{value: 'sdy', label: '苏电院'},
|
||||
{value: 'cgy', label: '成都工业'}
|
||||
{value: 'cgy', label: '成都工业'},
|
||||
{value: 'wjls', label: '微机联锁'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
localdesign: 'designheb',
|
||||
|
@ -149,6 +149,7 @@ import { removeToken, getToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import FloatPart from './floatPart';
|
||||
import { getSimulationInfoNew } from '@/api/simulation';
|
||||
import { getSimulationInfoByGroup } from '@/api/rtSimulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import Register from './register';
|
||||
@ -515,8 +516,24 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (this.project === 'drts' || this.project === 'bjd') {
|
||||
} else if (this.project === 'drts' || this.project === 'bjd' || this.project === 'wjls') {
|
||||
getLoginInfo(getToken()).then(res => {
|
||||
if (this.project === 'wjls') {
|
||||
getSimulationInfoByGroup(res.data.group).then(resp =>{
|
||||
this.$router.push({ path: `/displayCity/demon`, query: {
|
||||
lineCode: resp.data.map.lineCode,
|
||||
group: res.data.group,
|
||||
prdType: resp.data.prodType,
|
||||
mapId: resp.data.map.id,
|
||||
goodsId:'',
|
||||
try:'0',
|
||||
newApi:true,
|
||||
project:this.project
|
||||
}});
|
||||
this.loading = false;
|
||||
launchFullscreen();
|
||||
});
|
||||
} else {
|
||||
getSimulationInfoNew(res.data.group).then(resp => {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
if (this.project === 'drts') {
|
||||
@ -538,10 +555,10 @@ export default {
|
||||
project:this.project
|
||||
}});
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
launchFullscreen();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$router.push({ path: this.path });
|
||||
|
@ -30,7 +30,7 @@
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
</template>
|
||||
</template>
|
||||
<el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||
<el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice || project === 'wjls'?'退出':$t('display.demon.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -248,7 +248,7 @@ export default {
|
||||
},
|
||||
async back() {
|
||||
this.isGoback = true;
|
||||
if (this.projectDevice) {
|
||||
if (this.projectDevice || this.project === 'wjls') {
|
||||
clearSimulation(this.group).then(res=>{
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user