From fdf63db2480544ca49cd6a1b6bab2dd6861fd389 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Sat, 20 Feb 2021 17:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E7=AB=99=E8=AE=A1=E8=BD=B4=E5=A4=8D?= =?UTF-8?q?=E4=BD=8D=EF=BC=88=E6=9C=AA=E5=AE=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_01.js | 4 +- src/jmapNew/shape/Station/index.js | 34 ++++- .../theme/components/utils/menuOperate.js | 7 +- .../ningbo_01/menus/dialog/buttonDown.vue | 125 ++++++++++++++++ .../ningbo_01/menus/menuStationPreReset.vue | 141 ++++++++++++++++++ src/scripts/cmdPlugin/OperationHandler.js | 11 ++ 6 files changed, 317 insertions(+), 5 deletions(-) create mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/buttonDown.vue create mode 100644 src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 897cb4cea..4ae58ae04 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -273,7 +273,9 @@ class SkinCode extends defaultStyle { arrowShow: false, grayColor: '#7F7F7F', lightShow: true, - lightText: '强制点灯' + lightText: '强制点灯', + preResetShow: true, + preResetText: '计轴复位' }, substationControl: { // 站控按钮 show: true, diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index 878fe4cba..fd31bf779 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -300,7 +300,7 @@ export default class Station extends Group { zlevel: this.zlevel, z: this.z, point: { - x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 6 / 2 + this.style.Station.StationControl.lamp.offset.x, + x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 9 / 2 + this.style.Station.StationControl.lamp.offset.x, y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y }, context: this.style.Station.StationControl.centerControl.lightText, @@ -321,6 +321,34 @@ export default class Station extends Group { }); this.add(this.lightArcBorder); } + if (this.style.Station.StationControl.centerControl.preResetShow) { + this.controlPreReset = new ESingleControl({ + _subType: 'preReset', + style: this.style, + zlevel: this.zlevel, + z: this.z, + point: { + x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 + this.style.Station.StationControl.lamp.offset.x, + y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y + }, + context: this.style.Station.StationControl.centerControl.preResetText, + pop: false + }); + this.add(this.controlPreReset); + const arcRect = this.controlPreReset.getArcBoundingRect(); + this.preResetArcBorder = new Rect({ + zlevel: this.zlevel, + z: this.z, + silent: true, + shape: arcRect, + style: { + lineDash: null, + stroke: this.style.Station.StationControl.lamp.stroke, + fill: this.style.Station.StationControl.lamp.fill + } + }); + this.add(this.preResetArcBorder); + } } createSubstationControl() { // 站控按钮 @@ -574,11 +602,11 @@ export default class Station extends Group { this.on('mouseout', e => { this.EMouse.mouseout(e); }); this.on('mouseover', e => { this.EMouse.mouseover(e); }); } else if (this.style.Station.StationControl.mouseOverStyle) { - this.EMouse = new EMouse(this); + this.EMouse = new EMouse(this); this.add(this.EMouse); this.on('mouseout', e => { this.EMouse.mouseout(e); }); this.on('mouseover', e => { this.EMouse.mouseover(e); }); - } + } } setShowMode() { } diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 2baa8e135..94584ec03 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -416,12 +416,17 @@ export const menuOperate = { setAutoTrigger:{ operation: OperationEvent.Station.setAutoTrigger.menu.operation, cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER + }, + // 计轴预复位 + setPreReset: { + operation: OperationEvent.Station.setPreReset.menu.operation, + cmdType: CMD.Station.CMD_STATION_PRE_RESET } }, // 设置/取消强制点灯 StationLight: { setOrCancelForceLight: { - operation: OperationEvent.Station, + operation: OperationEvent.StationLight.SetOrCancelForceLight.menu, cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL } }, diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/buttonDown.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/buttonDown.vue new file mode 100644 index 000000000..3a71065dd --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/buttonDown.vue @@ -0,0 +1,125 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue new file mode 100644 index 000000000..619e47106 --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue @@ -0,0 +1,141 @@ + + + diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index b9b6abc67..fca981edf 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -2503,6 +2503,17 @@ export const OperationEvent = { operation: '6163', domId: '_Tips-Station-areaSelection-Confirm' } + }, + // 计轴复位 + setPreReset: { + menu: { + operation: '617', + domId: '_Tips-Station-setPreReset-Menu' + }, + confirm: { + operation: '6171', + domId: '_Tips-Station-setPreReset-Confirm' + } } },