From 0d5c8d8d10c049c84ef8c0168fe21415eb642de0 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 20 Jun 2025 20:08:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A7=E5=B0=8F=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/craft/AddCraft/index.vue | 8 ++++---- src/components/home/ExtractLiquid/index.vue | 2 +- src/components/home/SetTemperature/index.vue | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/craft/AddCraft/index.vue b/src/components/craft/AddCraft/index.vue index 64a34a4..df755c9 100644 --- a/src/components/craft/AddCraft/index.vue +++ b/src/components/craft/AddCraft/index.vue @@ -75,18 +75,18 @@ const okHandle = async () => { else { step.params.time = undefined } - if (step.params.temperature > heatMax.value && step.method === 'anneal') { + if (+step.params.temperature > +annealMax.value && step.method === 'anneal') { errorMsg.push(`步骤${index + 1}: 退火温度不能超过${annealMax.value}℃`) } - if (step.params.temperature > 200 && step.method === 'heat') { + if (+step.params.temperature > +heatMax.value && step.method === 'heat') { errorMsg.push(`步骤${index + 1}: 加热温度不能超过${heatMax.value}℃`) } - if (step.params.temperature > 200 && step.method === 'dry') { + if (+step.params.temperature > +dryMax.value && step.method === 'dry') { errorMsg.push(`步骤${index + 1}: 烘干温度不能超过${dryMax.value}℃`) } } if (['clean', 'reduceLiquid'].includes(step.method)) { - if (step.params.height > heightMax.value) { + if (+step.params.height > +heightMax.value) { errorMsg.push(`步骤${index + 1}: 针头高度不能超过${heightMax.value}mm`) } } diff --git a/src/components/home/ExtractLiquid/index.vue b/src/components/home/ExtractLiquid/index.vue index 40880a9..c5781f1 100644 --- a/src/components/home/ExtractLiquid/index.vue +++ b/src/components/home/ExtractLiquid/index.vue @@ -54,7 +54,7 @@ const validateHandle1 = (rule: any, value: any, callback: any) => { callback(new Error('请输入高度')) } else - if (value && (value < 0 || value > heightMax.value)) { + if (value && (value < 0 || +value > +heightMax.value)) { callback(new Error(`针头高度范围0-${heightMax.value}mm`)) } else { diff --git a/src/components/home/SetTemperature/index.vue b/src/components/home/SetTemperature/index.vue index 5bb0ee0..38e7723 100644 --- a/src/components/home/SetTemperature/index.vue +++ b/src/components/home/SetTemperature/index.vue @@ -35,7 +35,7 @@ const form = ref({ const formRef = ref() const validateHandle1 = (rule: any, value: any, callback: any) => { - if (value && (value < 0 || value > heatMax.value)) { + if (value && (value < 0 || +value > +heatMax.value)) { callback(new Error(`加热温度设置范围0℃-${heatMax.value}℃`)) } else { @@ -43,7 +43,7 @@ const validateHandle1 = (rule: any, value: any, callback: any) => { } } const validateHandle2 = (rule: any, value: any, callback: any) => { - if (value && (value < 0 || value > dryMax.value)) { + if (value && (value < 0 || +value > +dryMax.value)) { callback(new Error(`烘干温度设置范围0℃-${dryMax.value}℃`)) } else { @@ -51,7 +51,7 @@ const validateHandle2 = (rule: any, value: any, callback: any) => { } } const validateHandle3 = (rule: any, value: any, callback: any) => { - if (value && (value < 0 || value > annealMax.value)) { + if (value && (value < 0 || +value > +annealMax.value)) { callback(new Error(`退火温度设置范围0℃-${annealMax.value}℃`)) } else {