This commit is contained in:
joylink_cuiweidong 2020-05-14 17:58:55 +08:00
commit c55b7175e4
3 changed files with 37 additions and 20 deletions

View File

@ -36,6 +36,7 @@ class Signal extends Group {
y: 0
};
}
this.cbtcStatus = '';
this.create();
this.createMouseEvent();
this.transformRotation(this);
@ -321,14 +322,18 @@ class Signal extends Group {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor});
setTimeout(()=> {
this.insideTriangle.setStyle({fill: '#000'});
}, 500);
setTimeout(()=> {
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor});
}, 1000);
if (this.cbtcStatus !== 'close') {
setTimeout(()=> {
this.insideTriangle.setStyle({fill: '#000'});
}, 1000);
setTimeout(()=> {
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor});
}, 2000);
}
this.cbtcStatus = 'close';
}
} else {
this.cbtcStatus = '';
if (this.count == 2) { // 双灯
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
@ -351,14 +356,18 @@ class Signal extends Group {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor});
setTimeout(()=> {
this.insideTriangle.setStyle({fill: '#000'});
}, 500);
setTimeout(()=> {
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor});
}, 1000);
if (this.cbtcStatus !== 'openPositive') {
setTimeout(()=> {
this.insideTriangle.setStyle({fill: '#000'});
}, 500);
setTimeout(()=> {
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor});
}, 1000);
}
this.cbtcStatus = 'openPositive';
}
} else {
this.cbtcStatus = '';
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor);
@ -378,14 +387,10 @@ class Signal extends Group {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor});
setTimeout(()=> {
this.insideTriangle.setStyle({fill: '#000'});
}, 1000);
setTimeout(()=> {
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor});
}, 2000);
this.cbtcStatus = 'openLateral';
}
} else {
this.cbtcStatus = '';
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
@ -408,6 +413,7 @@ class Signal extends Group {
// 引导
guid() {
this.cbtcStatus = 'guid';
if (this.style.Signal.lamp.guidName === 'double') {
this.lamps[1].show();
}

View File

@ -3,6 +3,7 @@ import Text from 'zrender/src/graphic/Text';
import LangStorage from '@/utils/lang';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index_APP_TARGET';
import Vue from 'vue';
class EMouse extends Group {
constructor(device) {
@ -33,9 +34,13 @@ class EMouse extends Group {
direction = this.device.model.right != 1;
}
if (LangStorage.getLang() == 'en') {
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.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`;
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 : ''}\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 {
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.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`;
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 : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车戴扣车: 不执行\n跳停状态: 无跳停\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: SM模式\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 : ''}\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`;
}
}
const trainTip = this.device.style.Train.common.trainTip;
if (trainTip) {

View File

@ -47,6 +47,12 @@ export function parser(data, skinCode, showConfig) {
mapDevice[elem.code] = createDevice(deviceType.Section, elem, propConvert, showConfig);
}, this);
zrUtil.each(data.sectionList || [], elem => {
if (elem.type == '02' || elem.type == '03') {
mapDevice[elem.code].parentName = mapDevice[mapDevice[elem.code].parentCode].name;
}
}, this);
zrUtil.each(data.signalList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.Signal, elem, propConvert, showConfig);
}, this);