北京线现地进路建立代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-16 18:53:36 +08:00
parent c695309b9f
commit f437f18f63
4 changed files with 23 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class ELowButton extends Group {
});
this.add(this.button);
// this.hide();
this.hide();
}
// 隐藏

View File

@ -521,6 +521,11 @@ class Signal extends Group {
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
this.setLowButtonRecover();
}
/** 信号机进路按钮显示 */
if (model.isRouteSignal) {
this.setLowButtonShow();
}
/** 信号机封锁 */
model.blockade && this.block();
/** 设置点灯类型*/

View File

@ -83,6 +83,7 @@ export default {
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal();
});
}
};

View File

@ -204,6 +204,22 @@ export default {
this.$refs.popMenu.close();
}
},
setRouteSignal() {
if (this.$store.state.training.prdType == '01') {
let signalList = [];
this.routeList.forEach(route=>{
signalList.push(route.startSignalCode);
signalList.push(route.endSignalCode);
});
signalList = Array.from(new Set(signalList));
signalList.forEach(signal=>{
const signalDevice = this.$store.getters['map/getDeviceByCode'](signal);
const signalModel = Object.assign({_type: 'Signal'}, signalDevice);
signalModel.isRouteSignal = true;
this.$store.dispatch('map/updateMapDevices', signalModel);
});
}
},
operationHandler(buttonOperation, selectType) {
switch (buttonOperation) {
case OperationEvent.Signal.arrangementRoute.button.operation: {