调整:代码调整
This commit is contained in:
parent
66b2406d91
commit
dd4d83f02b
@ -334,7 +334,9 @@ class SkinStyle extends defaultStyle {
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 默认目的地状态显示颜色 */
|
||||
defaultDestinationColor: '#000000',
|
||||
defaultDestinationColor: '#FFFFFF',
|
||||
/** 目的地状态设置的对应哪个text的颜色 */
|
||||
destinationStatusSetText: 'trainTarget',
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: 'consolas',
|
||||
/** 列车HDSA字号*/
|
||||
@ -342,10 +344,10 @@ class SkinStyle extends defaultStyle {
|
||||
/** 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车 */
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '01', showColor: '#FFFFFF'}
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
],
|
||||
/** 默认服务号状态显示颜色 */
|
||||
defaultServerNoColor: '#000000',
|
||||
defaultServerNoColor: '#FFFFFF',
|
||||
/** 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
directionType: [
|
||||
{type: '01', lineLShow: true, lineRShow: true, arrowLShow: false, arrowRShow: false },
|
||||
|
@ -305,6 +305,8 @@ class SkinStyle extends defaultStyle {
|
||||
{status: '06', showColor: '#FFFFFF'},
|
||||
{status: '07', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 目的地状态设置的对应哪个text的颜色 */
|
||||
destinationStatusSetText: 'trainServer',
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: '宋体',
|
||||
/** 列车HDSA字号*/
|
||||
|
@ -230,7 +230,7 @@ class Jlmap {
|
||||
const code = elem.code;
|
||||
const type = elem._type;
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem);
|
||||
if (elem._dispose) {
|
||||
if (elem.dispose) {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
const nDevice = Object.assign(oDevice, this.hookHandle(elem));
|
||||
|
@ -265,6 +265,21 @@ class Signal extends Group {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampWhiteColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '01' ) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ export default class TrainBody extends Group {
|
||||
case '05': destinationText = '严重晚点'; break;
|
||||
default: destinationText = '未知'; break;
|
||||
}
|
||||
const textContain = `列车类型: 计划车\n表\0\0\0\0号: ${model.serviceNumber}\n车\0次\0号: ${model.tripNumber}\n目的地号: ${model.targetCode ? model.targetCode : ''}\n车\0组\0号: ${model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${model.sectionModel ? model.sectionModel.trackName : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${model.runControlStatus == '01' ? '正常' : model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${model.speed || 0} km/h\n列车移动授权距离: ${model.maLen || 0} m`;
|
||||
const textContain = `列车类型: 计划车\n表\0\0\0\0号: ${model.serviceNumber}\n车\0次\0号: ${model.tripNumber}\n目的地号: ${model.targetCode ? model.targetCode : ''}\n车\0组\0号: ${model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${model.sectionModel ? model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${model.runControlStatus == '01' ? '正常' : model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${model.speed || 0} km/h\n列车移动授权距离: ${model.maLen || 0} m`;
|
||||
this.arrowText = style.Train.haveArrowText ? new ArrowText({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
|
@ -144,12 +144,30 @@ export default class Train extends Group {
|
||||
if (this.style.Train.destinationStatus.length>0) {
|
||||
const flag = this.style.Train.destinationStatus.some((item) =>{
|
||||
if (status === item.status) {
|
||||
this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
switch (this.style.Train.destinationStatusSetText) {
|
||||
case 'trainTarget':
|
||||
this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
break;
|
||||
case 'trainServer':
|
||||
this.trainB.setTextTrainServerColor(item.showColor);
|
||||
break;
|
||||
default:
|
||||
this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (this.style.Train.defaultDestinationColor && !flag) {
|
||||
this.trainB.setTextTrainTargetColor(this.style.Train.defaultDestinationColor);
|
||||
switch (this.style.Train.destinationStatusSetText) {
|
||||
case 'trainTarget':
|
||||
this.trainB.setTextTrainTargetColor(this.style.Train.defaultDestinationColor);
|
||||
break;
|
||||
case 'trainServer':
|
||||
this.trainB.setTextTrainServerColor(this.style.Train.defaultDestinationColor);
|
||||
break;
|
||||
default:
|
||||
this.trainB.setTextTrainTargetColor(this.style.Train.defaultDestinationColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user