道岔命令弹窗内的单选框添加domId

This commit is contained in:
dong 2023-01-03 15:58:12 +08:00
parent fe080d704f
commit 9653852c54
2 changed files with 58 additions and 10 deletions

View File

@ -31,20 +31,20 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div class="radio-box-title">设置模式</div> <div class="radio-box-title">设置模式</div>
<div class="radio-box"> <div :id="domIdSetMode" class="radio-box">
<el-radio v-model="mode" label="auto" :disabled="!!selectedSwitch.auto" style="display: block;margin-bottom: 10px;">自动</el-radio> <el-radio v-model="mode" label="auto" :disabled="!!selectedSwitch.auto" style="display: block;margin-bottom: 10px;" @input="changeMode">自动</el-radio>
<el-radio v-model="mode" label="artificial" :disabled="!selectedSwitch.auto" style="display: block;">人工</el-radio> <el-radio v-model="mode" label="artificial" :disabled="!selectedSwitch.auto" style="display: block;" @input="changeMode">人工</el-radio>
</div> </div>
<div class="radio-box-title">设置位置</div> <div class="radio-box-title">设置位置</div>
<div class="radio-box"> <div :id="domIdSetPosition" class="radio-box">
<el-radio v-model="position" label="normal" :disabled="!!(selectedSwitch.pos=='N' || selectedSwitch.auto)" style="display: block;margin-bottom: 10px;">定位</el-radio> <el-radio v-model="position" label="normal" :disabled="!!(selectedSwitch.pos=='N' || selectedSwitch.auto)" style="display: block;margin-bottom: 10px;" @input="changePosition">定位</el-radio>
<el-radio v-model="position" label="reserve" :disabled="!!(selectedSwitch.pos=='R' || selectedSwitch.auto)" style="display: block;">反位</el-radio> <el-radio v-model="position" label="reserve" :disabled="!!(selectedSwitch.pos=='R' || selectedSwitch.auto)" style="display: block;" @input="changePosition">反位</el-radio>
</div> </div>
<div class="radio-box-title">设置预留</div> <div class="radio-box-title">设置预留</div>
<div class="radio-box"> <div :id="domIdSetReserved" class="radio-box">
<el-radio v-model="reserved" label="auto" :disabled="true" style="display: block;margin-bottom: 10px;">自动与预留</el-radio> <el-radio v-model="reserved" label="auto" :disabled="true" style="display: block;margin-bottom: 10px;" @input="changeReserved">自动与预留</el-radio>
<el-radio v-model="reserved" label="reversed" :disabled="true" style="display: block;margin-bottom: 10px;">预留</el-radio> <el-radio v-model="reserved" label="reversed" :disabled="true" style="display: block;margin-bottom: 10px;" @input="changeReserved">预留</el-radio>
<el-radio v-model="reserved" label="release" :disabled="true" style="display: block;">释放</el-radio> <el-radio v-model="reserved" label="release" :disabled="true" style="display: block;" @input="changeReserved">释放</el-radio>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -112,6 +112,15 @@ export default {
domIdApply() { domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : ''; return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
}, },
domIdSetMode() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Switch_command_setMode.domId : '';
},
domIdSetPosition() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Switch_command_setPosition.domId : '';
},
domIdSetReserved() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Switch_command_setReserved.domId : '';
},
title() { title() {
return '道岔命令'; return '道岔命令';
} }
@ -124,6 +133,33 @@ export default {
} }
}, },
methods: { methods: {
changeMode() {
const step = {
operation: OperationEvent.Command.commandNingBo3.Switch_command_setMode.operation,
param: {
val: this.mode
}
};
this.$store.dispatch('trainingNew/next', step);
},
changePosition() {
const step = {
operation: OperationEvent.Command.commandNingBo3.Switch_command_setPosition.operation,
param: {
val: this.position
}
};
this.$store.dispatch('trainingNew/next', step);
},
changeReserved() {
const step = {
operation: OperationEvent.Command.commandNingBo3.Switch_command_setReserved.operation,
param: {
val: this.reserved
}
};
this.$store.dispatch('trainingNew/next', step);
},
doShow(operate) { doShow(operate) {
// //
this.dialogShow = true; this.dialogShow = true;

View File

@ -675,6 +675,18 @@ export const OperationEvent = {
line_sectionLock_remoteResetFunc_sure: { line_sectionLock_remoteResetFunc_sure: {
operation: '00c03s', operation: '00c03s',
domId: '_Tips-ningBo-line_remoteResetFunc-sure{TOP}' domId: '_Tips-ningBo-line_remoteResetFunc-sure{TOP}'
},
Switch_command_setMode: {
operation: '00c04',
domId: '_Tips-ningBo-Switch_command_setMode{BOTTOM}'
},
Switch_command_setPosition: {
operation: '00c05',
domId: '_Tips-ningBo-Switch_command_setPosition{BOTTOM}'
},
Switch_command_setReserved: {
operation: '00c06',
domId: '_Tips-ningBo-Switch_command_setReserved{BOTTOM}'
} }
}, },
commandRight: { commandRight: {