点灯&&分路不良

This commit is contained in:
fan 2022-09-05 14:02:53 +08:00
parent 0d6f5c13f9
commit acc83c30be
3 changed files with 40 additions and 8 deletions

View File

@ -10,11 +10,11 @@
:modal="false"
:close-on-click-modal="false"
>
<div class="table">
<div :id="domIdChange" class="table">
<div v-for="(temp,index) in tempTable" :key="index" class="eachShunt">
<div class="shuntingName">{{ temp.name }}</div>
<div class="shuntingSelected">
<el-checkbox v-model="temp.selected" size="medium" />
<el-checkbox v-model="temp.selected" size="medium" @change="changeShuntingTypeList" />
</div>
</div>
</div>
@ -56,6 +56,9 @@ export default {
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Section.defectiveShunting.confirm.domId : '';
},
domIdChange() {
return this.dialogShow ? OperationEvent.Section.defectiveShunting.shuntingTypeListChange.domId : '';
}
},
methods:{
@ -84,6 +87,23 @@ export default {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
changeShuntingTypeList(val) {
const shuntingTypeList = [];
this.tempTable.forEach(each=>{
if (each.selected) {
shuntingTypeList.push(each.value);
}
});
const operate = {
operation: OperationEvent.Section.defectiveShunting.shuntingTypeListChange.operation,
userOperationType: 'leftClick',
shuntingTypeList: shuntingTypeList
};
console.log(shuntingTypeList, 'test----------');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {}
}).catch((error) => { console.error(error); });
},
commit() {
const shuntingTypeList = [];
this.tempTable.forEach(each=>{
@ -93,7 +113,6 @@ export default {
});
const operate = {
over: true,
code:this.sectionCode,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
operation: OperationEvent.Section.defectiveShunting.confirm.operation,
param:{

View File

@ -71,7 +71,7 @@
<center><b>道岔解封</b></center>
</span>
</button>
<button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['Signal'])">
<button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['SignalButton'])">
<span style="color: black">
<center><b>点灯</b></center>
</span>
@ -389,9 +389,18 @@ export default {
//
handelDefectiveShunting(model) {
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
const {switchSection, code, shuntingTypeList} = model;
this.clearOperate();
this.$refs.defectiveShunting.doShow({switchSection, code, shuntingTypeList});
const operate = {
operation: this.Section.defectiveShunting.button.operation,
code: model.code,
userOperationType: 'leftClick'
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
const {switchSection, code, shuntingTypeList} = model;
this.$refs.defectiveShunting.doShow({switchSection, code, shuntingTypeList});
}
});
// this.clearOperate();
},
// S
guideLockLeftButtonDown() {
@ -708,7 +717,7 @@ export default {
operation: this.$store.state.menuOperation.buttonOperation,
userOperationType: 'leftClick',
cmdType: CMD.Signal.CMD_SIGNAL_TURN_ON,
param: {signalCode: model.code}
param: {signalCode: model.signalCode}
};
this.sendCommand(operate);
},

View File

@ -2311,6 +2311,10 @@ export const OperationEvent = {
confirm:{
operation: '4281',
domId: '_Tips-Section-Defective-Shunting-Confirm'
},
shuntingTypeListChange: {
operation: '4282',
domId: '_Tips-Section-Defective-Shunting-Change'
}
// menuButton: {
// operation: '428',