|
|
@ -81,7 +81,9 @@ const okHandle = async () => { |
|
|
|
step.params.description = `${index + 1}.` |
|
|
|
switch (step.method) { |
|
|
|
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 |
|
|
|
case 'startHeating': |
|
|
|
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) |
|
|
|
const index = form.value.stepList?.findIndex(item => item.method === 'addLiquid') |
|
|
|
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 { |
|
|
|
form.value.stepList?.push({ |
|
|
|
name: '加液', |
|
|
|
method: 'addLiquid', |
|
|
|
params: [cloneDeep(addLiquidForm.value)], |
|
|
|
params: { list: [cloneDeep(addLiquidForm.value)] }, |
|
|
|
} as CraftTypes.StepItem) |
|
|
|
} |
|
|
|
addLiquidForm.value = { |
|
|
@ -330,7 +332,7 @@ const addHandle = async () => { |
|
|
|
<div v-for="(item, index) in form.stepList" :key="index" class="step-item"> |
|
|
|
<el-form-item :label="`${index + 1}: ${item.name}`"> |
|
|
|
<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> |
|
|
|
<div v-for="(s, sIndex) in liquid.solutionList" :key="sIndex"> |
|
|
|
<span>添加</span> |
|
|
|