宁波一号线 键盘操作调整(回车事件)
This commit is contained in:
parent
ed4b5047bd
commit
a13b21613f
@ -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');
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div style="overflow: hidden;">
|
||||
<div>道岔</div>
|
||||
<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-select>
|
||||
</el-col>
|
||||
@ -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();
|
||||
|
@ -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'
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user