列车状态代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-13 11:25:43 +08:00
parent bf0e44d512
commit 9e1e329644
3 changed files with 23 additions and 8 deletions

View File

@ -219,7 +219,18 @@ deviceState[deviceType.Train] = {
/** 列车是否向右形式 */ /** 列车是否向右形式 */
right: 1, right: 1,
/** 是否故障*/ /** 是否故障*/
fault: 0 /** 非故障*/ fault: 0 /** 非故障*/,
/** 是否跳停 */
jump: 0,
/** 是否扣车 */
hold: 0,
/** 列车类型 PLAN计划车 HEAD 头码车 MANUAL 人工车*/
type: 'PLAN',
/** 列车精确位置 (成都一号线使用)*/
offsetp:0,
/** 列车所在物理区段 */
physicalCode:''
}; };
export default deviceState; export default deviceState;

View File

@ -83,10 +83,14 @@ class Status {
right: device.right, /** 列车方向 */ right: device.right, /** 列车方向 */
doorCloseLock: device.doorCloseLock, /** 车门是否关闭且锁闭 */ doorCloseLock: device.doorCloseLock, /** 车门是否关闭且锁闭 */
stop: device.stop, /** 列车是否停稳 */ stop: device.stop, /** 列车是否停稳 */
type: device.type, /** 列车类型 */ type: device.type, /** 列车类型 PLAN计划车 HEAD 头码车 MANUAL 人工车*/
runLevel: device.runLevel, /** 列车运行级别 */ runLevel: device.runLevel, /** 列车运行级别 */
driveMode: device.driveMode, /** 驾驶模式 */ driveMode: device.driveMode, /** 驾驶模式 */
fault: device.fault /** 非故障*/ fault: device.fault, /** 非故障*/
jump: device.jump, /** 是否跳停 */
hold: device.hold, /** 是否扣车 */
offsetp:device.offsetp, /** 列车精确位置 (成都一号线使用)*/
physicalCode:device.physicalCode /** 列车所在物理区段 */
}; };
} }
handleStation(device) { handleStation(device) {

View File

@ -20,16 +20,16 @@ class EMouse extends Group {
} }
let trainType = ''; let trainType = '';
switch (this.device.model.type) { switch (this.device.model.type) {
case '01': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break; case 'PLAN': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
case '02': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break; case 'HEAD': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
case '03': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break; case 'MANUAL': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break;
default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break; default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
} }
let text = ''; let text = '';
if (LangStorage.getLang() == 'en') { 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: ${this.device.model.directionType == '02' ? '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 ? 'Normal' : 'Detained'}\n \n 跳停状态: ${!this.device.model.jump ? 'Normal' : 'Skip to continue moving'}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: ${this.device.model.directionType == '02' ? '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`;
} else { } 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运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\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`; 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运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\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`;
} }
// 文字描述 // 文字描述
this.arrowText = new Text({ this.arrowText = new Text({