屏蔽门 绘图状态代码调整

This commit is contained in:
joylink_cuiweidong 2020-09-15 17:13:36 +08:00
parent 0b4fa8f3e0
commit 619474b651
4 changed files with 21 additions and 73 deletions

View File

@ -55,6 +55,11 @@ class EHorizontal2Door extends Group {
setState(model) {
const style = this.model.style;
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);
@ -64,10 +69,6 @@ class EHorizontal2Door extends Group {
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);
}
}
}

View File

@ -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();
}
}

View File

@ -71,6 +71,10 @@ class EVertical2Door extends Group {
setState(model) {
const style = this.model.style;
if (model.fault == 'FAULT_PSD_OPEN') {
// 开门
this.setColor(style.Psd.vertical2Door.splitDoorColor);
} else {
if (model.screenDoorOpenStatus == 0) {
// 开门
this.setColor(style.Psd.vertical2Door.splitDoorColor);
@ -78,9 +82,6 @@ class EVertical2Door extends Group {
// 关门
this.setColor(style.Psd.vertical2Door.defaultColor);
}
if (model.fault == 'FAULT_PSD_OPEN') {
// 开门
this.setColor(style.Psd.vertical2Door.splitDoorColor);
}
model.alarmStatus && this.setColor(style.Psd.vertical2Door.alarmColor);
model.emergencyDepart && this.setColor(style.Psd.vertical2Door.emergencyColor);

View File

@ -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) {