成都三号线 现地工作站 指令操作代码调整
This commit is contained in:
parent
59371074ca
commit
b5ebe1599d
@ -139,8 +139,7 @@ export default {
|
||||
offset: {},
|
||||
commandTypeList: [],
|
||||
cmdTypeList: [],
|
||||
deviceList: [],
|
||||
routeListFilter: []
|
||||
deviceList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -268,18 +267,28 @@ export default {
|
||||
}
|
||||
},
|
||||
buttonDown(operation, commandTypeList) {
|
||||
// 清空当前的选择的设备
|
||||
this.deviceList = [];
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Switch.unlock.button.operation, this.MixinCommand.unblock.button.operation, this.Station.guideLock.button.operation, this.MixinCommand.totalCancel.button.operation];
|
||||
// 以下 会弹出密码框 (总人解,区故解,道岔解封,解封按钮,总取消,引导总锁)
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation,
|
||||
this.Section.fault.button.operation,
|
||||
this.Switch.unlock.button.operation,
|
||||
this.MixinCommand.unblock.button.operation,
|
||||
this.Station.guideLock.button.operation
|
||||
// this.MixinCommand.totalCancel.button.operation
|
||||
];
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
this.commandTypeList = commandTypeList;
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// 判断是否需要 弹窗密码框
|
||||
if (operationList.includes(operation)) {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
@ -302,27 +311,24 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
arrangementRouteOperation(deviceList) { // 排列进路 信号重开操作
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
let isArrangementRoute = false;
|
||||
if (deviceList.length === 1) {
|
||||
this.routeListFilter = [];
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === deviceList[0].code) {
|
||||
this.routeListFilter.push(item);
|
||||
}
|
||||
});
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].code);
|
||||
const signal = deviceList[0];
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
|
||||
if (sectionModel) {
|
||||
// 判断 信号机所在区段的 左右关联区段 是否有锁闭
|
||||
const sectionLeft = this.$store.getters['map/getDeviceByCode'](sectionModel.leftSectionCode);
|
||||
const sectionRight = this.$store.getters['map/getDeviceByCode'](sectionModel.rightSectionCode);
|
||||
if (sectionLeft.routeLock || sectionRight.routeLock) {
|
||||
isArrangementRoute = true;
|
||||
}
|
||||
}
|
||||
// 如果该信号机红灯亮 而且 所属区段左右两侧区段锁闭 执行信号重启操作
|
||||
if (signal.redOpen && !signal.greenOpen && !signal.yellowOpen && isArrangementRoute) { // 信号重启
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
@ -340,8 +346,10 @@ export default {
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
let flag = false;
|
||||
this.routeListFilter.forEach(item => {
|
||||
if (item.endButtonSignalCode === deviceList[1].code) { // 结束信号机按钮对比
|
||||
this.routeList.forEach(item => {
|
||||
// item.endButtonSignalCode
|
||||
// 起始信号机 和 结束信号机按钮 过滤进路
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
operate.code = deviceList[1].code;
|
||||
@ -349,7 +357,6 @@ export default {
|
||||
this.deviceList = [];
|
||||
flag = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.routeListFilter = [];
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
@ -357,12 +364,12 @@ export default {
|
||||
});
|
||||
if (!flag) {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow('未找到选择进路!');
|
||||
this.$refs.noticeInfo.doShow('未找到选择的进路!');
|
||||
}
|
||||
}
|
||||
},
|
||||
handelFunctionButton(model, subType) {
|
||||
debugger;
|
||||
// debugger;
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
@ -629,7 +636,9 @@ export default {
|
||||
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||
const subType = this.$store.state.menuOperation.subType; // 选择设备的子元素
|
||||
const switchOperation = [this.Switch.lock.button.operation, this.Switch.unlock.button.operation, this.Switch.locate.button.operation, this.Switch.reverse.button.operation];
|
||||
|
||||
if (!model._type && !model._code) {
|
||||
return;
|
||||
}
|
||||
if (buttonOperation && buttonOperation === this.MixinCommand.functionButton.button.operation) {
|
||||
this.handelFunctionButton(model, subType);
|
||||
} else {
|
||||
@ -638,6 +647,7 @@ export default {
|
||||
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
|
||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
this.deviceList.push(model);
|
||||
// debugger;
|
||||
if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
@ -664,6 +674,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
this.clearOperate();
|
||||
this.$messageBox('请先切换到站控或紧急站控');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,15 +20,13 @@ export function getAutoReentryBySignalCode(signalCode, routeList, autoReentryLis
|
||||
const autoReentry = [];
|
||||
routeList.forEach(item => {
|
||||
if (item.startSignalCode === signalCode && item.turnBack) {
|
||||
route.push(item);
|
||||
route.push(item.code);
|
||||
}
|
||||
});
|
||||
autoReentryList.forEach(item => {
|
||||
route.forEach(it => {
|
||||
if (item.turnBackRouteCode === it.code || item.turnBackRoute2Code === it.code) {
|
||||
autoReentry.push(item);
|
||||
}
|
||||
});
|
||||
if (route.includes(item.turnBackRouteCode) || route.includes(item.turnBackRoute2Code)) {
|
||||
autoReentry.push(item);
|
||||
}
|
||||
});
|
||||
return autoReentry;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user