大铁仿真操作调整

This commit is contained in:
fan 2021-04-27 15:52:39 +08:00
parent b107ae58d6
commit 83eddd42d3
4 changed files with 15 additions and 15 deletions

View File

@ -183,7 +183,7 @@ class SkinCode extends defaultStyle {
fontSize: 11, // 信号机名称字体大小 fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细 fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色 defaultColor: '#FFFFFF', // 信号灯字体默认色
blockColor: '#EF0C08', // 信号灯字体锁定颜色 blockColor: '#FFFFFF', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {

View File

@ -699,7 +699,7 @@ class Signal extends Group {
if (this.style.Signal.text.nameBorderShow) { if (this.style.Signal.text.nameBorderShow) {
this.sigName.setStyle({ textBorderWidth: 1 }); this.sigName.setStyle({ textBorderWidth: 1 });
} }
if (this.sigBack) { if (this.sigBack && (!this.model.signalButtonList || !this.model.signalButtonList.length)) {
this.sigBack.show(); this.sigBack.show();
this.sigBack.setStyle('fill', this.style.Signal.sigBack.fillColor); this.sigBack.setStyle('fill', this.style.Signal.sigBack.fillColor);
} }

View File

@ -51,12 +51,12 @@
<center><b>单解</b></center> <center><b>单解</b></center>
</span> </span>
</button> </button>
<button :id="Signal.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.lock.button.operation, ['Signal'])"> <button :id="Signal.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.lock.button.operation, ['Signal', 'SignalButton'])">
<span style="color: black"> <span style="color: black">
<center><b>按钮封锁</b></center> <center><b>按钮封锁</b></center>
</span> </span>
</button> </button>
<button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation, ['Signal'])"> <button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation, ['Signal', 'SignalButton'])">
<span style="color: black"> <span style="color: black">
<center><b>按钮解封</b></center> <center><b>按钮解封</b></center>
</span> </span>
@ -508,15 +508,14 @@ export default {
}); });
}, },
handleGuideSignal(model) { handleGuideSignal(model) {
const signal = this.$store.getters['map/getDeviceByCode'](model.code);
const operate = { const operate = {
over: true, over: true,
code: model.code, code: model.code,
operation: this.Signal.guide.button.operation, operation: this.Signal.guide.button.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: {signalId: model.code} param: {signalId: model.signalCode}
}; };
if (signal.delayTime) { if (this.guideTime) {
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
this.guideTime = 15; this.guideTime = 15;
this.handleGuideTime(); this.handleGuideTime();
@ -666,7 +665,8 @@ export default {
if (model.signalButtonList && model.signalButtonList.length > 0) { if (model.signalButtonList && model.signalButtonList.length > 0) {
let flag = false; let flag = false;
model.signalButtonList.forEach(item => { model.signalButtonList.forEach(item => {
flag = flag || item.type === 'TRAIN_TERMINAL'; const signalButton = this.$store.getters['map/getDeviceByCode'](item);
flag = flag || signalButton.type === 'PICK';
}); });
return flag; return flag;
} else { } else {
@ -690,7 +690,7 @@ export default {
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK; operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
operate.param = {signalId: model.code}; operate.param = {signalId: model.code};
} }
} else if (model._type === 'SignalButton' && model.type === 'TRAIN_TERMINAL') { } else if (model._type === 'SignalButton' && model.type === 'PICK') {
if (buttonOperation === this.Signal.lock.button.operation) { if (buttonOperation === this.Signal.lock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK; operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
operate.param = {signalId: model.signalCode}; operate.param = {signalId: model.signalCode};
@ -766,13 +766,10 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode); const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
if (station) { if (station) {
if (buttonOperation && this.commandTypeList.includes(model._type)) { if (buttonOperation && this.commandTypeList.includes(model._type)) {
this.deviceList.push(model);
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) { if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handelTotalCancel(model, subType); this.handelTotalCancel(model, subType);
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) { } else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
this.handleTotalHumanSolution(model); this.handleTotalHumanSolution(model);
// } else if (buttonOperation === this.Signal.guide.button.operation) {
// this.handleGuideRoute(this.deviceList);
} else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) { } else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) {
this.handelControlRoute(model); this.handelControlRoute(model);
} else if (switchOperation.includes(buttonOperation)) { } else if (switchOperation.includes(buttonOperation)) {
@ -805,11 +802,14 @@ export default {
checkSignalBlock(code) { checkSignalBlock(code) {
if (code) { if (code) {
const signal = this.$store.getters['map/getDeviceByCode'](code); const signal = this.$store.getters['map/getDeviceByCode'](code);
return signal.blockade; return signal && signal.blockade;
} else { return false; } } else { return false; }
}, },
clearOperate() { clearOperate() {
Handler.clear(); // Handler.clear(); //
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
}
this.deviceList = []; this.deviceList = [];
this.$store.dispatch('menuOperation/setButtonOperation', null); this.$store.dispatch('menuOperation/setButtonOperation', null);
} }

View File

@ -245,8 +245,8 @@ export default {
routeAspectList.forEach(item => { routeAspectList.forEach(item => {
const route = this.filterRouteMap[item.routeCode]; const route = this.filterRouteMap[item.routeCode];
if (route) { if (route) {
const signalAspect = this.$convertField(route.signalAspect, this.signalAspectList, ['value', 'label']) || ''; const signalAspect = this.$convertField(item.signalAspect, this.signalAspectList, ['value', 'label']) || '';
nameList.push(route.name + '(' + signalAspect + ')'); nameList.push(route + '(' + signalAspect + ')');
} }
}); });
} }