sige 1 year ago
parent
commit
17ecdc9b9c
  1. 1
      src/web/src/App.vue
  2. 10
      src/web/src/pages/engineering/Common.vue
  3. 7
      src/web/src/pages/engineering/HeatingPlate.vue
  4. 3
      src/web/src/pages/engineering/LiquidArm.vue
  5. 2
      src/web/src/pages/engineering/LiquidPlate.vue
  6. 9
      src/web/src/pages/engineering/Page.vue
  7. 1
      src/web/src/pages/engineering/TransClip.vue
  8. 9
      src/web/src/pages/engineering/TransLeftRight.vue
  9. 135
      src/web/src/pages/engineering/TransTube.vue
  10. 3
      src/web/src/pages/engineering/TransUpDown.vue

1
src/web/src/App.vue

@ -20,6 +20,7 @@ onMounted(mounted);
// mounted
function mounted() {
debugger;
document.title = "全自动石墨消解仪";
let accessToken = window.localStorage.getItem('accessToken');
accessToken = accessToken ? accessToken : null;

10
src/web/src/pages/engineering/Common.vue

@ -7,6 +7,9 @@
</a-col>
<a-col :span="12" class="text-right">
<div class="inline-block mr-1 bg-white p-1 rounded">
<a-button @click="actionLogout">退出</a-button>
</div>
<div class="inline-block mr-1 bg-white p-1 rounded">
<a-button class="mr-1" @click="actionDoorOpen">开门</a-button>
<a-button class="mr-1" @click="actionDoorClose">关门</a-button>
<a-button @click="actionReset">设备复位</a-button>
@ -56,6 +59,9 @@
<script setup>
import { actuatorExecuteAction, ioUpdate, ioGetValue } from './Engineering.js';
import { ref } from 'vue';
import { useAppStore } from '@/stores/AppStore';
/** @var {AppStore} */
const appStore = useAppStore();
/** @var {Boolean} */
const isLightGreenOn = ref(false);
/** @var {Boolean} */
@ -178,4 +184,8 @@ async function actionDoorOpen() {
async function actionDoorClose() {
await actuatorExecuteAction('DoorMotor','MoveToIO', [1,1]);
}
function actionLogout() {
appStore.setAccessToken(null);
}
</script>

7
src/web/src/pages/engineering/HeatingPlate.vue

@ -8,12 +8,17 @@
<a-row class="my-3">
<a-col :span="6" class="leading-8">移动至</a-col>
<a-col :span="10">
<a-select v-model:value="moveDestName" class="w-full">
<a-select v-model:value="moveDestName" class="w-full" :dropdownMatchSelectWidth="false">
<a-select-option value="HeatPlateSlot.0">试管架01</a-select-option>
<a-select-option value="HeatPlateSlot.1">试管架02</a-select-option>
<a-select-option value="HeatPlateSlot.2">试管架03</a-select-option>
<a-select-option value="HeatPlateSlot.3">试管架04</a-select-option>
<a-select-option value="HeatPlateSlot.4">试管架05</a-select-option>
<a-select-option value="HeatPlateErrorSlotTube.0">异常试管01</a-select-option>
<a-select-option value="HeatPlateErrorSlotTube.1">异常试管02</a-select-option>
<a-select-option value="HeatPlateErrorSlotTube.2">异常试管03</a-select-option>
<a-select-option value="HeatPlateErrorSlotTube.3">异常试管04</a-select-option>
<a-select-option value="HeatPlateErrorSlotTube.4">异常试管05</a-select-option>
</a-select>
</a-col>
<a-col :span="8" class="text-right"><a-button class="ml-1" @click="actionMoveToName">执行</a-button></a-col>

3
src/web/src/pages/engineering/LiquidArm.vue

@ -8,9 +8,10 @@
<a-row class="my-3">
<a-col :span="6" class="leading-8">移动至</a-col>
<a-col :span="10">
<a-select v-model:value="moveDestName" class="w-full">
<a-select v-model:value="moveDestName" class="w-full" :dropdownMatchSelectWidth="false">
<a-select-option value="LiquidArmPumpGroupOut">外圈加液</a-select-option>
<a-select-option value="LiquidArmPumpGroupIn">内圈加液</a-select-option>
<a-select-option value="LiquidArmTubeRackPickUp">试管架拾取</a-select-option>
</a-select>
</a-col>
<a-col :span="8" class="text-right"><a-button class="ml-1" @click="actionMoveToName">执行</a-button></a-col>

2
src/web/src/pages/engineering/LiquidPlate.vue

@ -8,7 +8,7 @@
<a-row class="my-3">
<a-col :span="6" class="leading-8">移动至</a-col>
<a-col :span="10">
<a-select v-model:value="moveDestName" class="w-full">
<a-select v-model:value="moveDestName" class="w-full" :dropdownMatchSelectWidth="false">
<a-select-option value="LiquidPlatePlaceTubeRack">放置试管架</a-select-option>
<a-select-option value="LiquidPlateSlotPumpOutGroup.0">外圈组00</a-select-option>
<a-select-option value="LiquidPlateSlotPumpOutGroup.1">外圈组01</a-select-option>

9
src/web/src/pages/engineering/Page.vue

@ -45,4 +45,13 @@ import TransClip from './TransClip.vue';
import TransTubeRack from './TransTubeRack.vue';
import TransTube from './TransTube.vue';
import LogViewer from './LogViewer.vue';
import { onErrorCaptured } from 'vue';
import { Modal } from 'ant-design-vue';
onErrorCaptured((error, vm, info) => {
Modal.error({
title: '错误',
content: error.message,
});
});
</script>

1
src/web/src/pages/engineering/TransClip.vue

@ -10,6 +10,7 @@
<a-select v-model:value="moveDestName" class="w-full">
<a-select-option value="TransClipServoOpen">打开</a-select-option>
<a-select-option value="TransClipServoClose">关闭</a-select-option>
<a-select-option value="TransClipServoTubeClip">夹紧试管</a-select-option>
</a-select>
</a-col>
<a-col :span="8" class="text-right"><a-button class="ml-1" @click="actionMoveToName">执行</a-button></a-col>

9
src/web/src/pages/engineering/TransLeftRight.vue

@ -12,7 +12,14 @@
<a-select-option value="TransLrMotorStandby">待机</a-select-option>
<a-select-option value="TransLrMotorHeatPlateSlot">试管架加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorLiquid">试管架加液盘拾取</a-select-option>
<!-- <a-select-option value="TransLrMotorTubeOffset.0">试管00加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorHeatingPlateTube.0">试管00加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorHeatingPlateTube.1">试管01加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorHeatingPlateTube.2">试管02加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorHeatingPlateTube.3">试管03加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorHeatingPlateTube.4">试管04加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorLiquidPlateTube.0">试管00加液盘拾取</a-select-option>
<!--
<a-select-option value="TransLrMotorTubeOffset.1">试管01加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorTubeOffset.2">试管02加热盘拾取</a-select-option>
<a-select-option value="TransLrMotorTubeOffset.3">试管03加热盘拾取</a-select-option>

135
src/web/src/pages/engineering/TransTube.vue

@ -43,15 +43,101 @@ const liquidTubeIndex = ref(null);
const heatTubeIndex = ref(null);
/** @var {Number} */
const errorSlotIndex = ref(4);
// liquid plate point map
const liquidPlatePointMap = {
'LiquidPlateTubePoint.0' : 0,
'LiquidPlateTubePoint.1' : 0,
'LiquidPlateTubePoint.2' : 0,
'LiquidPlateTubePoint.3' : 0,
'LiquidPlateTubePoint.4' : 0,
'LiquidPlateTubePoint.5' : 0,
'LiquidPlateTubePoint.6' : 0,
'LiquidPlateTubePoint.7' : 0,
'LiquidPlateTubePoint.8' : 0,
'LiquidPlateTubePoint.9' : 0,
'LiquidPlateTubePoint.10' : 0,
'LiquidPlateTubePoint.11' : 0,
'LiquidPlateTubePoint.12' : 0,
'LiquidPlateTubePoint.13' : 0,
'LiquidPlateTubePoint.14' : 0,
'LiquidPlateTubePoint.15' : 0,
};
// heating plate point map
const heatingPlateOffsetMap = {
'HeatPlateTubeOffset.0' : 0,
'HeatPlateTubeOffset.1' : 0,
'HeatPlateTubeOffset.2' : 0,
'HeatPlateTubeOffset.3' : 0,
'HeatPlateTubeOffset.4' : 0,
'HeatPlateTubeOffset.5' : 0,
'HeatPlateTubeOffset.6' : 0,
'HeatPlateTubeOffset.7' : 0,
'HeatPlateTubeOffset.8' : 0,
'HeatPlateTubeOffset.9' : 0,
'HeatPlateTubeOffset.10' : 0,
'HeatPlateTubeOffset.11' : 0,
'HeatPlateTubeOffset.12' : 0,
'HeatPlateTubeOffset.13' : 0,
'HeatPlateTubeOffset.14' : 0,
'HeatPlateTubeOffset.15' : 0,
};
const transLrHeatPlateTubePointMap = {
'TransLrMotorHeatPlateTube.0' : 0,
'TransLrMotorHeatPlateTube.1' : 0,
'TransLrMotorHeatPlateTube.2' : 0,
'TransLrMotorHeatPlateTube.3' : 0,
'TransLrMotorHeatPlateTube.4' : 0,
'TransLrMotorHeatPlateTube.5' : 0,
'TransLrMotorHeatPlateTube.6' : 0,
'TransLrMotorHeatPlateTube.7' : 0,
'TransLrMotorHeatPlateTube.8' : 0,
'TransLrMotorHeatPlateTube.9' : 0,
'TransLrMotorHeatPlateTube.10' : 0,
'TransLrMotorHeatPlateTube.11' : 0,
'TransLrMotorHeatPlateTube.12' : 0,
'TransLrMotorHeatPlateTube.13' : 0,
'TransLrMotorHeatPlateTube.14' : 0,
'TransLrMotorHeatPlateTube.15' : 0,
};
const transLrLiquidPlageTubePointMap = {
'TransLrMotorLiquidPlateTube.0' : 0,
'TransLrMotorLiquidPlateTube.1' : 0,
'TransLrMotorLiquidPlateTube.2' : 0,
'TransLrMotorLiquidPlateTube.3' : 0,
'TransLrMotorLiquidPlateTube.4' : 0,
'TransLrMotorLiquidPlateTube.5' : 0,
'TransLrMotorLiquidPlateTube.6' : 0,
'TransLrMotorLiquidPlateTube.7' : 0,
'TransLrMotorLiquidPlateTube.8' : 0,
'TransLrMotorLiquidPlateTube.9' : 0,
'TransLrMotorLiquidPlateTube.10' : 0,
'TransLrMotorLiquidPlateTube.11' : 0,
'TransLrMotorLiquidPlateTube.12' : 0,
'TransLrMotorLiquidPlateTube.13' : 0,
'TransLrMotorLiquidPlateTube.14' : 0,
'TransLrMotorLiquidPlateTube.15' : 0,
};
const heatingPlateMiddleMap = {
'HeatPlateSlot.0' : 0,
'HeatPlateSlot.1' : 0,
'HeatPlateSlot.2' : 0,
'HeatPlateSlot.3' : 0,
'HeatPlateSlot.4' : 0,
};
//
async function actionMoveToLiquidPlate() {
let index = liquidTubeIndex.value;
let errSlotIndex = errorSlotIndex.value;
// -
await actuatorExecuteAction('HeatingPlateMotor','MoveToName',[`HeatPlateSlot.${errSlotIndex}`]);
// -
let pos = heatingPlateMiddleMap[`HeatPlateSlot.${errSlotIndex}`] + heatingPlateOffsetMap[`HeatPlateTubeOffset.${index}`];
await actuatorExecuteAction('HeatingPlateMotor','MoveToPosition',[pos]);
// -
await actuatorExecuteAction(`HeatingPlateMotorSlotCover_${index}`, 'MoveToName', ['HeatPlateSlotCoverOpen']);
@ -61,29 +147,32 @@ async function actionMoveToLiquidPlate() {
// -
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoOpenFromTube']);
// -
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorHeatPlateSlot']);
// -
pos = transLrPointMap[`TransLrMotorHeatPlateTube.${index}`];
await actuatorExecuteAction('TransferArmLRMotor','MoveToPosition',[pos]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorHeatPlateDepth']);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToPosition',[0]);
// -
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoRackClip']);
await actuatorExecuteAction('TransferClipServeMotor','MoveToPosition',[0]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']);
// -
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorLiquid']);
// -
pos = transLrLiquidPlageTubePointMap[`TransLrMotorLiquidPlateTube.${index}`];
await actuatorExecuteAction('TransferArmLRMotor','MoveToPosition',[pos]);
// -
await actuatorExecuteAction('LiquidPlateMotor','MoveToName',[`LiquidPlatePlaceTubeRack`]);
pos = liquidPlatePointMap[`LiquidPlateTubePoint.${index}`];
await actuatorExecuteAction('LiquidPlateMotor','MoveToPosition',[pos]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorLiquidDepth']);
await actuatorExecuteAction('TransferArmUDMotor','MoveToPosition',[0]);
// -
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoOpenFromTube']);
await actuatorExecuteAction('TransferClipServeMotor','MoveToPosition',[0]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']);
@ -100,14 +189,16 @@ async function actionMoveToHeatingPlate() {
let index = heatTubeIndex.value;
let errSlotIndex = errorSlotIndex.value;
// -
// -
let pos = heatingPlateMiddleMap[`HeatPlateSlot.${index}`] + heatingPlateOffsetMap[`HeatPlateTubeOffset.${errSlotIndex}`];
await actuatorExecuteAction('HeatingPlateMotor','MoveToName',[`HeatPlateSlot.${errSlotIndex}`]);
// -
await actuatorExecuteAction(`HeatingPlateMotorSlotCover_${index}`, 'MoveToName', ['HeatPlateSlotCoverOpen']);
// -
await actuatorExecuteAction('LiquidPlateMotor','MoveToName',[`LiquidPlatePlaceTubeRack`]);
// -
pos = liquidPlatePointMap[`LiquidPlateTubePoint.${index}`];
await actuatorExecuteAction('LiquidPlateMotor','MoveToName',[pos]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']);
@ -115,11 +206,12 @@ async function actionMoveToHeatingPlate() {
// -
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoClose']);
// -
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorLiquid']);
// -
pos = transLrLiquidPlageTubePointMap[`TransLrMotorLiquidPlateTube.${index}`];
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',[pos]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorLiquidDepth']);
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',[0]);
// -
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoRackClip']);
@ -128,10 +220,11 @@ async function actionMoveToHeatingPlate() {
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']);
// -
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorHeatPlateSlot']);
pos = transLrHeatPlateTubePointMap[`TransLrMotorHeatPlateTube.${index}`];
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',[pos]);
// -
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorHeatPlateDepth']);
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',[0]);
// -
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoClose']);

3
src/web/src/pages/engineering/TransUpDown.vue

@ -14,6 +14,9 @@
<a-select-option value="TransUdMotorHeatPlateDepth">试管架加热盘拾取</a-select-option>
<a-select-option value="TransUdMotorLiquidDepth">试管架加液盘拾取</a-select-option>
<a-select-option value="TransUdMotorTubeClip">试管加热盘拾取</a-select-option>
<a-select-option value="TransUdMotorHeatingPlateTubeClipPrepare">试管加热盘拾取准备</a-select-option>
<a-select-option value="TransUnMotorLiquidPlateTubeClip">试管加液盘拾取</a-select-option>
</a-select>
</a-col>
<a-col :span="8" class="text-right"><a-button class="ml-1" @click="actionMoveToName">执行</a-button></a-col>

Loading…
Cancel
Save