|
@ -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() { |
|
|
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}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |