From 91a1f8ae5d9b40940fa9470a0df94b87c0ab5008 Mon Sep 17 00:00:00 2001 From: sige Date: Fri, 22 Mar 2024 09:05:59 +0800 Subject: [PATCH] ~ --- .../main/contents/OperationTubeRackTakeOut.vue | 27 ++++----------- .../notification/TaskSampleTakeOutTubeRack.vue | 40 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 src/web/src/pages/main/contents/notification/TaskSampleTakeOutTubeRack.vue diff --git a/src/web/src/pages/main/contents/OperationTubeRackTakeOut.vue b/src/web/src/pages/main/contents/OperationTubeRackTakeOut.vue index 861a8c7..b1d76df 100644 --- a/src/web/src/pages/main/contents/OperationTubeRackTakeOut.vue +++ b/src/web/src/pages/main/contents/OperationTubeRackTakeOut.vue @@ -33,28 +33,13 @@ function showTakeOutConfirm() { }); } -// 样本取出 -async function takeOut() { - let client = ApiClient.getClient(); - let task = await client.taskAppend('SampleTakeOut',{slotIndex:props.activeSlot.index * 1}); - taskId = task.id; - - while( true ) { - task = await client.taskExecutionGet(taskId); - if ( 'RUNNING' === task.status ) { - await showTakeOutConfirm(); - } else if ( 'ERROR' === task.status ) { - Modal.error({title: '取出失败', content: task.message}); - break ; - } else if ( 'FINISHED' === task.status ) { - break ; - } - await Common.delay(1000); - } -} - // 样本取出确认 async function actionTakeOut() { - nextTick(takeOut); + let client = ApiClient.getClient(); + try { + await client.taskAppend('SampleTakeOut',{slotIndex:props.activeSlot.index * 1}); + } catch ( e ) { + Modal.error({title: '取出失败', content: e.message}); + } } \ No newline at end of file diff --git a/src/web/src/pages/main/contents/notification/TaskSampleTakeOutTubeRack.vue b/src/web/src/pages/main/contents/notification/TaskSampleTakeOutTubeRack.vue new file mode 100644 index 0000000..3e9847a --- /dev/null +++ b/src/web/src/pages/main/contents/notification/TaskSampleTakeOutTubeRack.vue @@ -0,0 +1,40 @@ + + \ No newline at end of file