diff --git a/src/assets/img/liquid/chart.png b/src/assets/img/liquid/chart.png index 4487df1..3365b5c 100644 Binary files a/src/assets/img/liquid/chart.png and b/src/assets/img/liquid/chart.png differ diff --git a/src/components/LiquidHandle.vue b/src/components/LiquidHandle.vue index 8f7ceaf..50d08ce 100644 --- a/src/components/LiquidHandle.vue +++ b/src/components/LiquidHandle.vue @@ -14,28 +14,34 @@

设置加液

停止加液
开始加液
停止排液
@@ -92,15 +98,13 @@
{ - if (!isAddLiquidStatus.value) { - isAddLiquidStatus.value = true + if (!operatorStore.replenishingFluidsWorkState) { console.log(startReplenishingFluidsJSON(parseInt(addLiquidVal.value))) webSocketStore.sendCommandMsg( startReplenishingFluidsJSON(parseInt(addLiquidVal.value)), @@ -149,40 +151,23 @@ const startAdd = () => { } const stopAdd = () => { - if (isAddLiquidStatus.value) { - isAddLiquidStatus.value = false + if (operatorStore.replenishingFluidsWorkState) { webSocketStore.sendCommandMsg(stopReplenishingFluidsJSON) } } const stopPop = () => { - if (isPopLiquidStatus.value) { + if (operatorStore.drainingWorkState) { webSocketStore.sendCommandMsg(stopDrainingJSON) - isPopLiquidStatus.value = false } } -const startPopFlag = () => { - isPopLiquidStatus.value = true -} - const startTabLiquid = () => { - if (!isPopLiquidStatus.value) { + if (!operatorStore.drainingWorkState) { tipModalVisible.value = true } } -const formatter = value => { - if (value > 500) { - return '500/g' - } - if (value != 0) { - var newVal = value.replace(/\b(0+)/gi, '') - return newVal + '/g' - } - return '0/g' -} - const hideTabLiquid = () => { tipModalVisible.value = false } diff --git a/src/components/dialogs/LiquidModal.vue b/src/components/dialogs/LiquidModal.vue index 9e0d079..1d0c904 100644 --- a/src/components/dialogs/LiquidModal.vue +++ b/src/components/dialogs/LiquidModal.vue @@ -42,20 +42,11 @@ const props = defineProps({ hideTabLiquid: { type: Function, }, - startPopFlag: { - type: Function, - }, - isPopLiquidStatus: { - type: Boolean, - }, }) const tapLiquid = () => { - if (!props.isPopLiquidStatus) { - props.startPopFlag() - webSocketStore.sendCommandMsg(startDrainingJSON) - props?.hideTabLiquid() - } + webSocketStore.sendCommandMsg(startDrainingJSON) + props?.hideTabLiquid() } const cancelTap = () => {