Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
357265d905
@ -632,24 +632,11 @@ class SkinCode extends defaultStyle {
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{ status: '01', hShow: false, sShow: false },
|
||||
{ status: '02', hShow: true, sShow: false },
|
||||
{ status: '03', hShow: false, sShow: true }
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: true, dShow: false},
|
||||
{status: false, dShow: true}
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#725A64'},
|
||||
{status: 'ITC', trainColor: '#C0C0C0'},
|
||||
{status: 'IL', trainColor: '#C0C0C0'}
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{ status: '01', aShow: false },
|
||||
{ status: '02', aShow: true }
|
||||
], // 设置报警状态 01不报警 02报警
|
||||
serverNoType: [
|
||||
{ type: '01', showColor: '#FFFFFF' },
|
||||
{ type: '02', showColor: '#FFF000' }
|
||||
|
@ -573,36 +573,11 @@ class SkinCode extends defaultStyle {
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: true, dShow: false},
|
||||
{status: false, dShow: true}
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#000099'},
|
||||
{status: 'ITC', trainColor: '#747474'},
|
||||
{status: 'IL', trainColor: '#747474'}
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
@ -610,36 +610,11 @@ class SkinCode extends defaultStyle {
|
||||
trainRColor: '#FF0000'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: true, dShow: false},
|
||||
{status: false, dShow: true}
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#000099'},
|
||||
{status: 'ITC', trainColor: '#747474'},
|
||||
{status: 'IL', trainColor: '#747474'}
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -492,10 +492,10 @@ class SkinCode extends defaultStyle {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 8, // 列车HDSA字号
|
||||
textHContent: '扣', // textH文本
|
||||
textSContent: '跳', // textS文本
|
||||
textDContent: '门', // textD文本
|
||||
textAContent: '警' // textA文本
|
||||
textHContent: 'H', // textH文本
|
||||
textSContent: 'S', // textS文本
|
||||
textDContent: 'D', // textD文本
|
||||
textAContent: 'A' // textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
@ -617,33 +617,8 @@ class SkinCode extends defaultStyle {
|
||||
// trainRColor: '#A0522D'
|
||||
// }
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{ status: true, dShow: false },
|
||||
{ status: false, dShow: true }
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{ status: '01', aShow: false },
|
||||
{ status: '02', aShow: true }
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ class EDetain extends Group {
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
}
|
||||
console.log(textName);
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -90,14 +91,13 @@ class EDetain extends Group {
|
||||
this.detain.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
if (this.model.style.StationStand.common.special) {
|
||||
this.detain.setStyle('text', 'H');
|
||||
show(nameText) {
|
||||
if (this.model.style.StationStand.common.special && nameText) {
|
||||
this.detain.setStyle('text', nameText);
|
||||
} else {
|
||||
this.create('H');
|
||||
this.create();
|
||||
this.detain.show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -416,19 +416,31 @@ class StationStand extends Group {
|
||||
|
||||
/** 车站扣车*/
|
||||
standDetainTrain() {
|
||||
this.detain && this.detain.show();
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||
}
|
||||
|
||||
/** 中心扣车*/
|
||||
centerDetainTrain() {
|
||||
this.detain && this.detain.show();
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||
}
|
||||
|
||||
/** 中心+车站扣车*/
|
||||
standAndCenterDetainTrain() {
|
||||
this.detain && this.detain.show();
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,9 @@ class EMouse extends Group {
|
||||
}
|
||||
let text = '';
|
||||
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 {
|
||||
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({
|
||||
|
@ -71,7 +71,6 @@ export default class Train extends Group {
|
||||
directionType: model.directionType,
|
||||
directionCode: model.directionCode,
|
||||
sectionModel: model.sectionModel,
|
||||
runControlStatus: model.runControlStatus,
|
||||
runStatus: model.runStatus,
|
||||
fontSize: this.fontSize,
|
||||
nameFormat: this.nameFormat,
|
||||
@ -122,6 +121,8 @@ export default class Train extends Group {
|
||||
if (train.physicalCode && train.offsetp) {
|
||||
const data = train.physicalCode;
|
||||
const oldmodel = store.getters['map/getDeviceByCode'](data);
|
||||
oldmodel.offsetp = train.offsetp;
|
||||
oldmodel.right = train.right;
|
||||
let models = [];
|
||||
const model = deepAssign(oldmodel, {_type: 'Section'}); // 修改元素model
|
||||
models = [model];
|
||||
@ -252,27 +253,35 @@ export default class Train extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
// 设置运行控制状态类型
|
||||
setRunControlStatus(status) {
|
||||
if (this.style.Train.trainStatusStyle.runControlStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.runControlStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB && this.trainB.setHShow(item.hShow);
|
||||
this.trainB && this.trainB.setSShow(item.sShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// 设置扣车状态
|
||||
setHoldStatus(status) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setHShow(true);
|
||||
} else {
|
||||
this.trainB && this.trainB.setHShow(false);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置跳停状态
|
||||
setJumpStatus(status) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setSShow(true);
|
||||
} else {
|
||||
this.trainB && this.trainB.setSShow(false);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置车门状态类型
|
||||
setDoorStatus(status) {
|
||||
if (this.style.Train.trainStatusStyle.doorStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.doorStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB && this.trainB.setDShow(item.dShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (status != undefined) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(true);
|
||||
}
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
}
|
||||
}
|
||||
// 设置通信状态类型
|
||||
@ -288,13 +297,10 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置报警状态
|
||||
setAlarmStatus(status) {
|
||||
if (this.style.Train.trainStatusStyle.alarmStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.alarmStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB && this.trainB.setAShow(item.aShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setAShow(true);
|
||||
} else {
|
||||
this.trainB && this.trainB.setAShow(false);
|
||||
}
|
||||
}
|
||||
setTrainTypeStatus(type) {
|
||||
@ -323,11 +329,15 @@ export default class Train extends Group {
|
||||
this.setCommunicationStatus(model.runLevel);
|
||||
// this.setTrainTypeStatus(model.type); 配合早晚点设置
|
||||
this.setDoorStatus(model.doorCloseLock);
|
||||
this.setAlarmStatus(model.alarmStatus);
|
||||
this.setHoldStatus(model.hold);
|
||||
this.setJumpStatus(model.jump);
|
||||
|
||||
const style = this.style;
|
||||
if (style.Section.trainPosition.display) {
|
||||
this.updateSection();
|
||||
}
|
||||
|
||||
}
|
||||
// let points = [];
|
||||
// if (model) {
|
||||
|
Loading…
Reference in New Issue
Block a user