From b4545662795fc4e939949d8227ca85608b5c8c8a Mon Sep 17 00:00:00 2001 From: sige Date: Thu, 23 May 2024 10:54:44 +0800 Subject: [PATCH] =?UTF-8?q?#95=20=E5=BD=93=E5=8A=A0=E6=B6=B2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA0=E6=97=B6=EF=BC=8C=E4=BB=8D=E7=84=B6?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8=E6=89=A7=E8=A1=8C=E5=8A=A0?= =?UTF-8?q?=E6=B6=B2=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LiquidHandle.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/LiquidHandle.vue b/src/components/LiquidHandle.vue index 21c992a..fdb3813 100644 --- a/src/components/LiquidHandle.vue +++ b/src/components/LiquidHandle.vue @@ -62,7 +62,7 @@ class="liquid_column" :style="{ '--height': `${ - ((disinfectantCapacity <= 0 ? 0 : disinfectantCapacity) / 5000) * + ((disinfectantCapacity <= 0 ? 0 : disinfectantCapacity) / 2500) * 472 }px`, }" @@ -198,8 +198,8 @@ onUnmounted(() => { const formatter = value => { - if (parseInt(value) > 5000) { - return '5000' + if (parseInt(value) > 2500) { + return '2500' } if (parseInt(value) <= 0) { return '0' @@ -211,6 +211,11 @@ const formatter = value => { } const startAdd = () => { + let value = parseInt(addLiquidVal.value); + if ( 0 === value || value > 2500 ) { + console.warn(`加液量不合法 : ${value}`); + return; + } if (!(operatorStore.replenishingFluidsWorkState == 1)) { webSocketStore.sendCommandMsg( startReplenishingFluidsJSON(parseInt(addLiquidVal.value)),