Browse Source

#95 当加液设置为0时,仍然可以正常执行加液操作

master
sige 1 year ago
parent
commit
b454566279
  1. 11
      src/components/LiquidHandle.vue

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

Loading…
Cancel
Save