diff --git a/src/components/LiquidHandle.vue b/src/components/LiquidHandle.vue index d9ded32..64b4b69 100644 --- a/src/components/LiquidHandle.vue +++ b/src/components/LiquidHandle.vue @@ -105,7 +105,12 @@ const isPopLiquidStatus = ref(false) const startAdd = () => { if (!isAddLiquidStatus.value) { isAddLiquidStatus.value = true - webSocketStore.sendCommandMsg(startReplenishingFluidsJSON) + console.log( + startReplenishingFluidsJSON(parseInt(addLiquidVal.value.slice(0, -2))), + ) + webSocketStore.sendCommandMsg( + startReplenishingFluidsJSON(parseInt(addLiquidVal.value.slice(0, -2))), + ) } } diff --git a/src/components/Operator.vue b/src/components/Operator.vue index 22e82c0..5a412fc 100644 --- a/src/components/Operator.vue +++ b/src/components/Operator.vue @@ -117,7 +117,6 @@ const logVal = ref(1) const roomSize = ref(0) watch(() => { - console.log(props.input) roomSize.value = props.input.match(/\d+/g) }) diff --git a/src/components/Progress.vue b/src/components/Progress.vue index b38a50a..8c4e78c 100644 --- a/src/components/Progress.vue +++ b/src/components/Progress.vue @@ -4,14 +4,14 @@
剩余时间

{{ operatorStore.estimatedRemainingTimeS }} S

-
+
{ } } -export const startReplenishingFluidsJSON = { - command: 'startReplenishingFluids', - messageId: 'startReplenishingFluids', +export const startReplenishingFluidsJSON = stopAt => { + return { + command: 'startReplenishingFluids', + messageId: 'startReplenishingFluids', + stopAt, + } } export const stopReplenishingFluidsJSON = { diff --git a/src/pages/Home.vue b/src/pages/Home.vue index a81dc75..e15148c 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -235,7 +235,7 @@ const changeShowOperator = flag => { showOpertor.value = flag } -const input = ref('') +const input = ref('0') const onChange = a => { input.value = a } diff --git a/src/store/modules/test.js b/src/store/modules/test.js index 2e2b636..07340ce 100644 --- a/src/store/modules/test.js +++ b/src/store/modules/test.js @@ -55,9 +55,19 @@ export const useTestStore = defineStore({ }, updateSprinklerPump(sprinklerPump) { this.sprinklerPump = sprinklerPump + if (sprinklerPump == 0) { + this.sprayPeristalticPump = false + } else { + this.sprayPeristalticPump = true + } }, updateChargingPump(chargingPump) { this.chargingPump = chargingPump + if (chargingPump == 0) { + this.feedingPeristalticPumpStatus = false + } else { + this.feedingPeristalticPumpStatus = true + } }, updateFeedingPeristalticPumpStatus(status) { this.feedingPeristalticPumpStatus = status diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js index 801376b..d9d2a56 100644 --- a/src/store/modules/websocket.js +++ b/src/store/modules/websocket.js @@ -29,7 +29,7 @@ export const useWebSocketStore = defineStore({ const operatorStore = useOperatorStore() init.connect() init.ws.onmessage = function (ev) { - console.log(JSON.parse(ev.data)) + // console.log(JSON.parse(ev.data)) const { ackcode, messageId } = JSON.parse(ev.data) if (ackcode == 0) { @@ -129,7 +129,7 @@ export const useWebSocketStore = defineStore({ const testStore = useTestStore() const settingStore = useSettingStore() init.ws.onmessage = function (ev) { - console.log(JSON.parse(ev.data)) + // console.log(JSON.parse(ev.data)) const { command } = JSON.parse(ev.data) switch (command) { case 'RealtimeSensorDataReport':