Browse Source

areaId 替换为 heatId

master
LiLongLong 5 months ago
parent
commit
735fbe3d66
  1. 10
      src/views/debug/debug.vue
  2. 39
      src/views/graphite/index.vue

10
src/views/debug/debug.vue

@ -246,17 +246,17 @@ onMounted(() => {
function onCmdClick(command: OperationCmd) {
let params: Record<string, any> = {};
if (command === "upTray") {
params = { areaId: selectedAreaForTray.value, height: trayHeight.value };
params = { heatId: selectedAreaForTray.value, height: trayHeight.value };
} else if (command === "downTray") {
params = { areaId: selectedAreaForTray.value, height: trayHeight.value };
params = { heatId: selectedAreaForTray.value, height: trayHeight.value };
} else if (command === "moveMachineArm") {
params = { position: `${x.value},${y.value},${z.value}` };
} else if (command === "injectFluid") {
params = { tubeNum: tubeNum.value, solutionId: solutionId.value, flowRate: pumpAmount.value };
} else if (command === "startHeat") {
params = { areaId: selectedAreaForHeat.value, temperature: heatTemperature.value };
params = { heatId: selectedAreaForHeat.value, temperature: heatTemperature.value };
} else if (command === "stopHeat") {
params = { areaId: selectedAreaForHeat.value };
params = { heatId: selectedAreaForHeat.value };
} else if (command === "startShakeUp") {
params = { speed: shakeUpSpeed.value };
} else if (
@ -265,7 +265,7 @@ function onCmdClick(command: OperationCmd) {
command === "moveToActionArea" ||
command === "moveToHeatArea"
) {
params = { areaId: selectedArea.value };
params = { heatId: selectedArea.value };
}
debugCmd({ command, params }).then(res => {
if (res.success) {

39
src/views/graphite/index.vue

@ -16,7 +16,7 @@
<div class="picture_area">
<!--加液区和拍照区可切换-->
<div style="display: flex; justify-content: center; align-items: center">
<div style="font-size: 1rem; margin-left: 0.3rem">加液区</div>
<div style="font-size: 1rem; margin-left: 0.3rem">加液区</div>
<van-switch
v-model="switchModule"
size="1rem"
@ -27,14 +27,16 @@
</div>
<TakePickture v-if="switchModule"></TakePickture>
<div v-else class="home_tube">
<div
class="inner-circle"
v-for="(tubeItem, index) in tubeList"
:key="index"
:style="{ background: tubeItem.color }"
></div><!--@click="onChooseTube(tubeItem, index)"-->
<div v-else style="display: flex;justify-content: center;">
<div class="home_tube">
<div
class="inner-circle"
v-for="(tubeItem, index) in tubeList"
:key="index"
:style="{ background: tubeItem.color }"
></div><!--@click="onChooseTube(tubeItem, index)"-->
</div>
</div>
<!--操作区-->
<div class="graphite_btn_container">
@ -132,7 +134,7 @@
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted, effect } from "vue";
import { ref, reactive, onMounted, onUnmounted } from "vue";
//@ts-ignore
import { ElMessage } from "element-plus";
import { createWebSocket, sharedWsUrl } from "@/services/socket";
@ -380,7 +382,7 @@ const onMoveToHeat = () => {
//
const params = {
areaId: selectedDataItem.id,
heatId: selectedDataItem.id,
};
const command: OperationCmd = "moveToHeatArea";
taskCmd({ command, params }).then((res) => {
@ -430,7 +432,7 @@ const onMoveToOperationArea = () => {
//4
const params = {
areaId: selectedDataItem.id
heatId: selectedDataItem.id
}
onSendCmd('moveToActionArea', params)
//UI
@ -475,7 +477,7 @@ const onMoveToSpecial = () => {
onSelectedTray(selectedDataItem, 'isMove')
const params = {
areaId:selectedDataItem.id
heatId:selectedDataItem.id
}
onSendCmd('moveToActionArea', params)
}
@ -587,7 +589,7 @@ const onStartHeat = () => {
const cmdList:any = []
selectedTrayList.value.forEach((heatArea:any) => {
const params = {
areaId : heatArea.id,
heatId : heatArea.id,
temperature: heatArea.temperature
}
taskCmd({ command: 'startHeat', params }).then((res) => {
@ -611,7 +613,7 @@ const onStopHeat = () => {
}
selectedTrayList.value.forEach((heatArea:any) => {
const params = {
areaId : heatArea.id,
heatId : heatArea.id,
}
taskCmd({ command: 'stopHeat', params }).then((res) => {
if (res.success) {
@ -661,7 +663,7 @@ const onUpTray = () => {
//
selectedTrayList.value.forEach((heatAreaItem:any) => {
const params = {
areaId: heatAreaItem.id
heatId: heatAreaItem.id
}
taskCmd({ command:'upTray', params }).then((res) => {
@ -677,11 +679,11 @@ const onUpTray = () => {
}
// selectedValue: 0 | 1 | 2; // 012
const updateheatAearStatus = (selectedValue:any, areaId:string) => {
const updateheatAearStatus = (selectedValue:any, heatId:string) => {
let heaterList = statusStore.status?.heater
if(heaterList){
heaterList.forEach(item => {
if(item.heaterId == areaId){
if(item.heaterId == heatId){
item.trayStatus = selectedValue
}
})
@ -866,6 +868,7 @@ const onSendCmd = (command:OperationCmd,params:any)=> {
}
.home_tube {
width: 13rem;
height: 13rem;
background: #384d5d;
opacity: 1;

Loading…
Cancel
Save