diff --git a/src/jmapNew/shape/StationStand/safeStand/ESolidStand.js b/src/jmapNew/shape/StationStand/safeStand/ESolidStand.js index 2f2b3e3cb..30ce734d3 100644 --- a/src/jmapNew/shape/StationStand/safeStand/ESolidStand.js +++ b/src/jmapNew/shape/StationStand/safeStand/ESolidStand.js @@ -52,18 +52,22 @@ class ESolidStand extends Group { // 紧急停车 model.emergencyClosed && this.setColor(this.style.StationStand.solidStand.spareColor); } else { - model.num && model.num > 0 && this.handlePassagerColor(model.num); + this.handlePassagerColor(model.num); } } handlePassagerColor(num) { - const passagerNum = parseInt(num); - if (passagerNum < 40) { - this.setColor('#29a909'); - } else if (passagerNum < 80 && passagerNum > 40) { - this.setColor('#ffa500'); + if (num && num > 0) { + const passagerNum = parseInt(num); + if (passagerNum < 40) { + this.setColor('#29a909'); + } else if (passagerNum < 80 && passagerNum > 40) { + this.setColor('#ffa500'); + } else { + this.setColor('#F00'); + } } else { - this.setColor('#F00'); + this.setColor('#29a909'); } } } diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 9ce1460b3..d1d2e0bc1 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -378,7 +378,8 @@ export default class Train extends Group { } handlePassagerColor(num) { - if (num && num > 0) { + if (num) { + // && num > 0 const passagerNum = parseInt(num); if (passagerNum < 40) { this.trainB && this.trainB.setTrainColor('#29a909'); @@ -394,9 +395,9 @@ export default class Train extends Group { this.trainR && this.trainR.setColor('#F00'); } } else { - // this.trainB && this.trainB.setTrainColor('#606060'); - this.trainL && this.trainL.setColor(this.style.Train.trainHead.trainHeadFillColor); - this.trainR && this.trainR.setColor(this.style.Train.trainHead.trainHeadFillColor); + this.trainB && this.trainB.setTrainColor('#29a909'); + this.trainL && this.trainL.setColor('#29a909'); + this.trainR && this.trainR.setColor('#29a909'); } } diff --git a/src/views/newMap/displayNew/practiceDisplay.vue b/src/views/newMap/displayNew/practiceDisplay.vue index 087f11967..180b83d48 100644 --- a/src/views/newMap/displayNew/practiceDisplay.vue +++ b/src/views/newMap/displayNew/practiceDisplay.vue @@ -8,6 +8,21 @@ +
+
列车/车站 颜色图例
+
+ + 0 ~ 40 +
+
+ + 40 ~ 80 +
+
+ + 80及以上 +
+