Browse Source

fix:问题修复

master
guoapeng 3 months ago
parent
commit
fb90a14dc0
  1. 19
      src/components/check/index.vue
  2. 194
      src/components/container/Item/index.vue
  3. 73
      src/components/home/FillSolution/index.vue
  4. 1
      src/libs/utils.ts
  5. 1
      src/types/container.d.ts
  6. 13
      src/views/container/index.vue
  7. 58
      src/views/container/liquidItem.vue
  8. 40
      src/views/debug/index.vue
  9. 14
      src/views/home/index.vue

19
src/components/check/index.vue

@ -42,6 +42,11 @@ const statusMap: Record<string, Record<string, string>> = {
value: '',
type: 'door',
},
shakeOrigin: {
name: '摇匀电机',
value: '',
type: 'shake',
},
gantryXOrigin: {
name: '机械臂x轴',
value: 'x',
@ -154,6 +159,9 @@ const resetOrign = (item: SelfStatus) => {
if (item.type === 'door') {
door_origin()
}
if (item.type === 'shake') {
shake_origin()
}
else if (item.value === 'x' || item.value === 'y' || item.value === 'z') {
gantry_origin(item.value)
}
@ -168,6 +176,17 @@ const resetOrign = (item: SelfStatus) => {
}
}
const shake_origin = async () => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: `shake_origin`,
params: {},
}
await homeStore.sendControl(params)
}
const door_origin = async () => {
currentCommandId = Date.now().toString()

194
src/components/container/Item/index.vue

@ -0,0 +1,194 @@
<script setup lang="ts">
import { getSolsList } from 'apis/solution'
import { useSolutionStore } from 'stores/useSolutionStore'
import { computed, onMounted, ref, watch } from 'vue'
const props = defineProps({
container: {
type: Object,
default: () => ({}),
},
})
console.log(props.container)
onMounted(() => {
querySolutionList()
})
const solutionList = ref<Solution.SolutionItem[]>([])
const solutionStore = useSolutionStore()
const querySolutionList = async () => {
const res = await getSolsList()
if (res && res.list) {
solutionList.value = res.list
solutionStore.updateSolution(res.list)
}
}
const form = ref(props.container)
const reloadKey = ref(1)
watch(() => form.value, () => {
reloadKey.value++
}, { deep: true })
watch(() => props, () => {
reloadKey.value++
}, { deep: true })
const svgText = computed(() => {
const percent = Math.round(((props.container.capacityTotal - props.container.capacityUsed) / props.container.capacityTotal) * 100)
return `<svg
:key="reloadKey"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="162.44374084472656"
height="227.99989318847656"
viewBox="0 0 162.44374084472656 227.99989318847656"
>
<defs>
<clipPath id="bottle-clip">
<path
d="M0,54.0618L0,64.2474C0,65.1128,0.699314,65.8144,1.56196,65.8144C2.4246,65.8144,3.12392,66.516,3.12392,67.3814L3.12392,73.6495C3.12392,74.5149,2.4246,75.2165,1.56196,75.2165C0.699314,75.2165,0,75.918,0,76.7835L0,90.8866C0,91.752,0.699314,92.4536,1.56196,92.4536C2.4246,92.4536,3.12392,93.1551,3.12392,94.0206L3.12392,100.289C3.12392,101.154,2.4246,101.856,1.56196,101.856C0.699314,101.856,0,102.557,0,103.423L0,122.227C0,123.092,0.699314,123.794,1.56196,123.794C2.4246,123.794,3.12392,124.495,3.12392,125.361L3.12392,131.629C3.12392,132.494,2.4246,133.196,1.56196,133.196C0.699314,133.196,0,133.897,0,134.763L0,153.567C0,154.432,0.699314,155.134,1.56196,155.134C2.4246,155.134,3.12392,155.836,3.12392,156.701L3.12392,162.969C3.12392,163.834,2.4246,164.536,1.56196,164.536C0.699314,164.536,0,165.238,0,166.103L0,183.34C0,184.206,0.699314,184.907,1.56196,184.907C2.4246,184.907,3.12392,185.609,3.12392,186.474L3.12392,193.526C3.12392,194.391,2.4246,195.093,1.56196,195.093C0.699314,195.093,0,195.794,0,196.66L0,206.062C0,218.178,9.79038,228,21.8674,228L140.576,228C152.653,228,162.444,218.178,162.444,206.062L162.444,196.66C162.444,195.794,161.744,195.093,160.882,195.093C160.019,195.093,159.32,194.391,159.32,193.526L159.32,186.474C159.32,185.609,160.019,184.907,160.882,184.907C161.744,184.907,162.444,184.206,162.444,183.34L162.444,166.103C162.444,165.238,161.744,164.536,160.882,164.536C160.019,164.536,159.32,163.834,159.32,162.969L159.32,156.701C159.32,155.836,160.019,155.134,160.882,155.134C161.744,155.134,162.444,154.432,162.444,153.567L162.444,134.763C162.444,133.897,161.744,133.196,160.882,133.196C160.019,133.196,159.32,132.494,159.32,131.629L159.32,125.361C159.32,124.495,160.019,123.794,160.882,123.794C161.744,123.794,162.444,123.092,162.444,122.227L162.444,103.423C162.444,102.557,161.744,101.856,160.882,101.856C160.019,101.856,159.32,101.154,159.32,100.289L159.32,94.0206C159.32,93.1551,160.019,92.4536,160.882,92.4536C161.744,92.4536,162.444,91.752,162.444,90.8866L162.444,76.7835C162.444,75.918,161.744,75.2165,160.882,75.2165C160.019,75.2165,159.32,74.5149,159.32,73.6495L159.32,67.3814C159.32,66.516,160.019,65.8144,160.882,65.8144C161.744,65.8144,162.444,65.1128,162.444,64.2474L162.444,54.0618C162.444,41.9457,152.653,32.1237,140.576,32.1237L134.962,32.1237C132.711,32.1237,131.583,29.3931,133.175,27.7961C137.914,23.042,140.576,16.594,140.576,9.87062L140.576,4.70103C140.576,2.10472,138.478,0,135.89,0L26.5533,0C23.9654,0,21.8674,2.10472,21.8674,4.70103L21.8674,9.87062C21.8674,16.594,24.5297,23.042,29.2685,27.7961C30.8603,29.3931,29.7329,32.1237,27.4817,32.1237L21.8674,32.1237C9.79038,32.1237,0,41.9457,0,54.0618Z"
fill="#EEEFF8"
fill-opacity="1"
/>
<use xlink:href="#bottle" />
</clipPath>
<!-- 定义渐变背景垂直方向从上到下填充 -->
<linearGradient id="fill-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="${percent}%" stop-color="#EEEFF8" />
<stop offset="${percent}%" stop-color="red" />
<stop offset="100%" stop-color="red" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#fill-gradient)" clip-path="url(#bottle-clip)" />
</svg>`
})
</script>
<template>
<div class="box">
<el-select v-model="form.solutionId">
<el-option v-for="item in solutionList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<div v-html="svgText" />
<!-- <svg -->
<!-- :key="reloadKey" -->
<!-- xmlns="http://www.w3.org/2000/svg" -->
<!-- xmlns:xlink="http://www.w3.org/1999/xlink" -->
<!-- fill="none" -->
<!-- version="1.1" -->
<!-- width="162.44374084472656" -->
<!-- height="227.99989318847656" -->
<!-- viewBox="0 0 162.44374084472656 227.99989318847656" -->
<!-- > -->
<!-- <defs> -->
<!-- <clipPath id="bottle-clip"> -->
<!-- <path -->
<!-- d="M0,54.0618L0,64.2474C0,65.1128,0.699314,65.8144,1.56196,65.8144C2.4246,65.8144,3.12392,66.516,3.12392,67.3814L3.12392,73.6495C3.12392,74.5149,2.4246,75.2165,1.56196,75.2165C0.699314,75.2165,0,75.918,0,76.7835L0,90.8866C0,91.752,0.699314,92.4536,1.56196,92.4536C2.4246,92.4536,3.12392,93.1551,3.12392,94.0206L3.12392,100.289C3.12392,101.154,2.4246,101.856,1.56196,101.856C0.699314,101.856,0,102.557,0,103.423L0,122.227C0,123.092,0.699314,123.794,1.56196,123.794C2.4246,123.794,3.12392,124.495,3.12392,125.361L3.12392,131.629C3.12392,132.494,2.4246,133.196,1.56196,133.196C0.699314,133.196,0,133.897,0,134.763L0,153.567C0,154.432,0.699314,155.134,1.56196,155.134C2.4246,155.134,3.12392,155.836,3.12392,156.701L3.12392,162.969C3.12392,163.834,2.4246,164.536,1.56196,164.536C0.699314,164.536,0,165.238,0,166.103L0,183.34C0,184.206,0.699314,184.907,1.56196,184.907C2.4246,184.907,3.12392,185.609,3.12392,186.474L3.12392,193.526C3.12392,194.391,2.4246,195.093,1.56196,195.093C0.699314,195.093,0,195.794,0,196.66L0,206.062C0,218.178,9.79038,228,21.8674,228L140.576,228C152.653,228,162.444,218.178,162.444,206.062L162.444,196.66C162.444,195.794,161.744,195.093,160.882,195.093C160.019,195.093,159.32,194.391,159.32,193.526L159.32,186.474C159.32,185.609,160.019,184.907,160.882,184.907C161.744,184.907,162.444,184.206,162.444,183.34L162.444,166.103C162.444,165.238,161.744,164.536,160.882,164.536C160.019,164.536,159.32,163.834,159.32,162.969L159.32,156.701C159.32,155.836,160.019,155.134,160.882,155.134C161.744,155.134,162.444,154.432,162.444,153.567L162.444,134.763C162.444,133.897,161.744,133.196,160.882,133.196C160.019,133.196,159.32,132.494,159.32,131.629L159.32,125.361C159.32,124.495,160.019,123.794,160.882,123.794C161.744,123.794,162.444,123.092,162.444,122.227L162.444,103.423C162.444,102.557,161.744,101.856,160.882,101.856C160.019,101.856,159.32,101.154,159.32,100.289L159.32,94.0206C159.32,93.1551,160.019,92.4536,160.882,92.4536C161.744,92.4536,162.444,91.752,162.444,90.8866L162.444,76.7835C162.444,75.918,161.744,75.2165,160.882,75.2165C160.019,75.2165,159.32,74.5149,159.32,73.6495L159.32,67.3814C159.32,66.516,160.019,65.8144,160.882,65.8144C161.744,65.8144,162.444,65.1128,162.444,64.2474L162.444,54.0618C162.444,41.9457,152.653,32.1237,140.576,32.1237L134.962,32.1237C132.711,32.1237,131.583,29.3931,133.175,27.7961C137.914,23.042,140.576,16.594,140.576,9.87062L140.576,4.70103C140.576,2.10472,138.478,0,135.89,0L26.5533,0C23.9654,0,21.8674,2.10472,21.8674,4.70103L21.8674,9.87062C21.8674,16.594,24.5297,23.042,29.2685,27.7961C30.8603,29.3931,29.7329,32.1237,27.4817,32.1237L21.8674,32.1237C9.79038,32.1237,0,41.9457,0,54.0618Z" -->
<!-- fill="#EEEFF8" -->
<!-- fill-opacity="1" -->
<!-- /> -->
<!-- <use xlink:href="#bottle" /> -->
<!-- </clipPath> -->
<!-- &lt;!&ndash; 定义渐变背景垂直方向从上到下填充 &ndash;&gt; -->
<!-- <linearGradient id="fill-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> -->
<!-- <stop :offset="`${Math.round(((container.capacityTotal - container.capacityUsed) / container.capacityTotal) * 100)}%`" stop-color="#EEEFF8" /> &lt;!&ndash; 透明区域 &ndash;&gt; -->
<!-- <stop :offset="`${Math.round(((container.capacityTotal - container.capacityUsed) / container.capacityTotal) * 100)}%`" stop-color="red" /> &lt;!&ndash; 填充截止百分比 50% &ndash;&gt; -->
<!-- <stop offset="100%" stop-color="red" /> -->
<!-- </linearGradient> -->
<!-- </defs> -->
<!-- <rect width="100%" height="100%" fill="url(#fill-gradient)" clip-path="url(#bottle-clip)" /> -->
<!-- </svg> -->
<!-- 绘制瓶子轮廓保留原有填充色可自定义描边 -->
<!-- <div class="container-bg"> -->
<!-- <div class="inner-div"> -->
<!-- <div -->
<!-- class="fill-div" -->
<!-- :style="`height: ${((container.capacityTotal - container.capacityUsed) / container.capacityTotal) * 100}%; background: ${container.capacityTotal - container.capacityUsed < 100 ? '#EE8223' : '#26D574'}`" -->
<!-- /> -->
<!-- <span -->
<!-- class="percentage-text" -->
<!-- > -->
<!-- {{ `${Math.round(((container.capacityTotal - container.capacityUsed) / container.capacityTotal) * 100)}%` }} -->
<!-- </span> -->
<!-- </div> -->
<!-- </div> -->
<div>
<div class="footer-edit">
<span>预充</span>
<el-input v-model="form.capacityUsed" size="small" @blur="onInputBlur">
<template #append>
ml
</template>
</el-input>
</div>
<div class="footer-edit">
<span>剩余</span>
<el-input v-model="form.capacityUsed" size="small" @blur="onInputBlur">
<template #append>
ml
</template>
</el-input>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.footer-edit {
display: flex;
justify-content: space-around;
padding: 10px 0;
.el-input {
margin-left: 10px;
width: 120px;
}
}
.box {
width: 200px;
height: 300px;
border: 1px solid #ccc;
border-radius: 10px;
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.container-bg {
background-image: url('../../../assets/images/liquied/liquied_bottle.svg');
background-size: cover;
position: relative;
width: 100px;
height: 140px;
}
.inner-div {
position: absolute;
top: 8px;
bottom: 0;
width: 100%;
border-radius: 4px;
overflow: hidden;
}
.fill-div {
position: absolute;
left: 0;
width: 100%;
bottom: 0;
background-color: #26D574;
}
.percentage-text {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 12px;
font-weight: 500;
color: #000;
}
</style>

73
src/components/home/FillSolution/index.vue

@ -0,0 +1,73 @@
<script setup lang="ts">
import { getContainerList } from 'apis/container'
import { useHomeStore } from 'stores/homeStore'
import { onMounted, ref } from 'vue'
const emits = defineEmits(['ok', 'cancel'])
const homeStore = useHomeStore()
let currentCommandId = ''
onMounted(() => {
queryContainerList()
})
const containerList = ref<Container.ContainerItem[]>([])
const queryContainerList = async () => {
containerList.value = await getContainerList()
}
const form = ref({
list: [],
})
const formRef = ref()
const rules = {
list: [
{ required: true, message: '请选择容器', trigger: 'change' },
],
}
const okHandle = async () => {
try {
const valid = await formRef.value.validate()
if (!valid) {
return
}
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'filled_solution',
params: {
...form.value,
},
}
await homeStore.sendControl(params)
emits('ok')
}
catch (error) {
console.log(error)
}
}
const cancel = () => {
emits('cancel')
}
</script>
<template>
<FtDialog visible title="预充管路" width="40%" :ok-handle="okHandle" @cancel="cancel">
<el-form ref="formRef" label-width="auto" :model="form" :rules="rules">
<el-form-item label="容器" prop="list">
<el-select v-model="form.list" placeholder="请选择容器" multiple>
<el-option v-for="item in containerList.filter(item => item.type === 0)" :key="item.id" :label="item.solutionName" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
</FtDialog>
</template>
<style scoped lang="scss">
.el-tag {
margin-right: 5px;
}
</style>

1
src/libs/utils.ts

@ -52,6 +52,7 @@ export const cmdNameMap = {
tray_lifting_origin: '加热区托盘电机回原点',
door_origin: '门电机回原点',
filled_solution: '预充管路',
shake_origin: '摇匀电机回原点',
}
export const generateColors = (count: number): string[] => {

1
src/types/container.d.ts

@ -8,6 +8,7 @@ declare namespace Container {
pumpId: string
capacityTotal: string | number
capacityUsed: string | number
filled: string | number
solutionName?: string
}
}

13
src/views/container/index.vue

@ -50,7 +50,7 @@ const queryContainerList = () => {
<div class="liquied-container">
<liquidItem
v-for="(item, index) in chemicalList"
:key="index"
:key="item.id"
:item-index="index"
:solution-item="item"
@ok="queryContainerList"
@ -60,12 +60,11 @@ const queryContainerList = () => {
<style>
.liquied-container {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-columns: repeat(4, 1fr); /* 创建3列等宽轨道 */
grid-template-rows: repeat(2, auto); /* 创建2行自动高度 */
gap: 10px;
justify-content: center; /* 水平居中 */
align-items: center;
}
</style>

58
src/views/container/liquidItem.vue

@ -1,7 +1,7 @@
<script lang="ts" setup>
import { updateContainer } from '@/apis/container'
import { useSolutionStore } from '@/stores/useSolutionStore'
import { Edit, Plus } from '@element-plus/icons-vue'
import { Plus } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
import { computed, ref } from 'vue'
import { useRouter } from 'vue-router'
@ -32,8 +32,7 @@ const solutionProcess = computed(() => {
const percent = 100 - (difference * 100)
return percent
})
const onInputBlur = (e: { target: { value: string } }) => {
solutionInfo.value.capacityUsed = e.target.value
const onInputBlur = () => {
saveContainer()
}
@ -43,7 +42,11 @@ const onSelectSolution = () => {
const saveContainer = () => {
if (!solutionInfo.value.capacityUsed) {
ElMessage.warning('请输入酸液体积')
ElMessage.warning('请输入当前容量')
return
}
if (!solutionInfo.value.filled) {
ElMessage.warning('请输入预充量')
return
}
if (!solutionInfo.value.solutionId) {
@ -57,6 +60,7 @@ const saveContainer = () => {
pumpId: solutionInfo.value.pumpId,
capacityTotal: solutionInfo.value.capacityTotal,
capacityUsed: solutionInfo.value.capacityUsed,
filled: solutionInfo.value.filled,
}
updateContainer(params).then(() => {
ElMessage.success('保存成功')
@ -101,8 +105,6 @@ const onSubmitSolution = () => {
</div>
</div>
</div>
<div style="height:9.5rem">
<div class="liquied-main">
<div class="content">
<div class="bottle_base">
<img class="content-img" src="@/assets/images/liquied/liquied_bottle.svg" alt="chemical-bottle">
@ -111,14 +113,25 @@ const onSubmitSolution = () => {
<img class="content-img" src="@/assets/images/liquied/liquied_bottle.svg" alt="chemical-bottle">
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footer-content">
<span>{{ solutionInfo.capacityTotal }}ml</span>
</div>
<div class="footer-edit">
<el-input v-model="solutionInfo.capacityUsed" style="width: 100px;" size="small" :prefix-icon="Edit" @blur="onInputBlur" />ml
<span>预充</span>
<el-input v-model.number="solutionInfo.filled" type="number" size="small" @blur="onInputBlur">
<template #append>
ml
</template>
</el-input>
</div>
<div class="footer-edit">
<span>剩余</span>
<el-input v-model.number="solutionInfo.capacityUsed" type="number" size="small" @blur="onInputBlur">
<template #append>
ml
</template>
</el-input>
</div>
</div>
<FtDialog v-model="visible" title="选择酸液" :ok-handle="onSubmitSolution" @cancel="onClose">
@ -141,11 +154,14 @@ const onSubmitSolution = () => {
<style scoped>
.liquied-item {
border: 1px solid #ccc;
border-radius: 5px;
margin: 10px;
width: 17vw;
border-radius: 10px;
width: 200px;
height: 300px;
text-align: center;
border-radius: 1rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.liquied-main {
position: relative;
@ -157,7 +173,7 @@ const onSubmitSolution = () => {
justify-content: center;
}
.bottle_base{
position: absolute;
position: relative;
}
.bottle {
filter:hue-rotate(217deg) saturate(36);
@ -183,12 +199,10 @@ const onSubmitSolution = () => {
height:2.5rem;
}
.content-img{
height: 23vh;
width: 15vw;
height: 100px;
margin: 10px;
}
.footer {
margin-top: 3rem;
line-height: 20px;
}
.footer-content{
display: flex;
@ -196,8 +210,12 @@ const onSubmitSolution = () => {
}
.footer-edit {
display: flex;
justify-content: center;
padding-left: 10px;
justify-content: space-around;
padding: 10px 0;
.el-input {
margin-left: 10px;
width: 120px;
}
}
.checked {
text-decoration: line-through;

40
src/views/debug/index.vue

@ -62,6 +62,18 @@ const debug_pallet_elevator_stop = async () => {
await debugStore.sendControl(params)
}
const debug_cap_lifting_origin = async () => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'debug_cap_lifting_origin',
params: {
index: debugStore.formData.heatArea.index,
},
}
await debugStore.sendControl(params)
}
const debug_heater_start = async () => {
currentCommandId = Date.now().toString()
const params = {
@ -334,6 +346,16 @@ const debug_shaker_stop = async () => {
await debugStore.sendControl(params)
}
const debug_shaker_reset = async () => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'debug_shaker_reset',
params: {},
}
await debugStore.sendControl(params)
}
const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => {
console.log(debugStore.formData.transferModule[`${motor}MotorData`])
currentCommandId = Date.now().toString()
@ -652,7 +674,7 @@ const debug_door_stop = async () => {
</el-form>
<ft-button type="primary" :click-handle="debug_liquid_arm_reset">
复位
回原点
</ft-button>
<ft-button type="primary" :click-handle="debug_liquid_arm_rotation">
开始
@ -729,6 +751,9 @@ const debug_door_stop = async () => {
<ft-button :click-handle="debug_shaker_stop">
停止
</ft-button>
<ft-button :click-handle="debug_shaker_reset">
回原点
</ft-button>
</div>
</el-card>
<el-card>
@ -827,16 +852,21 @@ const debug_door_stop = async () => {
</template>
</el-input>
</el-form-item>
</el-form>
<ft-button type="primary" :click-handle="debug_pallet_elevator_lift_up">
<el-form-item>
<ft-button size="small" type="primary" :click-handle="debug_pallet_elevator_lift_up">
上升
</ft-button>
<ft-button type="primary" :click-handle="debug_pallet_elevator_lift_down">
<ft-button size="small" type="primary" :click-handle="debug_pallet_elevator_lift_down">
下降
</ft-button>
<ft-button :click-handle="debug_pallet_elevator_stop">
<ft-button size="small" :click-handle="debug_pallet_elevator_stop">
停止
</ft-button>
<ft-button size="small" type="primary" :click-handle="debug_cap_lifting_origin">
回原点
</ft-button>
</el-form-item>
</el-form>
</div>
<el-divider>加热棒</el-divider>
<div class="card-box">

14
src/views/home/index.vue

@ -1,5 +1,6 @@
<script setup lang="ts">
import AddLiquid from 'components/home/AddLiquid/index.vue'
import FillSolution from 'components/home/FillSolution/index.vue'
import SetTemperature from 'components/home/SetTemperature/index.vue'
import StartExperiment from 'components/home/StartExperiment/index.vue'
import Tube from 'components/home/Tube/index.vue'
@ -67,22 +68,16 @@ const setTemperature = (id: string) => {
setTemperatureVisible.value = true
}
const addLiquidVisible = ref(false)
const fillSolutionVisible = ref(false)
const filled_solution = async () => {
if (!systemStore.systemStatus.solutionModule.idle) {
FtMessage.warning('加液区正在工作,请稍后操作')
return
}
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'filled_solution',
params: { },
}
await homeStore.sendControl(params)
fillSolutionVisible.value = true
}
const addLiquidVisible = ref(false)
const addLiquid = async () => {
if (!systemStore.systemStatus.solutionModule.idle) {
FtMessage.warning('加液区正在工作,请稍后操作')
@ -471,6 +466,7 @@ const take_photo = async () => {
<!-- <SelectCraft v-if="selectCraftVisible" @ok="selectCraftVisible = false" @cancel="selectCraftVisible = false" /> -->
<SetTemperature v-if="setTemperatureVisible" :id="currentTemperatureId" @ok="setTemperatureVisible = false" @cancel="setTemperatureVisible = false" />
<AddLiquid v-if="addLiquidVisible" @ok="addLiquidVisible = false" @cancel="addLiquidVisible = false" />
<FillSolution v-if="fillSolutionVisible" @ok="fillSolutionVisible = false" @cancel="fillSolutionVisible = false" />
</div>
</template>

Loading…
Cancel
Save