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..f3efe6991 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 '道岔命令'; @@ -193,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) { 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();