From b422e6e32352eb3dd53f4ea03c269fa46f4edc23 Mon Sep 17 00:00:00 2001 From: selia-zx <1771203023@qq.com> Date: Wed, 9 Jul 2025 11:06:39 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=B1=8F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=202.=E4=BF=AE=E6=94=B9=E7=94=9F=E6=B4=BB=E7=83=AD?= =?UTF-8?q?=E6=B0=B4-=E7=83=AD=E6=B3=B5=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/bigScreen.vue | 2 +- .../bigScreen/components/coldSysEnergy.vue | 2 +- src/views/hotWater/waterControl/index.vue | 154 +++++++++--------- 3 files changed, 78 insertions(+), 80 deletions(-) diff --git a/src/views/bigScreen/bigScreen.vue b/src/views/bigScreen/bigScreen.vue index 8f23ef0..74af99d 100644 --- a/src/views/bigScreen/bigScreen.vue +++ b/src/views/bigScreen/bigScreen.vue @@ -52,7 +52,7 @@
-
冷源系统能耗
+
冷源系统能效
-
用电量:{{ energyMes.totalEle }}kw/h
产冷量:{{ energyMes.totalCold }}kwh
+
用电量:{{ energyMes.totalEle }}kw/h
diff --git a/src/views/hotWater/waterControl/index.vue b/src/views/hotWater/waterControl/index.vue index fec54f0..92ac8a5 100644 --- a/src/views/hotWater/waterControl/index.vue +++ b/src/views/hotWater/waterControl/index.vue @@ -67,59 +67,73 @@ />
-
运行状态模式:
+
开关控制:
- - - - +
-
-
故障信息:
- +
+
+
+
故障信息:
+ {{ item.alarmStatus }} + {{ + item.alarmStatus + }} +
+
+
运行状态:
+ 关机 + + 开机 + +
+
+
实际温度:
+
{{ item.temp }}℃
+
+
+
设定温度:
+
+ {{ item.alarmStatus }} - {{ - item.alarmStatus - }} -
-
-
实际温度:
-
{{ item.temp }}℃
-
-
-
设定温度:
-
- -
+ v-model="item.tempSet" + placeholder="请输入" + @keyup.enter.native=" + handleEnter( + item, + item.tempSet, + item.tempSetId, + '设定温度', + '℃' + ) + " + @input="handleInput(item)" + @blur="handleBlur()" + >
@@ -593,15 +607,7 @@ export default { value: 0, }, { - label: "制冷", - value: 2, - }, - { - label: "制热", - value: 3, - }, - { - label: "热水", + label: "开机", value: 4, }, ], @@ -933,26 +939,10 @@ export default { }, // 设置热泵开关状态 handleHotPump(item) { - // 记录原始状态 - const originalStatus = item.hotPumpStatus; - // 根据 value 值获取对应的 label - let statusLabel = ""; - switch (item.hotPumpStatus) { - case 0: - statusLabel = "关机"; - break; - case 2: - statusLabel = "制冷"; - break; - case 3: - statusLabel = "制热"; - break; - case 4: - statusLabel = "热水"; - break; - } this.$confirm( - `确定要切换设备"${item.name}"的状态为:${statusLabel} 吗?"`, + `确定要切换设备"${item.name}"的状态为:${ + item.switchStatus ? "开机" : "关机 吗?" + }`, "提示", { confirmButtonText: "确定", @@ -961,11 +951,19 @@ export default { } ) .then(() => { - this.hadleOperationConrol(item.switchStatusId, item.hotPumpStatus); + // 这里调用请求函数,示例中只是简单打印信息 + console.log("请求后台", item.switchStatus); + let param = null; + if (item.switchStatus) { + param = 1; + } else { + param = 0; + } + this.hadleOperationConrol(item.switchStatusId, param); }) .catch(() => { - // 用户取消操作,恢复状态 - item.hotPumpStatus = originalStatus; + // 用户取消操作,恢复开关状态 + item.switchStatus = !item.switchStatus; }); }, // 设置供水泵手自动状态