From 94c83b44bcd922dff63ccff94f62ca33e17fc9d2 Mon Sep 17 00:00:00 2001 From: sige Date: Fri, 22 Mar 2024 09:07:09 +0800 Subject: [PATCH] ~ --- src/web/src/pages/main/Page.vue | 2 ++ .../main/contents/OperationTubeRackAcidAdd.vue | 9 ++++++-- .../pages/main/contents/OperationTubeRackAdd.vue | 17 ++++++--------- .../main/contents/OperationTubeRackTakeShot.vue | 25 +++++++--------------- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/src/web/src/pages/main/Page.vue b/src/web/src/pages/main/Page.vue index 8f7d862..30284db 100644 --- a/src/web/src/pages/main/Page.vue +++ b/src/web/src/pages/main/Page.vue @@ -63,6 +63,7 @@ + \ No newline at end of file diff --git a/src/web/src/pages/main/contents/OperationTubeRackTakeShot.vue b/src/web/src/pages/main/contents/OperationTubeRackTakeShot.vue index 6c4a186..e87382f 100644 --- a/src/web/src/pages/main/contents/OperationTubeRackTakeShot.vue +++ b/src/web/src/pages/main/contents/OperationTubeRackTakeShot.vue @@ -19,23 +19,14 @@ const appStore = useAppStore(); // 移至观察区 async function actionMoveToLiquidPlate() { - appStore.setCameraEnable(true); - let client = ApiClient.getClient(); - let task = await client.taskAppend('SampleMoveToLiquidPlate',{ - slotIndex : props.activeSlot.index * 1, - }); - let taskId = task.id; - - while( true ) { - task = await client.taskExecutionGet(taskId); - if ( 'ERROR' === task.status ) { - Modal.error({title: '失败', content: task.message}); - break ; - } else if ( 'FINISHED' === task.status ) { - appStore.setCameraEnable(true); - break ; - } - await Common.delay(1000); + try { + appStore.setCameraEnable(true); + let client = ApiClient.getClient(); + await client.taskAppend('SampleMoveToLiquidPlate',{ + slotIndex : props.activeSlot.index * 1, + }); + } catch ( e ) { + Modal.error({title: '任务执行失败',content: e.message}); } } \ No newline at end of file