diff --git a/src/components/craft/AddCraft/index.vue b/src/components/craft/AddCraft/index.vue index bea6a43..1be228c 100644 --- a/src/components/craft/AddCraft/index.vue +++ b/src/components/craft/AddCraft/index.vue @@ -54,33 +54,34 @@ const okHandle = async () => { } // 找到第一个参数不完整的步骤 const invalidStepIndex = form.value.stepList.findIndex( - (step: any) => { + (step: any, index) => { if (['heat', 'dry', 'anneal'].includes(step.method)) { if (step.params.minutes || step.params.seconds) { step.params.time = (step.params.minutes || 0) * 60 + (step.params.seconds || 0) || undefined } } + step.params.description = `${index}.` switch (step.method) { case 'clean': - step.params.description = `针头高度${step.params.height}mm清洗${step.params.cycle}次` + step.params.description += `针头高度${step.params.height}mm, 加${step.params.volume}ml水清洗${step.params.cycle}次` break case 'addLiquid': - step.params.description = `添加${solutionList.value.find(s => s.id === containerList.value.find(c => c.id === step.params.containerId)?.solutionId)?.name}-${step.params.volume}ml` + step.params.description += `添加${solutionList.value.find(s => s.id === containerList.value.find(c => c.id === step.params.containerId)?.solutionId)?.name}-${step.params.volume}ml` break case 'reduceLiquid': - step.params.description = `针头高度${step.params.height}mm抽取液体` + step.params.description += `针头高度${step.params.height}mm抽取液体` break case 'preHeat': - step.params.description = `预热到${step.params.temperature}度` + step.params.description += `预热到${step.params.temperature}度` break case 'heat': - 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}秒` break case 'dry': - 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}秒` break case 'anneal': - 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}秒` break } return !allPropertiesDefined(step.params, ['minutes', 'seconds', 'description']) @@ -118,7 +119,7 @@ const stepMap = { addLiquid: { name: '加液', method: 'addLiquid', params: { volume: undefined, containerId: undefined, 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 } }, - clean: { name: '清洗', method: 'clean', params: { cycle: undefined, height: undefined, description: undefined } }, + clean: { name: '清洗', method: 'clean', params: { cycle: undefined, height: undefined, volume: 2, description: undefined } }, dry: { name: '烘干', method: 'dry', params: { temperature: undefined, time: undefined, description: undefined, minutes: undefined, seconds: undefined } }, anneal: { name: '退火', method: 'anneal', params: { temperature: undefined, feedTemperature: undefined, time: undefined, description: undefined, minutes: undefined, seconds: undefined } }, } @@ -152,14 +153,19 @@ const addStep = (data: any) => {
diff --git a/src/components/home/CheckCraft/index.vue b/src/components/home/CheckCraft/index.vue new file mode 100644 index 0000000..eb643f2 --- /dev/null +++ b/src/components/home/CheckCraft/index.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/src/layouts/default.vue b/src/layouts/default.vue index c3e4acf..4f6c492 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -1,8 +1,10 @@