Browse Source

fix:工艺加液步骤

master
guoapeng 2 months ago
parent
commit
e752de53c2
  1. 10
      src/components/craft/AddCraft/index.vue
  2. 4
      src/components/home/Tube/index.vue

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

@ -81,7 +81,9 @@ 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.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(';')
}`).join(';')
break break
case 'startHeating': case 'startHeating':
step.params.description = `加热: ${step.params.temperature}度, 保持${step.params.minutes || 0}${step.params.seconds || 0}` step.params.description = `加热: ${step.params.temperature}度, 保持${step.params.minutes || 0}${step.params.seconds || 0}`
@ -186,13 +188,13 @@ const addHandle = async () => {
// addList.value!.push(addLiquidForm) // addList.value!.push(addLiquidForm)
const index = form.value.stepList?.findIndex(item => item.method === 'addLiquid') const index = form.value.stepList?.findIndex(item => item.method === 'addLiquid')
if (index !== -1) { if (index !== -1) {
form.value.stepList?.[index || 0].params?.push(cloneDeep(addLiquidForm.value))
form.value.stepList?.[index || 0].params?.list?.push(cloneDeep(addLiquidForm.value))
} }
else { else {
form.value.stepList?.push({ form.value.stepList?.push({
name: '加液', name: '加液',
method: 'addLiquid', method: 'addLiquid',
params: [cloneDeep(addLiquidForm.value)],
params: { list: [cloneDeep(addLiquidForm.value)] },
} as CraftTypes.StepItem) } as CraftTypes.StepItem)
} }
addLiquidForm.value = { addLiquidForm.value = {
@ -330,7 +332,7 @@ const addHandle = async () => {
<div v-for="(item, index) in form.stepList" :key="index" class="step-item"> <div v-for="(item, index) in form.stepList" :key="index" class="step-item">
<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" :key="liquidIndex">
<div v-for="(liquid, liquidIndex) in item.params?.list || []" :key="liquidIndex">
<span>试管: {{ liquid.tubeNums.length === 16 ? '全部' : liquid.tubeNums.join(',') }} </span> <span>试管: {{ liquid.tubeNums.length === 16 ? '全部' : liquid.tubeNums.join(',') }} </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>

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

@ -145,7 +145,7 @@ defineExpose({
<ft-button v-if="craft?.state === 'PAUSED'" type="primary" size="small" :click-handle="resumeCraftHandle"> <ft-button v-if="craft?.state === 'PAUSED'" type="primary" size="small" :click-handle="resumeCraftHandle">
继续 继续
</ft-button> </ft-button>
<ft-button v-if="!['RUNNING', 'PAUSED'].includes(craft?.state)" size="small" :click-handle="stopCraftHandle">
<ft-button v-if="['RUNNING', 'PAUSED'].includes(craft?.state)" size="small" :click-handle="stopCraftHandle">
停止 停止
</ft-button> </ft-button>
<span v-if="craft?.state === 'FINISHED'">请取走托盘</span> <span v-if="craft?.state === 'FINISHED'">请取走托盘</span>
@ -299,7 +299,7 @@ defineExpose({
margin-top: auto; margin-top: auto;
margin-bottom: 10px; margin-bottom: 10px;
display: flex; display: flex;
justify-content: center;
justify-content: space-around;
.ft-button { .ft-button {
margin-right: 5px; margin-right: 5px;
} }

Loading…
Cancel
Save