加液蠕动泵
-
{{ Math.abs(testStore.chargingPump) }} RPM
+
+
+
打开
- 打开
-
-
关闭
@@ -20,17 +39,36 @@
喷液蠕动泵
-
{{ testStore.sprinklerPump }} RPM
+
+
+
打开
- 打开
-
-
关闭
@@ -123,6 +161,26 @@
湿度 {{ deviceStore.envirHumidity2 }} ℃
过氧化氢浓度 {{ deviceStore.envirHP2 }} PPM
+
+
+
+
@@ -138,6 +196,7 @@ import {
someAirSwitchJSON,
liquidpumpctrlJSON,
getStateJSON,
+ addLiquidCtrlJSON,
} from '@/mock/command'
const testStore = useTestStore()
@@ -145,6 +204,98 @@ const deviceStore = useDeviceStore()
const websocketStore = useWebSocketStore()
const settingStore = useSettingStore()
+const addLiquidVal = ref(300)
+const addLiquidPower = ref(25)
+const numberKeyboardShowVal = ref(false)
+const numberKeyboardShowPower = ref(false)
+
+const addLiquidVal2 = ref(300)
+const addLiquidPower2 = ref(25)
+const numberKeyboardShowVal2 = ref(false)
+const numberKeyboardShowPower2 = ref(false)
+
+const formatter = value => {
+ if (parseInt(value) > 31) {
+ return '31'
+ }
+ return value
+}
+
+const formatter6 = value => {
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'drainage_pump_speed',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
+ }
+ return value
+}
+
+const formatter7 = value => {
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'injection_pump_speed',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
+ }
+ return value
+}
+
+const hideAllKeyboards = flag => {
+ if (flag == 1) {
+ numberKeyboardShowVal.value = true
+ numberKeyboardShowPower.value = false
+ numberKeyboardShowVal2.value = false
+ numberKeyboardShowPower2.value = false
+ }
+ if (flag == 2) {
+ numberKeyboardShowPower.value = true
+ numberKeyboardShowVal.value = false
+ numberKeyboardShowVal2.value = false
+ numberKeyboardShowPower2.value = false
+ }
+ if (flag == 3) {
+ numberKeyboardShowVal2.value = true
+ numberKeyboardShowPower.value = false
+ numberKeyboardShowVal.value = false
+ numberKeyboardShowPower2.value = false
+ }
+ if (flag == 4) {
+ numberKeyboardShowPower2.value = true
+ numberKeyboardShowPower.value = false
+ numberKeyboardShowVal2.value = false
+ numberKeyboardShowVal.value = false
+ }
+}
+
+const setAddLiquidConfig = flag => {
+ if (flag == 1) {
+ websocketStore.sendCommandMsg(
+ addLiquidCtrlJSON(1, addLiquidVal.value, addLiquidPower.value),
+ )
+ } else if (flag == 2) {
+ websocketStore.sendCommandMsg(
+ addLiquidCtrlJSON(2, addLiquidVal2.value, addLiquidPower2.value),
+ )
+ } else if (flag == 3) {
+ websocketStore.sendCommandMsg(addLiquidCtrlJSON(1, 0, addLiquidPower.value))
+ } else {
+ websocketStore.sendCommandMsg(
+ addLiquidCtrlJSON(2, 0, addLiquidPower2.value),
+ )
+ }
+}
+
const handleUpdate = () => {
websocketStore.sendCommandMsg(getStateJSON)
}
@@ -263,10 +414,24 @@ const changeDraughtStatus = flag => {
}
.num {
font-family: Source Han Sans CN;
- font-size: 14px;
+ font-size: 13px;
font-weight: 500;
letter-spacing: 0.1em;
color: #000000;
+ display: flex;
+ align-items: center;
+ margin-right: 4px;
+ .add_liquid_input {
+ width: 40px;
+ margin-right: 2px;
+ text-align: right;
+ height: 24px;
+ padding: 0;
+ color: #0e0e0e;
+ font-family: Source Han Sans CN;
+ font-weight: 500;
+ font-size: 14;
+ }
}
}
.switch_wrap {
diff --git a/src/mock/command.js b/src/mock/command.js
index 587a2b5..75f0103 100644
--- a/src/mock/command.js
+++ b/src/mock/command.js
@@ -132,3 +132,10 @@ export const stopDrainingJSON = {
command: 'stopDraining',
messageId: 'stopDraining',
}
+
+export const addLiquidCtrlJSON = (num, speed, power) => {
+ return {
+ command: 'exceCanCmd',
+ cancmd: `pumpctrl_c1004 ${num} 300 ${speed} 1 ${power}`,
+ }
+}
diff --git a/src/pages/Home.vue b/src/pages/Home.vue
index 1c2c868..b7c3886 100644
--- a/src/pages/Home.vue
+++ b/src/pages/Home.vue
@@ -251,7 +251,7 @@ const onChange = a => {
const changeTab = index => {
activeTab.value = index
- if (index == 5) {
+ if ([4, 5].includes(index)) {
// getAllSetting
webSocketStore.sendCommandMsg(getAllSettingJSON)
}