diff --git a/src/components/LiquidHandle.vue b/src/components/LiquidHandle.vue index 4dfd2ea..23d3624 100644 --- a/src/components/LiquidHandle.vue +++ b/src/components/LiquidHandle.vue @@ -169,7 +169,7 @@ import StopPushPause from '@/assets/img/liquid/7.png' import LiquidModal from './dialogs/LiquidModal.vue' import { useDeviceStore, useWebSocketStore, useOperatorStore } from '@/store' -import { ref } from 'vue' +import { onMounted, onUnmounted, ref } from 'vue' import { storeToRefs } from 'pinia' import { startReplenishingFluidsJSON, @@ -192,6 +192,18 @@ const webSocketStore = useWebSocketStore() const isPopLiquidStatus = ref(false) + +onMounted(() => { + addLiquidVal.value = operatorStore.liquidAddtionVolume + ''; +}); + +onUnmounted(() => { + operatorStore.liquidAddtionVolume = parseInt(addLiquidVal.value); +}); + + + + const formatter = value => { if (parseInt(value) > 5000) { return '5000' diff --git a/src/store/modules/operator.js b/src/store/modules/operator.js index be1f38c..3adb4f0 100644 --- a/src/store/modules/operator.js +++ b/src/store/modules/operator.js @@ -23,6 +23,9 @@ export const useOperatorStore = defineStore({ showStartReady: false, // 结束消毒loading showStopReady: false, + + // 加液量 + liquidAddtionVolume: 0, } }, // actions