diff --git a/src/jmapNew/theme/components/menus/dialog/switchControl.vue b/src/jmapNew/theme/components/menus/dialog/switchControl.vue index baa4bc3f0..ee44aab57 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchControl.vue @@ -137,6 +137,13 @@ export default { return ''; } }, + watch:{ + '$store.state.map.keyboardEnterCount': function (val) { + if (this.dialogShow && this.popClass === 'ningbo-01__systerm') { + this.commit(); + } + } + }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); diff --git a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue index d2d185c24..bb9a09244 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue @@ -50,8 +50,8 @@ export default { name: 'SwitchHookLock', components: { NoticeInfo - }, - props: { + }, + props: { popClass: { type: String, default() { @@ -67,18 +67,25 @@ export default { operation: '', stationName: '', switchName: '', - normal:false, - targetMemberId: '' + normal:false, + targetMemberId: '' }; }, computed: { - ...mapGetters('training', [ + ...mapGetters('training', [ 'memberList' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; } }, + watch:{ + '$store.state.map.keyboardEnterCount': function (val) { + if (this.dialogShow && this.popClass === 'ningbo-01__systerm') { + this.commit(); + } + } + }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); @@ -91,10 +98,10 @@ export default { this.switchName = ''; this.stationName = ''; if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) { - this.switchName = selected.name; + this.switchName = selected.name; const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); if (station) { - this.targetMemberId = this.memberList.find(ele => ele.deviceCode == station.code).id; + this.targetMemberId = this.memberList.find(ele => ele.deviceCode == station.code).id; this.stationName = station.name; } } @@ -116,20 +123,20 @@ export default { }, commit() { this.loading = true; - const group = this.$route.query.group; + const group = this.$route.query.group; const param = { commandType: 'Switch_Hook_Lock', targetMemberId: this.targetMemberId, params: { - switchCode: this.selected.code, - normal: this.normal - } + switchCode: this.selected.code, + normal: this.normal + } }; commitTrainSend(group, param).then(({valid, operate})=>{ - this.doClose(); + this.doClose(); }).catch((error) => { - this.$refs.noticeInfo.doShow(error.message); - this.doClose(); + this.$refs.noticeInfo.doShow(error.message); + this.doClose(); }); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue index e2342dec2..cab53a35f 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue @@ -28,7 +28,7 @@
道岔
- + @@ -140,6 +140,17 @@ export default { return ''; } }, + watch:{ + '$store.state.map.keyboardEnterCount': function (val) { + if (this.dialogShow) { + if (this.disabledConfirm2 && !this.disabledConfirm1) { + this.confirm1(); + } else if (this.disabledConfirm1 && !this.disabledConfirm2 ) { + this.confirm2(); + } + } + } + }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); @@ -180,7 +191,6 @@ export default { this.$store.dispatch('training/emitTipFresh'); mouseCancelState(this.selected); }, - SelectChange() { const operate = { operation: '', @@ -197,6 +207,7 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.selectSwitch.blur(); } }).catch(() => { this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 163670045..2d99e6b72 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -94,11 +94,11 @@ export default { handler: this.reverse, cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION }, - { - label: '道岔单锁', - handler: this.lock, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - }, + // { + // label: '道岔单锁', + // handler: this.lock, + // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK + // }, { type: 'separator' },