添加改方指令

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> <center><b>道岔解封</b></center>
</span> </span>
</button> </button>
<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.menuButton.operation, ['Signal'])"> <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"> <span style="color: black">
<center><b>点灯</b></center> <center><b>点灯</b></center>
</span> </span>
</button> </button>
<button :id="Signal.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])"> <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"> <span style="color:#800000">
<center><b>灭灯</b></center> <center><b>灭灯</b></center>
</span> </span>
</button> </button>
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: guideLockLeftFlag? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()"> <button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: guideLockLeftFlag? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
<span style="color: #800000"> <span style="color: #800000">
<center><b>S引导总锁</b></center> <center><b>S引导总锁</b></center>
@ -110,11 +110,11 @@
<center><b>标记窗</b></center> <center><b>标记窗</b></center>
</span> </span>
</button> </button>
<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()"> <button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
<span style="color: #800000"> <span style="color: #800000">
<center><b>故障通知</b></center> <center><b>故障通知</b></center>
</span> </span>
</button> </button>
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" /> <password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div> </div>
@ -194,6 +194,9 @@ export default {
Signal() { Signal() {
return OperationEvent.Signal; return OperationEvent.Signal;
}, },
CTCCommand() {
return OperationEvent.CTCCommand;
},
MixinCommand() { MixinCommand() {
return OperationEvent.MixinCommand; return OperationEvent.MixinCommand;
}, },
@ -604,6 +607,7 @@ export default {
this.sendCommand(operate); this.sendCommand(operate);
} }
}, },
// CHANGE_DIRECTION
selectedChange() { selectedChange() {
// //
const model = this.selected; // const model = this.selected; //
@ -641,6 +645,9 @@ export default {
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) { } else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
this.deviceList.push(model); this.deviceList.push(model);
this.arrangementRouteOperation(this.deviceList); this.arrangementRouteOperation(this.deviceList);
} else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
//
this.changeDirection(model);
} else { } else {
this.clearOperate(); this.clearOperate();
} }
@ -658,6 +665,25 @@ export default {
this.deviceList = []; this.deviceList = [];
Handler.clear(); // Handler.clear(); //
this.$store.dispatch('menuOperation/setButtonOperation', null); 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: { DirectionRod: {
CMD_DIRECTION_CHANGE: {value: 'Direction_Change', label: '切换方向'} CMD_DIRECTION_CHANGE: {value: 'Direction_Change', label: '切换方向'}
}, },
CTC: { CTC: {
CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'}, CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'},
CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_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}' domId: '_Tips-Signal-conflictRoute-Menu{TOP}'
} }
}, },
// 点灯 (大铁) // 点灯 (大铁)
signalLight: { signalLight: {
menuButton: { menuButton: {
operation: '3231', operation: '3231',
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}' domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}'
} }
}, },
// 灭灯 (大铁) // 灭灯 (大铁)
signalDestroy: { signalDestroy: {
menuButton: { menuButton: {
operation: '3232', operation: '3232',
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}' domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}'
} }
} }
}, },
// 物理区段操作 // 物理区段操作
@ -3537,20 +3537,26 @@ export const OperationEvent = {
} }
} }
}, },
CTCCommand: { CTCCommand: {
receivingNotice: { receivingNotice: {
menu: { menu: {
operation: '1100', operation: '1100',
domId: '_Tips-CTC-ReceivingNotice-Menu{TOP}' domId: '_Tips-CTC-ReceivingNotice-Menu{TOP}'
} }
}, },
departureNotice: { departureNotice: {
menu: { menu: {
operation: '1101', operation: '1101',
domId: '_Tips-CTC-DepartureNotice-Menu{TOP}' domId: '_Tips-CTC-DepartureNotice-Menu{TOP}'
} }
} },
} assistPressDownTurnDirection:{
menu:{
operation:'1102',
domId: '_Tips-CTC-AssistPressDownTurnDirection-Menu{TOP}'
}
}
}
}; };