sige 1 year ago
parent
commit
94c83b44bc
  1. 2
      src/web/src/pages/main/Page.vue
  2. 5
      src/web/src/pages/main/contents/OperationTubeRackAcidAdd.vue
  3. 17
      src/web/src/pages/main/contents/OperationTubeRackAdd.vue
  4. 17
      src/web/src/pages/main/contents/OperationTubeRackTakeShot.vue

2
src/web/src/pages/main/Page.vue

@ -63,6 +63,7 @@
<noti-handler-task-sample-add-tube-rack-put-in />
<noti-handler-task-sample-add-tube-rack-status-confirm />
<noti-handler-task-start-reset-error-tube-rack-take-out />
<noti-handler-task-sample-take-out-tube-rack />
</template>
<script setup>
import { ref,onMounted, onUnmounted } from 'vue';
@ -81,6 +82,7 @@ import NotiHandlerTaskStartResetErrorTubeRackPutIn from './contents/notification
import NotiHandlerTaskSampleAddTubeRackPutIn from './contents/notification/TaskSampleAddTubeRackPutIn.vue';
import NotiHandlerTaskSampleAddTubeRackStatusConfirm from './contents/notification/TaskSampleAddTubeRackStatusConfirm.vue';
import NotiHandlerTaskStartResetErrorTubeRackTakeOut from './contents/notification/TaskStartResetErrorTubeRackTakeOut.vue';
import NotiHandlerTaskSampleTakeOutTubeRack from './contents/notification/TaskSampleTakeOutTubeRack.vue';
/** @var {AppStore} */
const appStore = useAppStore();
/** @var {Ref<string>} */

5
src/web/src/pages/main/contents/OperationTubeRackAcidAdd.vue

@ -22,6 +22,7 @@
<script setup>
import ApiClient from '@/utils/ApiClient';
import { ref } from 'vue';
import { Modal } from 'ant-design-vue';
/** @var {Object} */
const props = defineProps({
activeSlot: Object,
@ -63,12 +64,16 @@ async function actionAcidAdd() {
async function acidAddOk() {
enable.value = false;
let client = ApiClient.getClient();
try {
await client.taskAppend('LiquidAdd',{
slotIndex : props.activeSlot.index * 1,
liquidType : acidAdd.value.liquidType,
liquidVolume : acidAdd.value.liquidVolume * 1,
shakeTimes : acidAdd.value.shakeTimes * 1,
});
} catch ( e ) {
Modal.error({title: '任务执行失败',content: e.message});
}
}
//

17
src/web/src/pages/main/contents/OperationTubeRackAdd.vue

@ -10,25 +10,18 @@
cancel-text="取消"
@ok="actionOk"
>
<a-form label-align="left" :label-col="{span:4}" :wrapper-col="{span:20}">
<a-form-item label="ID">
<a-input v-model:value="digestion.eid" />
</a-form-item>
</a-form>
<p>是否添加新的消解样本</p>
</a-modal>
</template>
<script setup>
import { ref } from 'vue';
import { Modal } from 'ant-design-vue';
import ApiClient from '@/utils/ApiClient';
/** @var {Boolean} */
const enable = ref(false);
/** @var {String} */
const digestion = ref(null);
//
function actionEnable() {
digestion.value = {};
digestion.value.eid = null;
enable.value = true;
}
@ -36,6 +29,10 @@ function actionEnable() {
async function actionOk() {
enable.value = false;
let client = ApiClient.getClient();
await client.taskAppend('SampleAdd', digestion.value);
try {
await client.taskAppend('SampleAdd');
} catch ( e ) {
Modal.error({title: '任务执行失败',content: e.message});
}
}
</script>

17
src/web/src/pages/main/contents/OperationTubeRackTakeShot.vue

@ -19,23 +19,14 @@ const appStore = useAppStore();
//
async function actionMoveToLiquidPlate() {
try {
appStore.setCameraEnable(true);
let client = ApiClient.getClient();
let task = await client.taskAppend('SampleMoveToLiquidPlate',{
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);
} catch ( e ) {
Modal.error({title: '任务执行失败',content: e.message});
}
}
</script>
Loading…
Cancel
Save