From 8d25940e87b999072adccbefe44ef315d0f4aba4 Mon Sep 17 00:00:00 2001
From: sige
Date: Thu, 23 May 2024 21:17:46 +0800
Subject: [PATCH] =?UTF-8?q?#99=20=E8=AE=BE=E7=BD=AE-=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE=E5=A2=9E=E5=8A=A0=E6=81=A2?=
=?UTF-8?q?=E5=A4=8D=E5=87=BA=E5=8E=82=E8=AE=BE=E7=BD=AE=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Setting/components/Device.vue | 63 ++++++++++++++++++++++++++++
src/store/modules/websocket.js | 2 +-
src/utils/MyModal.js | 31 ++++++++++++++
3 files changed, 95 insertions(+), 1 deletion(-)
diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue
index c98d180..dbc76ce 100644
--- a/src/components/Setting/components/Device.vue
+++ b/src/components/Setting/components/Device.vue
@@ -107,6 +107,13 @@
>
+
+
{
const ele = document.getElementById('set_device_container')
ele.scrollTop = ele.scrollTop - 100 < 100 ? 0 : ele.scrollTop - 100
@@ -774,6 +785,7 @@ const setProportionalValveDefaultValue = () => {
}
const setSprayLiquidVal = () => {
+ debugger;
const val = parseInt(sprayLiquidConfigVal.value)
if (isNaN(val)) {
showFailToast('设置失败,请填写正确参数')
@@ -791,6 +803,57 @@ const setSprayLiquidVal = () => {
}
showSuccessToast('设置成功')
}
+
+// 恢复到默认设置
+async function actionDefaultSetting() {
+ let isConfirmed = await MyModal.confirm('是否恢复到默认设置?');
+ if (!isConfirmed) {
+ return;
+ }
+
+ if ( !props.runInfection ) {
+ // 注射蠕动泵速率(g/min)
+ settingStore.changeSprayLiquidConfigVal(0);
+ await webSocketStore.call('setSettingVal',{settingName:'injection_pump_speed', settingVal:0});
+
+ // 消毒停止过氧化氢浓度(ppm)
+ settingStore.updateStopedGs(0);
+ await webSocketStore.call('setSettingVal',{settingName:'stoped_gs', settingVal:0});
+
+ // 消毒继续过氧化氢浓度(ppm)
+ settingStore.updateContinuedGs(0);
+ await webSocketStore.call('setSettingVal',{settingName:'continued_gs', settingVal:0});
+
+ // 消毒停止相对湿度(%RH)
+ settingStore.updateStopedHumi(0);
+ await webSocketStore.call('setSettingVal',{settingName:'stoped_humi', settingVal:0});
+
+ // 消毒继续相对湿度(%RH)
+ settingStore.updateContinuedHumi(0);
+ await webSocketStore.call('setSettingVal',{settingName:'continued_humi', settingVal:0});
+
+ // 消毒停止过氧化氢相对饱和度(%RS)
+ settingStore.updateStopedSatur(0);
+ await webSocketStore.call('setSettingVal',{settingName:'stoped_satur', settingVal:0});
+
+ // 消毒继续过氧化氢相对饱和度(%RS)
+ settingStore.updateContinuedSatur(0);
+ await webSocketStore.call('setSettingVal',{settingName:'continued_satur', settingVal:0});
+
+ // 正负压默认开合比例
+ settingStore.updateProportionalValveDefaultValue(0);
+ await webSocketStore.call('setSettingVal',{settingName:'proportional_valve_default_value', settingVal:0});
+
+ // 允许消毒最大湿度(%RH)
+ settingStore.updateMaxHumidity(0);
+ await webSocketStore.call('setSettingVal',{settingName:'max_humidity', settingVal:0});
+
+ // 预热时间(s)
+ settingStore.updatePre_heat_time_s(0);
+ await webSocketStore.call('setSettingVal',{settingName:'pre_heat_time_s', settingVal:0});
+ }
+ showSuccessToast('设置成功')
+}