调整宁波线路现地操作

This commit is contained in:
zyy 2020-03-17 11:29:34 +08:00
parent 154b252fd6
commit 96ed68cf65
6 changed files with 157 additions and 193 deletions

View File

@ -183,11 +183,11 @@ class SkinCode extends defaultStyle {
},
auto: {
signalFrontTriangle: true, // 信号灯前三角展示
direction: false, // 自动通过方向
offset: { x: -4, y: 0 }, // 自动通过偏移量
direction: true, // 自动通过方向
offset: { x: 4, y: 0 }, // 自动通过偏移量
width: 5, // 自动宽度
manualControl: '#FFFF00', // 人工控制
autoRoute: '#00FF00', // 自动进路
autoRoute: '#00FF00', // 自动进路 (绿色)
autoTrigger: '#FFFF00', // 自动触发
outConflict: '#C00808' // 出车冲突
},

View File

@ -331,7 +331,7 @@ class Jlmap {
store.dispatch('map/updateRouteState', elem);
const route = this.routeData[code];
const signalDevice = this.mapDevice[route.startSignalCode];
const signalStatus = {atsControl: elem.atsControl};
const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode};
if (this.hookHandle(signalDevice, signalStatus)) {
this.$painter.update(signalDevice);
}

View File

@ -13,7 +13,7 @@ class ESigPass extends Group {
if (!this.isNew) {
const model = this.model;
const style = this.model.style;
const rotation = model.drict != 1? 0 : Math.PI;
const rotation = model.drict != 1 ? 0 : Math.PI;
this.isNew = true;
this.arrow = new Polygon({

View File

@ -427,24 +427,24 @@ class Signal extends Group {
this.lamps.forEach(lamp => { lamp.setStop(true); });
}
// 设置人工进路显示状态 (人工控显示黄色三角)
setArtificialRouteClose() {
if (this.style.Signal.auto.signalFrontTriangle) {
this.sigRoute.show();
this.sigRoute.setStyle({ fill: this.style.Signal.auto.manualControl });
}
}
// 设置自动进路模式状态类型
setAutoRouteOpen() {
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
if (this.model.linkageAutoRouteShow) {
this.sigAuto.show();
} else {
this.sigAuto.hide();
}
}
// 信号机进路自动触发模式状态类型
setAutoTriggerOpen() {
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
if (this.model.atsAutoTriggerShow) {
this.sigAuto.show();
} else {
this.sigAuto.hide();
}
}
// 隐藏自动信号和自动进路
@ -466,8 +466,8 @@ class Signal extends Group {
// 恢复状态
recover() {
this.sigName.setStyle({ textBorderWidth: 0 });
this.sigAuto.hide();
this.sigRoute.hide();
this.setAutoClose();
this.model.atsControl && this.sigRoute.hide();
this.sigDelay.hide();
this.sigAuto.animationRecover();
this.sigName.setColor(this.style.Signal.text.defaultColor);
@ -479,42 +479,6 @@ class Signal extends Group {
setState(model) {
if (!this.isShowShape) return;
this.recover();
// /** 设置状态 (点灯类型)*/
// switch (model.status) {
// case '01': this.close(); break; // 关闭
// case '02': this.openPositive(); break; // 开放正向
// case '03': this.openLateral(); break; // 开放侧向
// case '04': this.guid(); break; // 引导
// case '06': this.fault(); break; // 故障
// case '07': this.block(); break; // 功能封锁
// case '08': this.signalCheck(); break; // 信号保护区段检测
// }
// /** 进路性质类型*/
// switch (model.natureType) {
// case '01': this.trainRoute(); break; // 列车进路
// case '02': this.shuntRoute(); break; // 调车进路
// }
// /** 设置自动类型*/
// switch (model.autoType) {
// case '01': this.setAutoClose(); break; // 隐藏 隐藏自动信号和自动进路
// case '02': this.setAutoSignalOpen(); break; // 显示 设置自动信号模式状态类型
// case '03': this.setAutoRouteOpen(); break; // 显示 设置自动进路模式状态类型
// case '04': this.setAutoTriggerOpen(); break; // 显示 信号机进路自动触发模式状态类型
// }
// /** 延时解锁*/
// switch (model.delayType) {
// case '01': break; // 未延时解锁
// case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁
// case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁
// }
// /** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/
// if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) {
// this.setAutoFlicker();
// }
/** 终端信号机按钮 */
if (model.isRouteActive) {
this.setLowButtonActive();
@ -523,11 +487,12 @@ class Signal extends Group {
}
/** 信号机进路按钮显示 */
if (model.isRouteSignal) {
this.setLowButtonShow();
}
model.isRouteSignal && this.setLowButtonShow();
/** 信号机封锁 */
model.blockade && this.block();
// 联锁自动进路通过
// model.linkageAutoRouteShow = 1;
model.fleetMode && this.setAutoRouteOpen();
/** 设置点灯类型*/
if (model.lightType) {
this.logicalLight(); // 设置逻辑点灯
@ -535,14 +500,8 @@ class Signal extends Group {
this.physicsLight(); // 设置物理点灯
}
/** 进路交人工控或自动控 */
if (model.atsControl) {
this.sigRoute.hide();
} else { // 人工控显示黄色三角
if (this.style.Signal.auto.signalFrontTriangle) {
this.sigRoute.show();
this.sigRoute.setStyle({ fill: this.style.Signal.auto.manualControl });
}
}
// model.atsControl = 0;
!model.atsControl && this.setArtificialRouteClose();
/** 设置灯的颜色 */
if (model.greenOpen) {
if (this.lamps[0]) {

View File

@ -102,9 +102,9 @@ export default {
},
title() {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔单解'
return '道岔单解';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '解除封锁'
return '解除封锁';
}
return '';
}
@ -137,6 +137,11 @@ export default {
},
doClose() {
this.dialogShow = false;
this.messageText1 = '';
this.messageText2 = '';
this.timeCountConfirm = -1;
this.disabledConfirm1 = false;
this.disabledConfirm2 = true;
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
@ -148,9 +153,9 @@ export default {
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.choose.operation
operate.operation = OperationEvent.Switch.unlock.choose.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
operate.operation = OperationEvent.Switch.unblock.choose.operation
operate.operation = OperationEvent.Switch.unblock.choose.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -168,9 +173,9 @@ export default {
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.confirm1.operation
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
operate.operation = OperationEvent.Switch.unblock.confirm1.operation
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -213,13 +218,13 @@ export default {
commit() {
const operate = {
over: true,
operation: '',
operation: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.confirm.operation
operate.operation = OperationEvent.Switch.unlock.confirm.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
operate.operation = OperationEvent.Switch.unblock.confirm.operation
operate.operation = OperationEvent.Switch.unblock.confirm.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {