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)),