宁波一号线 键盘操作调整(回车事件)

This commit is contained in:
joylink_cuiweidong 2020-07-29 10:39:58 +08:00
parent ed4b5047bd
commit a13b21613f
4 changed files with 46 additions and 21 deletions

View File

@ -137,6 +137,13 @@ export default {
return ''; return '';
} }
}, },
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');

View File

@ -79,6 +79,13 @@ export default {
return this.dialogShow && !this.$store.state.menuOperation.break; 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() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');

View File

@ -28,7 +28,7 @@
<div style="overflow: hidden;"> <div style="overflow: hidden;">
<div>道岔</div> <div>道岔</div>
<el-col :span="11"> <el-col :span="11">
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange"> <el-select :id="domIdChoose" ref="selectSwitch" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
<el-option v-for="option in filterSwitchList" :key="option.code" :label="option.name" :value="option.code" /> <el-option v-for="option in filterSwitchList" :key="option.code" :label="option.name" :value="option.code" />
</el-select> </el-select>
</el-col> </el-col>
@ -140,6 +140,17 @@ export default {
return ''; 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() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
@ -180,7 +191,6 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
SelectChange() { SelectChange() {
const operate = { const operate = {
operation: '', operation: '',
@ -197,6 +207,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.selectSwitch.blur();
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();

View File

@ -94,11 +94,11 @@ export default {
handler: this.reverse, handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
}, },
{ // {
label: '道岔单锁', // label: '',
handler: this.lock, // handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
}, // },
{ {
type: 'separator' type: 'separator'
}, },