This commit is contained in:
fan 2020-07-29 18:27:19 +08:00
commit c741783ea0
8 changed files with 42 additions and 44 deletions

View File

@ -7,7 +7,7 @@
<el-row class="nav-border-row">
<template v-for="(item, index) in centralizedStationList">
<div :key="index" class="nav-border-row row-width-box flex-row">
<div v-if="item.name && item.disabled" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
<div v-if="item.name && item.disabled" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
<div v-else-if="item.name && !item.securityCommand " :id="item.operate.domId" class="fake-button-active" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-security" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
<div v-else class="fake-button" />
@ -82,8 +82,8 @@ export default {
'border-bottom': 'none',
'border-right': 'none',
'padding': 0
},
selectedObj: null,
},
selectedObj: null,
oldClickObj: null, //
route: null, //
centralizedStationList: new Array(15).fill({}),
@ -109,7 +109,7 @@ export default {
},
watch: {
'$store.state.menuOperation.setMenuChangeCount': function (val) {
this.selectedObj = this.selected;
this.selectedObj = this.selected;
if (this.selectedObj._type) {
if (this.selectedObj._type == 'Section' && (this.selectedObj.type == '03' || this.selectedObj.type == '04')) { //
this.selectedObj = this.selectedObj.switch;
@ -118,10 +118,10 @@ export default {
const step = {
operation: 'click',
code: this.selectedObj.code
};
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
switch (this.selectedObj._type) {
case 'Switch':
this.handleSwicthMenu();
@ -141,7 +141,7 @@ export default {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
break;
break;
}
}
}).catch((error) => {
@ -226,7 +226,7 @@ export default {
this.centralizedStationList = new Array(15).fill({});
this.switchParamList.forEach((swicth, index) => {
swicth.disabled = this.selectedObj[swicth.disabledName];
swicth.disabled = this.selectedObj[swicth.disabledName];
this.centralizedStationList[index] = swicth;
});
this.tempData = [];
@ -248,12 +248,12 @@ export default {
this.oldClickObj = deepAssign({}, this.selectedObj);
this.centralizedStationList = new Array(15).fill({});
this.signalParamList.forEach((singal, index) => {
if (singal.disabledName) {
singal.disabled = !!this.selectedObj[singal.disabledName];
if (singal.antonymy) {
singal.disabled = !singal.disabled;
}
}
if (singal.disabledName) {
singal.disabled = !!this.selectedObj[singal.disabledName];
if (singal.antonymy) {
singal.disabled = !singal.disabled;
}
}
this.centralizedStationList[index] = singal;
});
this.tempData = [];
@ -311,11 +311,11 @@ export default {
};
},
handleBasicMenu() {
this.deviceHighLight(this.oldDevice, false);
if (this.oldClickObj) {
this.deviceHighLight(this.oldDevice, false);
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
}
this.oldClickObj = null; //
}
this.oldClickObj = null; //
this.centralizedStationList = new Array(15).fill({});
this.basicParamList.forEach((basic, index) => {
@ -332,17 +332,17 @@ export default {
handleStationMenu() {
this.centralizedStationList = new Array(15).fill({});
this.stationParamList.forEach((station, index) => {
this.centralizedStationList[index] = station;
if (station.disabledName) {
station.disabled = this.selectedObj[station.disabledName] == station.mode;
}
this.centralizedStationList[index] = station;
if (station.disabledName) {
station.disabled = this.selectedObj[station.disabledName] == station.mode;
}
});
this.tempData = [];
this.tempData.push(this.selectedObj);
this.param = {
stationCode: this.selectedObj.code,
stationCodes: [this.selectedObj.code]
};
this.tempData.push(this.selectedObj);
this.param = {
stationCode: this.selectedObj.code,
stationCodes: [this.selectedObj.code]
};
// if (this.selectedObj.centralized) {
// this.param = {
// stationCode: this.selectedObj.code,
@ -379,7 +379,7 @@ export default {
cmdType: this.cmdType,
operation: OperationEvent.Command.commandHaerbin.confirm.operation,
param: this.param
};
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.doClose();
@ -395,13 +395,13 @@ export default {
this.cmdType = '';
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
}
this.handleBasicMenu();
}
this.handleBasicMenu();
this.param = {};
this.tempData = []; //
this.canCommand = true; //
this.oldClickObj = null; //
this.clearAllMenuShow();
this.clearAllMenuShow();
},
initMenus() {
this.basicParamList = this.$store.state.training.prdType === '01' ? [
@ -441,7 +441,7 @@ export default {
{ name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu, show: false },
{ name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menu, show: false, disabledName: 'normalPosition' },
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu, show: false, disabledName: 'reversePosition' },
{ name: '封锁区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false },
{ name: '封锁区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }
];
this.signalParamList = this.$store.state.training.prdType === '01' ? [
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu, show: false, disabledName: 'fleetMode' },
@ -462,8 +462,8 @@ export default {
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false }
];
this.stationParamList = this.$store.state.training.prdType === '01' ? [
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' }
] : [
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },

View File

@ -179,7 +179,6 @@ export default {
if (device) {
const control = (device || {}).controlMode;
if (control) {
debugger;
model.control = { status: control, name: this.controlProps[control] };
this.targetStatus = 'Center';
if (msgHead.operateType == 'CM_Apply_For_Center_Control') {

View File

@ -38,7 +38,6 @@ class TransformHandle {
view.transform = this.transform[i];
view.transformIndex = i;
view.decomposeTransform(); // 修改 transform 后同步位置
console.log('1111111111111111');
if (view.screenShow) {
view.screenShow();
} else {
@ -56,7 +55,6 @@ class TransformHandle {
if (view) {
view.transform = this.transform[view.transformIndex];
view.decomposeTransform();
console.log('111111111111113333311');
if (view.screenShow) {
view.screenShow();
} else {

View File

@ -7,7 +7,7 @@ export const State2SimulationMap = {
export const State2ControlMap = {
'Center': 'OperateCenterControl', // 中控
'Local': 'LocalStationControl', // 站控
'Emergency': 'station'
'Emergency': 'EmergencyStationControl'
};
/**

View File

@ -68,10 +68,10 @@ class MenuContextHandler {
if (control) {
if (this.getPrdType() != '' && this.getPrdType() != null) {
const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式
if (type) {
menu = [...menuList[type]];
}
const status = State2ControlMap[control.controlMode]; // 判断当前模式
if (type) {
menu = [...menuList[type]];
}
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand') {
if (selected.small) {

View File

@ -379,6 +379,7 @@ export default {
border-bottom-right-radius: 4px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-right-color: transparent;
}
}

View File

@ -114,7 +114,6 @@ export default {
const that = this;
document.querySelector('#audioPlay').onended = function() {
that.currentAudioList.shift();
console.log(that.currentAudioList.length);
if (that.currentAudioList.length > 0) {
that.playEachAudio(that.currentAudioList[that.currentAudioIndex]);
} else {

View File

@ -44,7 +44,7 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
import { getSessionStorage } from '@/utils/auth';
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
import { NoQrcodeList } from '@/scripts/ProjectConfig';
import { prefixIntrger } from '@/utils/date';
// import { prefixIntrger } from '@/utils/date';
import localStore from 'storejs';
export default {
@ -522,6 +522,7 @@ export default {
border-bottom-right-radius: 4px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-right-color: transparent;
}
}
.haerbin_btn_box{