代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-06 21:26:58 +08:00
parent e1fccdeb2a
commit f3d152bdfc

View File

@ -27,9 +27,26 @@ class EMouse extends Group {
} }
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.targetCode ? this.device.model.targetCode : ''}\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.runControlStatus == '01' ? 'Normal' : this.device.model.runControlStatus == '03' ? 'Skip to continue moving' : 'Detained'}\n Stationary: ${this.device.model.runStatus == '02' ? '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.targetCode ? this.device.model.targetCode : ''}\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`;
} else { } else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\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.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\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.targetCode ? this.device.model.targetCode : ''}\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({