diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 45bbc1def..54f73378c 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -594,7 +594,10 @@ class SkinCode extends defaultStyle { trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移 smallColor: '#70ECEE', // 小交路颜色 bigColor: '#FFFFFF', // 大交路颜色 - inboundColor: '#00FF00' // 回库颜色 + inboundColor: '#00FF00', // 回库颜色 + planTypeColor: '#FFFFFF', // 计划车颜色 + manualTypeColor: '#FF0', // 人工车 + headTypeColor: '#FF0' // 头码车 }, trainTargetNumber: { groupNumberPrefix: '000', // 车组号前缀 diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 746edffb6..d849cf47a 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -316,6 +316,15 @@ export default class TrainBody extends Group { this.style.Train.trainTarget.inboundColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.inboundColor}); } } + setTrainTypeColor(type) { + if (type === 'PLAN') { + this.style.Train.trainTarget.planTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.planTypeColor}); + } else if (type === 'MANUAL') { + this.style.Train.trainTarget.manualTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.manualTypeColor}); + } else if (type === 'HEAD') { + this.style.Train.trainTarget.headTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.headTypeColor}); + } + } setSoonerOrLater(dt) { if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 5) { if (dt > 120) { diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 9a6ad7751..092991e40 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -409,6 +409,7 @@ export default class Train extends Group { this.setJumpStatus(model.jump); this.setSoonerOrLater(model.dt); this.setPlanRoutingTypeColor(model.planRoutingType); + this.setTrainTypeColor(model.type); const style = this.style; if (style.Section.trainPosition.display) { this.updateSection(object); @@ -428,7 +429,10 @@ export default class Train extends Group { // this.setTrainTypeStatus(model.type); // 根据列车类型设置列车识别号样式 // } } - setPlanRoutingTypeColor(planRoutingType) { + setTrainTypeColor(type) { + this.trainB && this.trainB.setTrainTypeColor(type); + } + setPlanRoutingTypeColor(planRoutingType) { this.trainB && this.trainB.setPlanRoutingTypeColor(planRoutingType); } // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 diff --git a/src/views/competitionManage/create.vue b/src/views/competitionManage/create.vue index 06df9a072..378a6fb2a 100644 --- a/src/views/competitionManage/create.vue +++ b/src/views/competitionManage/create.vue @@ -14,7 +14,7 @@ /> - +