diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 5d77e931c..a77127618 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -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' // 出车冲突 }, diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 53fdb20a2..b829fef1c 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -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); } diff --git a/src/jmapNew/shape/Signal/ESigAuto.js b/src/jmapNew/shape/Signal/ESigAuto.js index 6d80623d9..7bea3e37a 100644 --- a/src/jmapNew/shape/Signal/ESigAuto.js +++ b/src/jmapNew/shape/Signal/ESigAuto.js @@ -3,75 +3,75 @@ import Group from 'zrender/src/container/Group'; import { arrow } from '../utils/ShapePoints'; class ESigPass extends Group { - constructor(model) { - super(); - this.model = model; - this.isNew = false; - } + constructor(model) { + super(); + this.model = model; + this.isNew = false; + } - create() { - if (!this.isNew) { - const model = this.model; - const style = this.model.style; - const rotation = model.drict != 1? 0 : Math.PI; + create() { + if (!this.isNew) { + const model = this.model; + const style = this.model.style; + const rotation = model.drict != 1 ? 0 : Math.PI; - this.isNew = true; - this.arrow = new Polygon({ - zlevel: model.zlevel, - z: model.z, - origin: [model.x, model.y], - rotation: rotation, - shape: { - points: arrow(model.x, model.y, style.Signal.auto.width, style.Signal.lamp.radiusR * 0.8) - }, - style: { - stroke: model.stroke, - lineWidth: model.lineWidth, - fill: model.fill - } - }); - this.add(this.arrow); - } - } + this.isNew = true; + this.arrow = new Polygon({ + zlevel: model.zlevel, + z: model.z, + origin: [model.x, model.y], + rotation: rotation, + shape: { + points: arrow(model.x, model.y, style.Signal.auto.width, style.Signal.lamp.radiusR * 0.8) + }, + style: { + stroke: model.stroke, + lineWidth: model.lineWidth, + fill: model.fill + } + }); + this.add(this.arrow); + } + } - // 停止动画 - animationRecover() { - this.create(); - this.arrow.stopAnimation(false); - } + // 停止动画 + animationRecover() { + this.create(); + this.arrow.stopAnimation(false); + } - // 箭头颜色 - setColor(color) { - this.create(); - this.arrow.setStyle('fill', color); - } + // 箭头颜色 + setColor(color) { + this.create(); + this.arrow.setStyle('fill', color); + } - // 箭头闪烁 - arrowsAnimation() { - this.create(); + // 箭头闪烁 + arrowsAnimation() { + this.create(); - const style = this.model.style; - const fill = this.arrow.style.fill; + const style = this.model.style; + const fill = this.arrow.style.fill; - this.arrow.animateStyle(true) - .when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor }) - .when(2000, { fill: fill, stroke: style.sidelineColor }) - .when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor }) - .when(4000, { fill: fill, stroke: style.sidelineColor }) - .start(); - } + this.arrow.animateStyle(true) + .when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor }) + .when(2000, { fill: fill, stroke: style.sidelineColor }) + .when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor }) + .when(4000, { fill: fill, stroke: style.sidelineColor }) + .start(); + } - // 隐藏 - hide() { - this.create(); - this.arrow.hide(); - } + // 隐藏 + hide() { + this.create(); + this.arrow.hide(); + } - // 显示 - show() { - this.create(); - this.arrow.show(); - } + // 显示 + show() { + this.create(); + this.arrow.show(); + } } export default ESigPass; diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index c907eef41..39bd7a64d 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -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(); - } + this.sigAuto.show(); } // 信号机进路自动触发模式状态类型 setAutoTriggerOpen() { this.sigAuto.setColor(this.style.Signal.auto.autoTrigger); - if (this.model.atsAutoTriggerShow) { - this.sigAuto.show(); - } else { - this.sigAuto.hide(); - } + this.sigAuto.show(); } // 隐藏自动信号和自动进路 @@ -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]) { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue index 6c7378eb1..382f23406 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue @@ -15,11 +15,11 @@
道岔
- + - 确认 - + 确认 +
@@ -28,13 +28,13 @@
道岔
- - - + + + - 确认 - + 确认 +
@@ -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,17 +218,17 @@ 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 }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.doClose(); }).catch((error) => { this.doClose(); diff --git a/src/jmapNew/theme/ningbo_01/model.js b/src/jmapNew/theme/ningbo_01/model.js index cf408a81f..62440bda8 100644 --- a/src/jmapNew/theme/ningbo_01/model.js +++ b/src/jmapNew/theme/ningbo_01/model.js @@ -1,63 +1,63 @@ import deviceType from '../../constant/deviceType'; class Model { - constructor() { - // 公共字段部分默认初始值 - this['public'] = {}; - this['public'][deviceType.Signal] = { - lampPositionType: '02', - lampPostType: '02' - }; + constructor() { + // 公共字段部分默认初始值 + this['public'] = {}; + this['public'][deviceType.Signal] = { + lampPositionType: '02', + lampPostType: '02' + }; - // 私有字段部分默认初始值 - this['private'] = {}; - this['private'][deviceType.StationControl] = { - indicatorShow: true // 标识灯名称显示 - }; - this['private'][deviceType.Section] = { - borderBorderShow: true, // 区段边界显示 - standTrackNameShow: true, // 站台轨名称显示 - reentryTrackNameShow: true, // 折返轨名称显示 - transferTrackNameShow: true // 转换轨名称显示 - }; - this['private'][deviceType.Signal] = { - linkageAutoRouteShow: true, // 联锁自动进路表示灯显示 - atsAutoTriggerShow: true // ATS自动触发表示灯显示 - }; - this['private'][deviceType.Train] = { - nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 - nameFontSize: 10 // 字体大小 - }; - this['private'][deviceType.TrainWindow] = { - trainWindowShow: true - }; - } + // 私有字段部分默认初始值 + this['private'] = {}; + this['private'][deviceType.StationControl] = { + indicatorShow: true // 标识灯名称显示 + }; + this['private'][deviceType.Section] = { + borderBorderShow: true, // 区段边界显示 + standTrackNameShow: true, // 站台轨名称显示 + reentryTrackNameShow: true, // 折返轨名称显示 + transferTrackNameShow: true // 转换轨名称显示 + }; + this['private'][deviceType.Signal] = { + linkageAutoRouteShow: true, // 联锁自动进路表示灯显示 + atsAutoTriggerShow: true // ATS自动触发表示灯显示 + }; + this['private'][deviceType.Train] = { + nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 + nameFontSize: 10 // 字体大小 + }; + this['private'][deviceType.TrainWindow] = { + trainWindowShow: true + }; + } - initPublicProps(model) { - if (model) { - var modelInitial = this.public[model._type]; - if (modelInitial) { - for (var prop in modelInitial) { - model[prop] = modelInitial[prop]; - } - } - } + initPublicProps(model) { + if (model) { + var modelInitial = this.public[model._type]; + if (modelInitial) { + for (var prop in modelInitial) { + model[prop] = modelInitial[prop]; + } + } + } - return model; - } + return model; + } - initPrivateProps(model) { - if (model) { - var modelInitial = this.private[model._type]; - if (modelInitial) { - for (var prop in modelInitial) { - model[prop] = modelInitial[prop]; - } - } - } + initPrivateProps(model) { + if (model) { + var modelInitial = this.private[model._type]; + if (modelInitial) { + for (var prop in modelInitial) { + model[prop] = modelInitial[prop]; + } + } + } - return model; - } + return model; + } } export default new Model();