Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
bfe2401f0f
@ -1119,6 +1119,14 @@ class Signal extends Group {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (model.lockedRouteCode) {
|
||||
this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => {
|
||||
const button = store.getters['map/getDeviceByCode'](item);
|
||||
if (button.type === 'GUIDE') {
|
||||
button && button.instance && button.instance.setState({ toSelected: 0, type: button.model, pressDown: button.pressDown });
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 信号机封锁 */ // 缺一个功能封锁
|
||||
model.blockade && this.block(); // 因大铁处理信号按钮状态 封锁处理需在延时解锁时间之后处理
|
||||
model.overlapLock && this.overlapLock();
|
||||
|
@ -24,7 +24,7 @@
|
||||
<center><b>重</b><b>开</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal'])">
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['SignalButton'])">
|
||||
<span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'black'}">
|
||||
<center><b>总</b></center>
|
||||
<center><b>人</b><b>解</b></center>
|
||||
@ -36,7 +36,7 @@
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.guideLock.button.domId" :disabled="true" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['Button'])">
|
||||
<button :id="Station.guideLock.button.domId" :disabled="true" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['SignalButton'])">
|
||||
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'black'}">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>总</b><b>锁</b></center>
|
||||
@ -434,38 +434,6 @@ export default {
|
||||
this.clearOperate();
|
||||
this.$refs.defectiveShunting.doShow({ switchSection, code, shuntingTypeList });
|
||||
},
|
||||
// S引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Station.stationMasterLock.leftButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.sGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = { throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode };
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// X引导总锁按钮点击
|
||||
guideLockRightButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Station.stationMasterLock.rightButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = { throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode };
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
buttonDown(operation, commandTypeList, color) {
|
||||
this.clearOperate();
|
||||
this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(true, color);
|
||||
@ -477,7 +445,8 @@ export default {
|
||||
const operationList = [
|
||||
this.Signal.humanTrainRoute.button.operation,
|
||||
this.Section.fault.button.operation,
|
||||
this.Section.defectiveShunting.button.operation
|
||||
this.Section.defectiveShunting.button.operation,
|
||||
this.Signal.guide.button.operation
|
||||
];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -639,14 +608,14 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: { signalCode: model.signalCode }
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
if (signal.guideTime) {
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('training/updateMapState', [{ code: model.code, _type: model._type, toSelected: 1 }]);
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() => {
|
||||
this.clearOperate();
|
||||
});
|
||||
},
|
||||
// 人解进路
|
||||
handleTotalHumanSolution(model) {
|
||||
@ -658,6 +627,7 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
};
|
||||
// const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||
console.log(model._type, model.type, '8888888');
|
||||
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||
operate.param = { signalCode: model.signalCode };
|
||||
this.sendCommand(operate);
|
||||
@ -683,9 +653,7 @@ export default {
|
||||
},
|
||||
// 发送指令
|
||||
sendCommand(operate) {
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
.then(({ valid, response }) => {})
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -736,23 +704,28 @@ export default {
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
handleGuideLock(model) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
if ((signal && (this.guideLockRightFlag && signal.right)) || (this.guideLockLeftFlag && !signal.right)) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
param: { signalCode: model.signalCode }
|
||||
};
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
if (signal.guideTime) {
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_MASTER_LOCK;
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
// const operate = {
|
||||
// over: true,
|
||||
// code: model.code,
|
||||
// operation: this.Station.guideLock.button.operation,
|
||||
// nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
// param: { signalCode: model.signalCode }
|
||||
// };
|
||||
// // 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
// this.$refs.password.doShow(operate);
|
||||
const operate = {
|
||||
operation: this.Station.guideLock.button.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = { throat: model.labelEnum, stationCode: this.$store.state.map.showCentralizedStationCode };
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handelFaultSection(model) {
|
||||
if (model._type === 'Section') {
|
||||
@ -801,11 +774,12 @@ export default {
|
||||
'CANCEL', // 总取消
|
||||
'HUMAN_RELEASE_ROUTE' // 总人解
|
||||
];
|
||||
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||
this.handleGuideLock(model);
|
||||
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
console.log(buttonOperation, this.Signal.humanTrainRoute.button.operation, '9999');
|
||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
this.handelTotalCancel(model);
|
||||
} else if (buttonOperation === this.Station.guideLock.button.operation && model.type === 'GUIDELOCK') {
|
||||
this.handleGuideLock(model);
|
||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
||||
this.handleTotalHumanSolution(model);
|
||||
} else if (switchOperation.includes(buttonOperation)) {
|
||||
@ -821,23 +795,19 @@ export default {
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else if (buttonOperation === this.Signal.reopenSignal.button.operation) {
|
||||
this.reopenSignalOperation(model);
|
||||
} else if (buttonOperation === this.Signal.guide.button.operation) {
|
||||
this.handleGuideSignal(model);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else if (!buttonOperation) {
|
||||
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
|
||||
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE') {
|
||||
this.handleGuideSignal(model);
|
||||
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||
// if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE') {
|
||||
// this.handleGuideSignal(model);
|
||||
// } else
|
||||
if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
||||
this.assistOperateOrChange(model);
|
||||
} else if (model._type === 'SignalButton' && model.type === 'GUIDELOCK') {
|
||||
// 引导总锁
|
||||
if (model.labelEnum === 'S') {
|
||||
this.guideLockLeftButtonDown();
|
||||
} else if (model.labelEnum === 'X') {
|
||||
this.guideLockRightButtonDown();
|
||||
}
|
||||
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
|
||||
this.pressedSignalButton = model;
|
||||
const { lamp } = model.instance.style.SwitchFault;
|
||||
|
@ -153,7 +153,6 @@ export default {
|
||||
this.menu = [];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
console.log(OperateMode.FAULT, '*********************');
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
@ -137,7 +137,8 @@ export default {
|
||||
this.editModel = { code: '', pictureHide: false, position: {x:0, y:0} };
|
||||
},
|
||||
deviceChange(val) {
|
||||
this.deviceSelect(val);
|
||||
const device = this.$store.getters['map/getDeviceByCode'](val);
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user