添加改方指令

This commit is contained in:
joylink_cuiweidong 2022-04-22 15:23:50 +08:00
parent de4f4d2aa6
commit 0d6be6e129
3 changed files with 71 additions and 38 deletions

View File

@ -71,16 +71,16 @@
<center><b>道岔解封</b></center>
</span>
</button>
<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.menuButton.operation, ['Signal'])">
<span style="color: black">
<center><b>点灯</b></center>
</span>
</button>
<button :id="Signal.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])">
<span style="color:#800000">
<center><b>灭灯</b></center>
</span>
</button>
<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.menuButton.operation, ['Signal'])">
<span style="color: black">
<center><b>点灯</b></center>
</span>
</button>
<button :id="Signal.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])">
<span style="color:#800000">
<center><b>灭灯</b></center>
</span>
</button>
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: guideLockLeftFlag? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
<span style="color: #800000">
<center><b>S引导总锁</b></center>
@ -110,11 +110,11 @@
<center><b>标记窗</b></center>
</span>
</button>
<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
<span style="color: #800000">
<center><b>故障通知</b></center>
</span>
</button>
<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
<span style="color: #800000">
<center><b>故障通知</b></center>
</span>
</button>
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
@ -194,6 +194,9 @@ export default {
Signal() {
return OperationEvent.Signal;
},
CTCCommand() {
return OperationEvent.CTCCommand;
},
MixinCommand() {
return OperationEvent.MixinCommand;
},
@ -604,6 +607,7 @@ export default {
this.sendCommand(operate);
}
},
// CHANGE_DIRECTION
selectedChange() {
//
const model = this.selected; //
@ -641,6 +645,9 @@ export default {
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
this.deviceList.push(model);
this.arrangementRouteOperation(this.deviceList);
} else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
//
this.changeDirection(model);
} else {
this.clearOperate();
}
@ -658,6 +665,25 @@ export default {
this.deviceList = [];
Handler.clear(); //
this.$store.dispatch('menuOperation/setButtonOperation', null);
},
changeDirection(model) {
const operate = {
over: true,
code: model.code,
operation: this.CTCCommand.assistPressDownTurnDirection.menu.operation,
cmdType: CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
param: {
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
// this.clearOperate();
}).catch((error) => {
// this.clearOperate();
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
}
};

View File

@ -367,8 +367,9 @@ export default {
DirectionRod: {
CMD_DIRECTION_CHANGE: {value: 'Direction_Change', label: '切换方向'}
},
CTC: {
CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'},
CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'}
}
CTC: {
CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'},
CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'},
CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'}
}
};

View File

@ -1748,20 +1748,20 @@ export const OperationEvent = {
domId: '_Tips-Signal-conflictRoute-Menu{TOP}'
}
},
// 点灯 (大铁)
signalLight: {
// 点灯 (大铁)
signalLight: {
menuButton: {
operation: '3231',
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}'
}
},
// 灭灯 (大铁)
signalDestroy: {
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}'
}
},
// 灭灯 (大铁)
signalDestroy: {
menuButton: {
operation: '3232',
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}'
}
}
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}'
}
}
},
// 物理区段操作
@ -3537,20 +3537,26 @@ export const OperationEvent = {
}
}
},
CTCCommand: {
CTCCommand: {
receivingNotice: {
menu: {
operation: '1100',
domId: '_Tips-CTC-ReceivingNotice-Menu{TOP}'
}
},
departureNotice: {
domId: '_Tips-CTC-ReceivingNotice-Menu{TOP}'
}
},
departureNotice: {
menu: {
operation: '1101',
domId: '_Tips-CTC-DepartureNotice-Menu{TOP}'
}
}
}
domId: '_Tips-CTC-DepartureNotice-Menu{TOP}'
}
},
assistPressDownTurnDirection:{
menu:{
operation:'1102',
domId: '_Tips-CTC-AssistPressDownTurnDirection-Menu{TOP}'
}
}
}
};