From ccb52a8efd8708d736803b149ec2c8f27f793248 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Fri, 30 Dec 2022 17:53:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=81=E6=B3=A2?= =?UTF-8?q?=E4=B8=89=E9=81=93=E5=B2=94=E5=AE=9E=E8=AE=AD=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/ningbo_03/menus/menuDialog/switchBlock.vue | 4 ++-- .../theme/ningbo_03/menus/menuDialog/switchCommand.vue | 10 +++++++--- src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue | 6 ++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchBlock.vue index 07cdc4e4d..f99a4edb1 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchBlock.vue @@ -193,8 +193,8 @@ export default { doClose() { this.loading = false; this.dialogShow = false; - this.sure && (this.currentSelect = null); - this.sure && this.$refs.table.setCurrentRow(); + this.currentSelect = null; + this.$refs.table.setCurrentRow(); this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value, Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done')) ); diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue index 763135c69..2ffed6440 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue @@ -3,6 +3,7 @@ 确定(O) - 应用(A) + 应用(A) 关闭(C) @@ -103,10 +104,13 @@ export default { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, domIdChoose() { - return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : ''; + return this.dialogShow ? OperationEvent.Switch.turnout.menu.domId : ''; }, domIdConfirm() { - return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; + return this.dialogShow ? OperationEvent.Command.common.confirm.domId : ''; + }, + domIdApply() { + return this.dialogShow ? OperationEvent.Command.common.apply.domId : ''; }, title() { return '道岔命令'; diff --git a/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue index 44ea9f5df..f1341fd3b 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue @@ -145,6 +145,12 @@ export default { watch: { '$store.state.menuOperation.menuCount': function (val) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) { + const operate = { + code: `${this.selected.code}`, + userOperationType: 'rightClick', + operation: OperationEvent.Command.commandRight.right.operation + }; + this.$store.dispatch('trainingNew/next', operate); this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); From 9571b24b7b15d88ca38aafb6f3c192bd8c3dff96 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Fri, 30 Dec 2022 18:07:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menus/menuDialog/switchCommand.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue index 2ffed6440..f3efe6991 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue @@ -197,17 +197,17 @@ export default { handleCurrentChange(val) { if (!val) { return; } commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{ - if (valid) { - this.position = ''; - const switchModel = this.$store.getters['map/getDeviceByCode'](val.code); - this.selectedSwitchCode = val.code; - this.selectedSwitch = switchModel; - // this.mode = elem.auto ? 'artificial' : 'auto'; - // if (!elem.auto) { - // if (elem.normalPosition) { this.position = 'reverse'; } - // if (elem.reversePosition) { this.position = 'normal'; } - // } - } + // if (valid) { + this.position = ''; + const switchModel = this.$store.getters['map/getDeviceByCode'](val.code); + this.selectedSwitchCode = val.code; + this.selectedSwitch = switchModel; + // this.mode = elem.auto ? 'artificial' : 'auto'; + // if (!elem.auto) { + // if (elem.normalPosition) { this.position = 'reverse'; } + // if (elem.reversePosition) { this.position = 'normal'; } + // } + // } }); }, getSwitchPosition(code) {