bugfix - 信号机站控操作
This commit is contained in:
parent
c6c3a3a377
commit
05788794cd
@ -14,23 +14,21 @@ export function judgeStationControl(
|
||||
const centralStation = store.getters["map/getDeviceByCode"](
|
||||
centralStationCode
|
||||
);
|
||||
// 角色车站是 设备所属车站或所属集中站
|
||||
if (work === "localWork") {
|
||||
const flag1 =
|
||||
centralStation.controlMode === "Center" &&
|
||||
isAvailableInOtherControlMode;
|
||||
const flag2 =
|
||||
store.state.training.roleDeviceCode === stationCode ||
|
||||
store.state.training.roleDeviceCode === centralStationCode;
|
||||
return flag1 && flag2;
|
||||
} else if (work === "dispatchWork") {
|
||||
const flag1 =
|
||||
const isCenterMode = centralStation.controlMode === "Center";
|
||||
const isLocalMode =
|
||||
centralStation.controlMode === "Local" ||
|
||||
centralStation.controlMode === "Emergency";
|
||||
// 角色车站是 设备所属车站或所属集中站
|
||||
if (work === "localWork") {
|
||||
const isBelongingStation =
|
||||
store.state.training.roleDeviceCode === stationCode ||
|
||||
store.state.training.roleDeviceCode === centralStationCode;
|
||||
return (
|
||||
centralStation.controlMode === "Center" ||
|
||||
(flag1 && isAvailableInOtherControlMode)
|
||||
((isCenterMode && isAvailableInOtherControlMode) || isLocalMode) &&
|
||||
isBelongingStation
|
||||
);
|
||||
} else if (work === "dispatchWork") {
|
||||
return isCenterMode || (isLocalMode && isAvailableInOtherControlMode);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user