This commit is contained in:
fan 2024-02-06 11:07:37 +08:00
commit 93e1f7992c
4 changed files with 42 additions and 48 deletions

View File

@ -207,22 +207,20 @@ export class IbpButtonInteraction extends GraphicInteractionPlugin<IBPButton> {
});
};
bypassResetConfig.handler = () => {
bypassConfig.handler = () => {
if (!simulationId || !mapId) {
return;
}
bypassOperation({
simulationId,
mapId,
deviceId: ibpButton.id,
deviceCode: ibpButton.datas.code,
stationId,
operation: request.BypassOperationReq.Operation.bypass_reset,
btnType: request.BypassOperationReq.BtnType.ibp_btn,
}).catch((err) => {
errorNotify('操作失败', { message: err.origin.response.data.title });
});
};
if (!simulationId || !mapId) {
return;
}
bypassOperation({
simulationId,
mapId,
deviceId: ibpButton.id,
deviceCode: ibpButton.datas.code,
stationId,
operation: request.BypassOperationReq.Operation.bypass_reset,
btnType: request.BypassOperationReq.BtnType.ibp_btn,
}).catch((err) => {
errorNotify('操作失败', { message: err.origin.response.data.title });
});
};
IbpButtonMenu.open(e.global);
}

View File

@ -155,22 +155,20 @@ export class IbpKeyInteraction extends GraphicInteractionPlugin<IbpKey> {
});
};
bypassResetConfig.handler = () => {
bypassConfig.handler = () => {
if (!simulationId || !mapId) {
return;
}
bypassOperation({
simulationId,
mapId,
deviceId: ibpKey.id,
deviceCode: ibpKey.datas.code,
stationId,
operation: request.BypassOperationReq.Operation.bypass_reset,
btnType: request.BypassOperationReq.BtnType.ibp_key,
}).catch((err) => {
errorNotify('操作失败', { message: err.origin.response.data.title });
});
};
if (!simulationId || !mapId) {
return;
}
bypassOperation({
simulationId,
mapId,
deviceId: ibpKey.id,
deviceCode: ibpKey.datas.code,
stationId,
operation: request.BypassOperationReq.Operation.bypass_reset,
btnType: request.BypassOperationReq.BtnType.ibp_key,
}).catch((err) => {
errorNotify('操作失败', { message: err.origin.response.data.title });
});
};
IbpKeyMenu.open(e.global);
}

View File

@ -233,22 +233,20 @@ export class PslButtonOperateInteraction extends GraphicInteractionPlugin<PslBut
});
};
bypassResetConfig.handler = () => {
bypassConfig.handler = () => {
if (!simulationId || !mapId) {
return;
}
bypassOperation({
simulationId,
mapId,
deviceId: pslButton.id,
deviceCode: pslButton.datas.code,
gateBoxId,
operation: request.BypassOperationReq.Operation.bypass_reset,
btnType: request.BypassOperationReq.BtnType.pls_btn,
}).catch((err) => {
errorNotify('操作失败', { message: err.origin.response.data.title });
});
};
if (!simulationId || !mapId) {
return;
}
bypassOperation({
simulationId,
mapId,
deviceId: pslButton.id,
deviceCode: pslButton.datas.code,
gateBoxId,
operation: request.BypassOperationReq.Operation.bypass_reset,
btnType: request.BypassOperationReq.BtnType.pls_btn,
}).catch((err) => {
errorNotify('操作失败', { message: err.origin.response.data.title });
});
};
PslButtonMenu.open(e.global);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 21 KiB