From 3c3a355fb6d0c28bb38c00920178c28135de4e0f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 9 Jun 2020 14:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E5=B2=94=E5=8D=95=E8=A7=A3=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=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 --- .../foshan_01/menus/dialog/switchUnLock.vue | 59 ++++++++++--------- .../ningbo_01/menus/dialog/switchUnLock.vue | 4 +- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/foshan_01/menus/dialog/switchUnLock.vue index 68be56091..a3d2b0e53 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/switchUnLock.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/switchUnLock.vue @@ -49,7 +49,7 @@
状态
-
+
{{ message }}
关闭 @@ -73,7 +73,7 @@ export default { dialogShow: false, selected: null, operation: null, - + message:'', messageText1: '', messageText2: '', timeCountConfirm: -1, @@ -124,6 +124,7 @@ export default { }, methods: { doShow(operate, selected) { + this.message = ''; this.selected = selected; if (!this.dialogShow) { this.messageText1 = selected.name; @@ -139,6 +140,7 @@ export default { this.dialogShow = false; this.messageText1 = ''; this.messageText2 = ''; + this.message = ''; this.timeCountConfirm = -1; this.disabledConfirm1 = false; this.disabledConfirm2 = true; @@ -147,6 +149,7 @@ export default { }, SelectChange() { + this.message = ''; const operate = { operation: '', val: this.messageText2 @@ -192,32 +195,33 @@ export default { }); }, confirm2() { - if (this.selected.code != this.messageText2) { - this.$refs.noticeInfo.doShow({}, '请选择正确的道岔'); - return false; - } - const operate = { - over: true, - operation: '', - cmdType: '' - }; - if (this.operation == OperationEvent.Switch.unlock.menu.operation) { - operate.operation = OperationEvent.Switch.unlock.confirm2.operation; - operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK; - } else if (this.operation == OperationEvent.Switch.unblock.menu.operation) { - operate.operation = OperationEvent.Switch.unblock.confirm2.operation; - operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK; - } - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.messageText2 = '*****'; - this.disabledConfirm2 = true; - this.timeCountConfirm = -1; + if (this.selected.code == this.messageText2) { + const operate = { + over: true, + operation: '', + cmdType: '' + }; + if (this.operation == OperationEvent.Switch.unlock.menu.operation) { + operate.operation = OperationEvent.Switch.unlock.confirm2.operation; + operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK; + } else if (this.operation == OperationEvent.Switch.unblock.menu.operation) { + operate.operation = OperationEvent.Switch.unblock.confirm2.operation; + operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK; } - }).catch((error) => { - this.$refs.noticeInfo.doShow(operate, error.message); - }); + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.messageText2 = '*****'; + this.disabledConfirm2 = true; + this.timeCountConfirm = -1; + this.message = '操作成功'; + } + }).catch((error) => { + this.$refs.noticeInfo.doShow(operate, error.message); + }); + } else { + this.message = '请选择正确的道岔'; + } }, commit() { const operate = { @@ -319,6 +323,7 @@ export default { width: 100%; border: 2px solid #E9E9E9; box-shadow: 2px 2px #959595 inset; + padding:5px; } } } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue index bc17b3cc3..3b1452c2e 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue @@ -242,12 +242,13 @@ export default { this.messageText2 = '*****'; this.disabledConfirm2 = true; this.timeCountConfirm = -1; + this.message = '操作成功'; } }).catch(() => { this.$refs.noticeInfo.doShow(); }); } else { - this.message = '选择道岔错误'; + this.message = '请选择正确的道岔'; } }, commit() { @@ -350,6 +351,7 @@ export default { width: 100%; border: 2px solid #E9E9E9; box-shadow: 2px 2px #959595 inset; + padding:5px; } } }