|
@@ -196,11 +196,11 @@ const businessFlowMiddlewareLogic: Middleware =
|
|
|
`[businessFlowMiddleware] Exiting exam flow, last key was: ${state.lastKey}`
|
|
|
);
|
|
|
// 离开检查前,禁止发生器曝光
|
|
|
- try {
|
|
|
+ try {
|
|
|
await setExpDisable();
|
|
|
- } catch (error) {
|
|
|
+ } catch (error) {
|
|
|
console.error('[businessFlowMiddleware] setExpDisable Failed to disable exposure:', error);
|
|
|
- }
|
|
|
+ }
|
|
|
unprepare();
|
|
|
}
|
|
|
} else {
|
|
@@ -296,6 +296,14 @@ const businessFlowMiddlewareLogic: Middleware =
|
|
|
console.log(
|
|
|
'[businessFlowMiddleware] Fully Exposed, notifying backend'
|
|
|
);
|
|
|
+ const studyId =
|
|
|
+ (store.getState() as RootState)?.bodyPositionList?.selectedBodyPosition
|
|
|
+ ?.work?.StudyID ?? '';
|
|
|
+ suspendOrCompleteStudy(studyId, 'Completed').then(() => {
|
|
|
+ console.log(`[businessFlowMiddleware] 全曝光,通知后端完成`)
|
|
|
+ }).catch((error) => {
|
|
|
+ console.log(`[businessFlowMiddleware] 全曝光,通知后端失败 ${error}`);
|
|
|
+ });
|
|
|
// Proceed with the action
|
|
|
return next(action);
|
|
|
} else if (exposureStatus === 'Not Exposed') {
|