diff --git a/src/jmapNew/shape/Psd/EHorizontal2Door.js b/src/jmapNew/shape/Psd/EHorizontal2Door.js index f0000210d..1fd0ad851 100644 --- a/src/jmapNew/shape/Psd/EHorizontal2Door.js +++ b/src/jmapNew/shape/Psd/EHorizontal2Door.js @@ -55,19 +55,20 @@ class EHorizontal2Door extends Group { setState(model) { const style = this.model.style; - if (model.screenDoorOpenStatus == 0) { - // 开门 - this.stand1.setStyle('fill', style.transparentColor); - this.stand2.setStyle('fill', style.transparentColor); - } else { - // 关门 - this.stand1.setStyle('fill', style.Psd.horizontal2Door.defaultColor); - this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor); - } if (model.fault == 'FAULT_PSD_OPEN') { // 开门 this.stand1.setStyle('fill', style.transparentColor); this.stand2.setStyle('fill', style.transparentColor); + } else { + if (model.screenDoorOpenStatus == 0) { + // 开门 + this.stand1.setStyle('fill', style.transparentColor); + this.stand2.setStyle('fill', style.transparentColor); + } else { + // 关门 + this.stand1.setStyle('fill', style.Psd.horizontal2Door.defaultColor); + this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor); + } } } } diff --git a/src/jmapNew/shape/Psd/ESafeDoor.js b/src/jmapNew/shape/Psd/ESafeDoor.js index 2262e9422..c2ea345b6 100644 --- a/src/jmapNew/shape/Psd/ESafeDoor.js +++ b/src/jmapNew/shape/Psd/ESafeDoor.js @@ -82,11 +82,12 @@ class ESafeDoor extends Group { } setState(model) { - model.screenDoorOpenStatus == 0 ? this.safeC.hide() : this.safeC.show(); if (model.fault == 'FAULT_PSD_OPEN') { this.safeC.hide(); const style = this.model.style; this.setColor(style.Psd.safetyDoorNormal.splitDoorColor); + } else { + model.screenDoorOpenStatus == 0 ? this.safeC.hide() : this.safeC.show(); } } diff --git a/src/jmapNew/shape/Psd/EVertical2Door.js b/src/jmapNew/shape/Psd/EVertical2Door.js index f0402dff3..3b9fe0f91 100644 --- a/src/jmapNew/shape/Psd/EVertical2Door.js +++ b/src/jmapNew/shape/Psd/EVertical2Door.js @@ -71,16 +71,17 @@ class EVertical2Door extends Group { setState(model) { const style = this.model.style; - if (model.screenDoorOpenStatus == 0) { - // 开门 - this.setColor(style.Psd.vertical2Door.splitDoorColor); - } else { - // 关门 - this.setColor(style.Psd.vertical2Door.defaultColor); - } if (model.fault == 'FAULT_PSD_OPEN') { // 开门 this.setColor(style.Psd.vertical2Door.splitDoorColor); + } else { + if (model.screenDoorOpenStatus == 0) { + // 开门 + this.setColor(style.Psd.vertical2Door.splitDoorColor); + } else { + // 关门 + this.setColor(style.Psd.vertical2Door.defaultColor); + } } model.alarmStatus && this.setColor(style.Psd.vertical2Door.alarmColor); model.emergencyDepart && this.setColor(style.Psd.vertical2Door.emergencyColor); diff --git a/src/jmapNew/shape/Psd/index.js b/src/jmapNew/shape/Psd/index.js index fbcf8bb6c..1f9f68ba5 100644 --- a/src/jmapNew/shape/Psd/index.js +++ b/src/jmapNew/shape/Psd/index.js @@ -3,7 +3,7 @@ import ESafeDoor from './ESafeDoor'; import EVertical2Door from './EVertical2Door'; import EHorizontal2Door from './EHorizontal2Door'; import EHighlight from '../element/EHighlight'; -import {batchUpdateShape, traverseLineElements} from '../utils/ShapeStatusCovert'; +import {traverseLineElements} from '../utils/ShapeStatusCovert'; export default class Line2 extends Group { constructor(model, style) { @@ -42,47 +42,6 @@ export default class Line2 extends Group { }); } - // /** 开门*/ - // openDoor() { - // this.safeDoor && this.safeDoor.hasDoor(true); - // if (this.style.StationStand.safetyDoor.special) { - // this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor); - // } - // } - - // /** 关门*/ - // closeDoor() { - // this.safeDoor && this.safeDoor.hasDoor(false); - // if (this.style.StationStand.safetyDoor.special) { - // this.recover(); - // } - // } - - // /** 屏蔽门正常*/ - // doorNormal() { - // this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.defaultColor); - // } - - // /** 屏蔽门故障*/ - // doorFault() { - // this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor); - // } - - // /** 屏蔽门切除*/ - // doorSplit() { - // this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor); - // } - - // /** 收到警报 */ - // alarm() { - // this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.alarmColor); - // } - - // /** 紧急出发按钮激活 */ - // emergencyDepart() { - // this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.emergencyColor); - // } - setState(model) { this.recover(); if (!this.isShowShape) return; @@ -91,20 +50,6 @@ export default class Line2 extends Group { currentTypeList.forEach(element => { this[element].setState(model); }); - - // 批量更新后端关联属性 - // batchUpdateShape(this.style.Psd.relatedStatus, model, this); - - // /** 设置屏蔽门开关*/ - // if (model.fault == 'FAULT_PSD_OPEN') { - // this.doorFault(); // 故障 - // this.openDoor(); - // } else { - // model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/ - // model.screenDoorOpenStatus != 0 && this.closeDoor(); /** 关门*/ - // } - // model.alarmStatus && this.alarm(); /** 收到警报(西安二号线样式) */ - // model.emergencyDepart && this.emergencyDepart(); /** 紧急出发按钮激活(西安二号线样式) */ } drawSelected(selected) {