|
|
@ -42,7 +42,7 @@ const form = ref({ |
|
|
|
const formRef = ref() |
|
|
|
|
|
|
|
const rules = { |
|
|
|
name: [{ required: true, trigger: 'blur', message: '请输入预设名称' }], |
|
|
|
name: [{ required: true, trigger: 'blur', message: '请输入工艺名称' }], |
|
|
|
} |
|
|
|
|
|
|
|
const okHandle = async () => { |
|
|
@ -113,16 +113,21 @@ const cancel = () => { |
|
|
|
const stepMap = { |
|
|
|
preHeat: { name: '预热', method: 'preHeat', params: { temperature: undefined, description: undefined } }, |
|
|
|
addLiquid: { |
|
|
|
name: '加液', |
|
|
|
name: '加稀硝酸', |
|
|
|
method: 'addLiquid', |
|
|
|
params: { volume: undefined, containerId: undefined, description: undefined }, |
|
|
|
params: { volume: undefined, containerId: 1, description: undefined }, |
|
|
|
}, |
|
|
|
addLiquid1: { |
|
|
|
name: '加浓硝酸', |
|
|
|
method: 'addLiquid', |
|
|
|
params: { volume: undefined, containerId: 2, description: undefined }, |
|
|
|
}, |
|
|
|
heat: { |
|
|
|
name: '加热', |
|
|
|
method: 'heat', |
|
|
|
params: { temperature: undefined, time: undefined, description: undefined, minutes: undefined, seconds: undefined }, |
|
|
|
}, |
|
|
|
reduceLiquid: { name: '抽液', method: 'reduceLiquid', params: { height: undefined, description: undefined } }, |
|
|
|
// reduceLiquid: { name: '抽液', method: 'reduceLiquid', params: { height: undefined, description: undefined } }, |
|
|
|
clean: { |
|
|
|
name: '清洗', |
|
|
|
method: 'clean', |
|
|
@ -152,12 +157,12 @@ const addStep = (data: any) => { |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
|
<FtDialog visible :title="form.id ? '编辑预设' : '新增预设'" width="80%" :ok-handle="okHandle" @cancel="cancel"> |
|
|
|
<FtDialog visible :title="form.id ? '编辑工艺' : '新增工艺'" width="80%" :ok-handle="okHandle" @cancel="cancel"> |
|
|
|
<el-form ref="formRef" label-width="auto" :model="form" :rules="rules" class="form-box"> |
|
|
|
<el-row :gutter="30"> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="预设名称" prop="name"> |
|
|
|
<el-input v-model="form.name" placeholder="请输入预设名称" /> |
|
|
|
<el-form-item label="工艺名称" prop="name"> |
|
|
|
<el-input v-model="form.name" placeholder="请输入工艺名称" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="步骤列表"> |
|
|
|
<div class="button-content"> |
|
|
@ -198,14 +203,14 @@ const addStep = (data: any) => { |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
<template v-else-if="item.method === 'addLiquid'"> |
|
|
|
<el-select v-model="item.params.containerId" size="small" placeholder="请选择溶液"> |
|
|
|
<el-option |
|
|
|
v-for="c in containerList" |
|
|
|
:key="c.id" |
|
|
|
:label="solutionList.find(s => s.id === c.solutionId)?.name" |
|
|
|
:value="c.id" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<!-- <el-select v-model="item.params.containerId" size="small" disabled placeholder="请选择溶液"> --> |
|
|
|
<!-- <el-option --> |
|
|
|
<!-- v-for="c in containerList" --> |
|
|
|
<!-- :key="c.id" --> |
|
|
|
<!-- :label="solutionList.find(s => s.id === c.solutionId)?.name" --> |
|
|
|
<!-- :value="c.id" --> |
|
|
|
<!-- /> --> |
|
|
|
<!-- </el-select> --> |
|
|
|
<el-input v-model.number="item.params.volume" type="number" size="small" placeholder="请输入容量"> |
|
|
|
<template #append> |
|
|
|
ml |
|
|
|