|
@@ -53,10 +53,23 @@ export const selectBodyPositionWithFullLogic = async (
|
|
|
if (currentKey === 'exam') {
|
|
|
if (bodyPosition.dview.expose_status === 'Unexposed') {
|
|
|
// 未曝光体位:同步设备,使能曝光
|
|
|
- await changeBodyPosition(bodyPosition.sop_instance_uid);
|
|
|
+ try {
|
|
|
+ await changeBodyPosition(bodyPosition.sop_instance_uid);
|
|
|
+ } catch (error) {
|
|
|
+ message.error('同步新体位到服务时失败了',error);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 切换体位成功后,使能发生器曝光
|
|
|
- await setExpEnable();
|
|
|
+ try {
|
|
|
+ await setExpEnable();
|
|
|
+ } catch (error) {
|
|
|
+ console.error(
|
|
|
+ `[bodyPositionSelection] 使能曝光失败,目标体位是 ${bodyPosition.view_name}:`,
|
|
|
+ error
|
|
|
+ );
|
|
|
+ message.error('使能曝光失败,请检查设备连接或重试');
|
|
|
+ }
|
|
|
|
|
|
const successMsg = `Body position changed successfully: ${bodyPosition.view_name}`;
|
|
|
console.log(`[bodyPositionSelection] ${successMsg}`);
|