This commit is contained in:
joylink_cuiweidong 2020-07-23 13:38:59 +08:00
commit 72b137435c
4 changed files with 17 additions and 23 deletions

View File

@ -142,13 +142,14 @@ class ESafeDoor extends Group {
}
hasDoor(show) {
if (this.model.style.StationStand.common.special) {
const style = this.model.style;
if (style.StationStand.common.special) {
if (show) {
this.stand1.hide();
this.stand2.hide();
this.stand1.setStyle('fill', style.transparentColor);
this.stand2.setStyle('fill', style.transparentColor);
} else {
this.stand1.show();
this.stand2.show();
this.stand1.setStyle('fill', style.StationStand.safetyDoor.defaultColor);
this.stand2.setStyle('fill', style.StationStand.safetyDoor.defaultColor);
}
} else {
if (!this.model.style.StationStand.safetyDoor.special) {
@ -169,8 +170,8 @@ class ESafeDoor extends Group {
}
hide() {
this.stand1 && this.stand1.hide();
this.stand2 && this.stand2.hide();
this.stand1 && this.stand1.setStyle('fill', style.transparentColor);
this.stand2 && this.stand2.setStyle('fill', style.transparentColor);
this.safeL && this.safeL.hide();
this.safeC && this.safeC.hide();
this.safeR && this.safeR.hide();
@ -178,8 +179,8 @@ class ESafeDoor extends Group {
this.safeB && this.safeB.hide();
}
show() {
this.stand1 && this.stand1.show();
this.stand2 && this.stand2.show();
this.stand1 && this.stand1.setStyle('fill', style.StationStand.safetyDoor.defaultColor);
this.stand2 && this.stand2.setStyle('fill', style.StationStand.safetyDoor.defaultColor);
this.safeL && this.safeL.show();
this.safeC && this.safeC.show();
this.safeR && this.safeR.show();

View File

@ -29,7 +29,8 @@ export default class Line2 extends Group {
y: model.position.y - (model.height / 2),
width: model.width || style.StationStand.safetyDoor.width,
height: model.height || style.StationStand.safetyDoor.height,
standCode:model.standCode
standCode:model.standCode,
code: model.code
// show: model.hasDoor
});
this.add(this.safeDoor);
@ -85,15 +86,6 @@ export default class Line2 extends Group {
this.recover();
if (!this.isShowShape) return;
/** 设置屏蔽门开关*/
// if (model.code == 'Psd99251') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '02 上');
// } else if (model.code == 'Psd38731') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '03 上');
// } else if (model.code == 'Psd68917') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '04 上');
// } else if (model.code == 'Psd62436') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '05 上');
// }
if (model.fault == 'FAULT_PSD_OPEN') {
this.doorFault(); // 故障
this.openDoor();

View File

@ -299,6 +299,7 @@ export default {
// EventBus.$emit('trainView');
exitRunPlan(this.group).then(()=>{
this.$store.dispatch('map/setRunPlanStatus', false);
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('map/resetActiveTrainList');
}).catch(() => {
this.$store.dispatch('training/over').then(() => {