This commit is contained in:
fan 2020-07-21 13:51:29 +08:00
commit 1ea1583874
4 changed files with 75 additions and 47 deletions

View File

@ -50,7 +50,7 @@ class EMouse extends Group {
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
} else {
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
}

View File

@ -7,7 +7,8 @@
<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.securityCommand " :id="item.operate.domId" class="fake-button-active" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ 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" />
</div>
@ -81,7 +82,8 @@ export default {
'border-bottom': 'none',
'border-right': 'none',
'padding': 0
},
},
selectedObj: null,
oldClickObj: null, //
route: null, //
centralizedStationList: new Array(15).fill({}),
@ -107,24 +109,25 @@ export default {
},
watch: {
'$store.state.menuOperation.setMenuChangeCount': function (val) {
if (this.selected._type) {
if (this.selected._type == 'Section' && (this.selected.type == '03' || this.selected.type == '04')) { //
this.selected = this.selected.switch;
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;
}
this.canCommand = true;
const step = {
operation: 'click',
code: this.selected.code
code: this.selectedObj.code
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
switch (this.selected._type) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
switch (this.selectedObj._type) {
case 'Switch':
this.handleSwicthMenu();
break;
case 'Signal':
if (this.oldClickObj && this.oldClickObj.code != this.selected.code) {
if (this.oldClickObj && this.oldClickObj.code != this.selectedObj.code) {
this.checkSignal();
} else {
this.handleSingalMenu();
@ -136,9 +139,9 @@ export default {
case 'Station':
this.handleStationMenu();
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
break;
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
break;
}
}
}).catch((error) => {
@ -210,10 +213,10 @@ export default {
},
handleSwicthMenu() { //
//
const section = this.$store.getters['map/getDeviceByCode'](this.selected.sectionParentCode);
const sectionA = this.$store.getters['map/getDeviceByCode'](this.selected.sectionACode); //
const sectionB = this.$store.getters['map/getDeviceByCode'](this.selected.sectionBCode);
const sectionC = this.$store.getters['map/getDeviceByCode'](this.selected.sectionCCode);
const section = this.$store.getters['map/getDeviceByCode'](this.selectedObj.sectionParentCode);
const sectionA = this.$store.getters['map/getDeviceByCode'](this.selectedObj.sectionACode); //
const sectionB = this.$store.getters['map/getDeviceByCode'](this.selectedObj.sectionBCode);
const sectionC = this.$store.getters['map/getDeviceByCode'](this.selectedObj.sectionCCode);
this.switchRelevanceSectionList = [sectionA, sectionB, sectionC];
this.deviceHighLight(this.oldDevice, false);
this.switchRelevanceSectionList.forEach(model => {
@ -223,33 +226,38 @@ export default {
this.centralizedStationList = new Array(15).fill({});
this.switchParamList.forEach((swicth, index) => {
swicth.disabled = this.selectedObj[swicth.disabledName];
this.centralizedStationList[index] = swicth;
});
this.tempData = [];
this.tempData.push(this.selected);
this.tempData.push(this.selectedObj);
this.param = {
switchCode: this.selected.code,
switchCode: this.selectedObj.code,
sectionCode: section.code,
speedLimitValue: '5'
};
},
handleSingalMenu() {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
if (this.oldClickObj) { //
this.deviceHighLight(this.oldClickObj, false);
}
this.oldClickObj = deepAssign({}, this.selected);
this.oldClickObj = deepAssign({}, this.selectedObj);
this.centralizedStationList = new Array(15).fill({});
this.signalParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
this.signalParamList.forEach((singal, index) => {
// if (singal.disabledName) {
// singal.disabled = !!this.selectedObj[singal.disabledName];
// console.log(singal.disabled);
// }
this.centralizedStationList[index] = singal;
});
this.tempData = [];
this.tempData.push(this.selected);
this.tempData.push(this.selectedObj);
this.param = {
signalCode: this.selected.code
signalCode: this.selectedObj.code
};
},
handleRouteMenu() { //
@ -267,7 +275,7 @@ export default {
checkSignal() {
this.route = null;
this.routeList.forEach(item => {
if (item.startSignalCode == this.oldClickObj.code && item.endSignalCode == this.selected.code) {
if (item.startSignalCode == this.oldClickObj.code && item.endSignalCode == this.selectedObj.code) {
const startSignal = this.$store.getters['map/getDeviceByCode'](item.startSignalCode);
const endSignal = this.$store.getters['map/getDeviceByCode'](item.endSignalCode);
this.startVirtual = startSignal.virtual;
@ -278,29 +286,35 @@ export default {
});
if (this.route && this.route.code) {
this.handleRouteMenu();
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
} else {
this.handleSingalMenu();
}
},
handleSectionMenu() {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
this.centralizedStationList = new Array(15).fill({});
this.sectionParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
});
this.tempData = [];
this.tempData.push(this.selected);
this.tempData.push(this.selectedObj);
this.param = {
sectionCode: this.selected.code,
sectionCode: this.selectedObj.code,
speedLimitValue: '5'
};
},
handleBasicMenu() {
this.deviceHighLight(this.oldDevice, false);
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
}
this.oldClickObj = null; //
this.centralizedStationList = new Array(15).fill({});
this.basicParamList.forEach((basic, index) => {
this.centralizedStationList[index] = basic;
@ -319,16 +333,16 @@ export default {
this.centralizedStationList[index] = station;
});
this.tempData = [];
this.tempData.push(this.selected);
this.tempData.push(this.selectedObj);
if (this.selected.centralized) {
if (this.selectedObj.centralized) {
this.param = {
stationCode: this.selected.code,
stationCodes: [this.selected.code]
stationCode: this.selectedObj.code,
stationCodes: [this.selectedObj.code]
};
} else {
this.stationList.forEach(station => {
if (station.centralized && station.chargeStationCodeList.includes(this.selected.code)) {
if (station.centralized && station.chargeStationCodeList.includes(this.selectedObj.code)) {
this.param = { stationCode: station.code, stationCodes: [station.code] };
}
});
@ -373,12 +387,13 @@ export default {
this.cmdType = '';
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
}
}
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' ? [
@ -416,8 +431,8 @@ export default {
] : [
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menu, show: false },
{ 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 },
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.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_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false}
];
this.signalParamList = this.$store.state.training.prdType === '01' ? [
@ -490,7 +505,8 @@ export default {
position: absolute;
bottom: 0;
height: 90px;
width: 100%;
width: 1200px;
left: 0;
background: #E0E0E0;
z-index: 2;
}
@ -566,6 +582,16 @@ export default {
background: #b1b1b1;
}
}
.fake-button-disabled{
width: 80px;
height: 20px;
border-radius: 5px !important;
line-height: 18px;
border: 1px solid #426688;
cursor: pointer;
box-shadow: -1px 0px 1px #fff inset, 1px 0px 1px #fff inset, 0px 1px 1px #fff inset, 0px -1px 1px #fff inset;
color: #a0a0a0;
}
.fake-button-security {
width: 80px;
height: 20px;

View File

@ -578,8 +578,9 @@ export default {
}
if (menuTool) {
offset += (menuTool.offsetHeight || 0);
}
if (menuBottom) {
}
const buttonWidth = this.width - 1200;
if (menuBottom && buttonWidth < 550) {
offsetBottom += (menuBottom.offsetHeight || 0);
}
if (menuButtonsBox) {

View File

@ -330,8 +330,9 @@ export default {
}
if (menuTool) {
offset += (menuTool.offsetHeight || 0);
}
if (menuBottom) {
}
const buttonWidth = this.width - 1200;
if (menuBottom && buttonWidth < 550) {
offsetBottom += (menuBottom.offsetHeight || 0);
}
if (this.$store.state.training.prdType === '07') {