Browse Source

fix:工艺加液步骤2

master
guoapeng 2 months ago
parent
commit
6f359b88c6
  1. 4
      src/components/container/Item/index.vue
  2. 50
      src/components/craft/AddCraft/index.vue
  3. 8
      src/components/craft/TransferRight.vue
  4. 4
      src/components/home/AddLiquid/index.vue
  5. 2
      src/views/debug/index.vue
  6. 2
      src/views/pointDebug/index.vue

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

@ -114,13 +114,13 @@ const onSubmitSolution = () => {
</div> </div>
<div class="footer"> <div class="footer">
<div class="footer-content"> <div class="footer-content">
<span>{{ solutionInfo.capacityTotal }}ml</span>
<span>{{ solutionInfo.capacityTotal }}mL</span>
</div> </div>
<div class="footer-edit"> <div class="footer-edit">
<span>已用</span> <span>已用</span>
<el-input v-model.number="solutionInfo.capacityUsed" type="number" max="5000" size="small" @blur="onInputBlur"> <el-input v-model.number="solutionInfo.capacityUsed" type="number" max="5000" size="small" @blur="onInputBlur">
<template #append> <template #append>
ml
mL
</template> </template>
</el-input> </el-input>
</div> </div>

50
src/components/craft/AddCraft/index.vue

@ -81,8 +81,8 @@ const okHandle = async () => {
step.params.description = `${index + 1}.` step.params.description = `${index + 1}.`
switch (step.method) { switch (step.method) {
case 'addLiquid': case 'addLiquid':
step.params.description = step.params.list.map(item => `试管[${item.tubeNums.length === 16 ? '全部' : item.tubeNums.join(',')}]: ${
item.solutionList.map(s => `添加${solutionList.value.find(ss => ss.id === s.solutionId)?.name}- ${s.volume}ml-偏移量${s.offset}ml`).join(';')
step.params.description = step.params.list.map(item => `试管${item.tubeNum}: ${
item.solutionList.map(s => `添加${solutionList.value.find(ss => ss.id === s.solutionId)?.name}- ${s.volume}mL${s.offset ? `-偏移量${s.offset}mL` : ''}`).join(';')
}`).join(';') }`).join(';')
break break
case 'startHeating': case 'startHeating':
@ -185,18 +185,29 @@ const addHandle = async () => {
return return
} }
console.log(addLiquidForm.value) console.log(addLiquidForm.value)
// addList.value!.push(addLiquidForm)
const index = form.value.stepList?.findIndex(item => item.method === 'addLiquid')
if (index !== -1) {
form.value.stepList?.[index || 0].params?.list?.push(cloneDeep(addLiquidForm.value))
}
else {
if (form.value.stepList?.at(-1)?.method !== 'addLiquid') {
form.value.stepList?.push({ form.value.stepList?.push({
name: '加液', name: '加液',
method: 'addLiquid', method: 'addLiquid',
params: { list: [cloneDeep(addLiquidForm.value)] },
} as CraftTypes.StepItem)
params: {
list: [],
},
})
} }
addLiquidForm.value.tubeNums.forEach((tubeNum: any) => {
const index = form.value.stepList?.at(-1)?.params?.list?.findIndex(item => item.tubeNum === tubeNum)
if (index !== -1) {
form.value.stepList?.at(-1)?.params?.list?.[index].solutionList.push(...cloneDeep(addLiquidForm.value.solutionList))
}
else {
form.value.stepList?.at(-1)?.params?.list?.push({
tubeNum,
solutionList: [...cloneDeep(addLiquidForm.value.solutionList)],
})
}
})
console.log(form.value)
addLiquidForm.value = { addLiquidForm.value = {
tubeNums: [], tubeNums: [],
solutionList: [ solutionList: [
@ -207,6 +218,7 @@ const addHandle = async () => {
}, },
], ],
} }
activeTube.value = Array.from({ length: 16 }).fill(false) activeTube.value = Array.from({ length: 16 }).fill(false)
selectVisible.value = false selectVisible.value = false
addLiquidFormRef.value.resetFields() addLiquidFormRef.value.resetFields()
@ -282,7 +294,7 @@ const addHandle = async () => {
> >
<el-input v-model.number="s.volume" size="small" type="number" style="width: 100%" placeholder="容量"> <el-input v-model.number="s.volume" size="small" type="number" style="width: 100%" placeholder="容量">
<template #append> <template #append>
ml
mL
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -290,14 +302,14 @@ const addHandle = async () => {
<el-col :span="7"> <el-col :span="7">
<el-form-item <el-form-item
label="" :prop="`solutionList.${index}.offset`" :rules="{ label="" :prop="`solutionList.${index}.offset`" :rules="{
required: true,
required: false,
message: '请输入偏移量', message: '请输入偏移量',
trigger: 'blur', trigger: 'blur',
}" }"
> >
<el-input v-model.number="s.offset" size="small" type="number" style="width: 100%" placeholder="偏移量"> <el-input v-model.number="s.offset" size="small" type="number" style="width: 100%" placeholder="偏移量">
<template #append> <template #append>
ml
mL
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -333,15 +345,17 @@ const addHandle = async () => {
<el-form-item :label="`${index + 1}: ${item.name}`"> <el-form-item :label="`${index + 1}: ${item.name}`">
<div v-if="item.method === 'addLiquid'" class="list-box"> <div v-if="item.method === 'addLiquid'" class="list-box">
<div v-for="(liquid, liquidIndex) in item.params?.list || []" :key="liquidIndex"> <div v-for="(liquid, liquidIndex) in item.params?.list || []" :key="liquidIndex">
<span>试管: {{ liquid.tubeNums.length === 16 ? '全部' : liquid.tubeNums.join(',') }} </span>
<span>试管{{ liquid.tubeNum }} </span>
<div v-for="(s, sIndex) in liquid.solutionList" :key="sIndex"> <div v-for="(s, sIndex) in liquid.solutionList" :key="sIndex">
<span>添加</span> <span>添加</span>
<span>{{ solutionList.find(solution => solution.id === s.solutionId)?.name }}</span> <span>{{ solutionList.find(solution => solution.id === s.solutionId)?.name }}</span>
<span>{{ s.volume }}</span> <span>{{ s.volume }}</span>
<span>ml-</span>
<span>偏移量</span>
<span>{{ s.offset }}</span>
<span>ml</span>
<span>mL</span>
<span v-if="s.offset">
<span>-偏移量</span>
<span>{{ s.offset }}</span>
<span>mL</span>
</span>
</div> </div>
</div> </div>
</div> </div>

8
src/components/craft/TransferRight.vue

@ -79,7 +79,7 @@ const queryContainerList = () => {
</el-select> </el-select>
<div> <div>
<el-input v-model.number="liquidItem.volume" size="small" style="width: 100px" :disabled="type === 'showlog'" /> <el-input v-model.number="liquidItem.volume" size="small" style="width: 100px" :disabled="type === 'showlog'" />
<span class="ml-2">ml</span>
<span class="mL-2">mL</span>
</div> </div>
</div> </div>
</div> </div>
@ -88,17 +88,17 @@ const queryContainerList = () => {
<section v-if="stepInfo.method === 'shaking' || stepInfo.method === 'delay'" class="right-shaking"> <section v-if="stepInfo.method === 'shaking' || stepInfo.method === 'delay'" class="right-shaking">
<div class="flex items-center right-base"> <div class="flex items-center right-base">
<el-input v-model.number="stepInfo.params.second" style="width: 100px" size="small" class="right-base" :disabled="type === 'showlog'" /> <el-input v-model.number="stepInfo.params.second" style="width: 100px" size="small" class="right-base" :disabled="type === 'showlog'" />
<span class="ml-2"></span>
<span class="mL-2"></span>
</div> </div>
</section> </section>
<section v-if="stepInfo.method === 'startHeating'" class="right-shaking"> <section v-if="stepInfo.method === 'startHeating'" class="right-shaking">
<div class="flex items-center right-base"> <div class="flex items-center right-base">
加热温度<el-input v-model.number="stepInfo.params.temperature" style="width: 100px" size="small" :disabled="type === 'showlog'" /> 加热温度<el-input v-model.number="stepInfo.params.temperature" style="width: 100px" size="small" :disabled="type === 'showlog'" />
<span class="ml-2">°C</span>
<span class="mL-2">°C</span>
</div> </div>
<div class="flex items-center right-base"> <div class="flex items-center right-base">
加热时间<el-input v-model.number="stepInfo.params.second" style="width: 100px" size="small" :disabled="type === 'showlog'" /> 加热时间<el-input v-model.number="stepInfo.params.second" style="width: 100px" size="small" :disabled="type === 'showlog'" />
<span class="ml-2"></span>
<span class="mL-2"></span>
</div> </div>
</section> </section>
</template> </template>

4
src/components/home/AddLiquid/index.vue

@ -172,7 +172,7 @@ const delHandle = (index: number) => {
<el-form-item label="容量" prop="volume"> <el-form-item label="容量" prop="volume">
<el-input v-model="form.volume" placeholder="请输入容量"> <el-input v-model="form.volume" placeholder="请输入容量">
<template #append> <template #append>
ml
mL
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -196,7 +196,7 @@ const delHandle = (index: number) => {
<span>{{ <span>{{
solsList.find(sol => sol.id === containerList.find(container => container.id === item.solutionList[0].solutionId)?.solutionId)?.name solsList.find(sol => sol.id === containerList.find(container => container.id === item.solutionList[0].solutionId)?.solutionId)?.name
}}</span> }}</span>
<span>添加{{ item.solutionList[0].volume }}ml</span>
<span>添加{{ item.solutionList[0].volume }}mL</span>
</div> </div>
<el-icon @click="() => delHandle(key)"> <el-icon @click="() => delHandle(key)">
<Close /> <Close />

2
src/views/debug/index.vue

@ -933,7 +933,7 @@ const savePositionVisible = ref(false)
<el-form-item label="加液容量"> <el-form-item label="加液容量">
<el-input v-model.number="debugStore.formData.liquidPumpData.volume" type="number" placeholder="请输入速度"> <el-input v-model.number="debugStore.formData.liquidPumpData.volume" type="number" placeholder="请输入速度">
<template #append> <template #append>
ml
mL
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>

2
src/views/pointDebug/index.vue

@ -918,7 +918,7 @@ const savePositionVisible = ref(false)
<el-form-item label="加液容量"> <el-form-item label="加液容量">
<el-input v-model.number="debugStore.formData.liquidPumpData.volume" type="number" placeholder="请输入速度"> <el-input v-model.number="debugStore.formData.liquidPumpData.volume" type="number" placeholder="请输入速度">
<template #append> <template #append>
ml
mL
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>

Loading…
Cancel
Save