From 5f5ed9b4ee4c13215c010ffe934c06fd46ca8e2b Mon Sep 17 00:00:00 2001
From: selia-zx <1771203023@qq.com>
Date: Tue, 21 Apr 2026 17:17:57 +0800
Subject: [PATCH] =?UTF-8?q?1.=E7=83=AD=E6=B0=B4=E7=9B=91=E6=B5=8B=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9=E6=B0=B4=E7=AE=B1=E6=B0=B4=E4=BD=8D?=
=?UTF-8?q?=E3=80=81=E6=B8=A9=E5=BA=A6=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E6=B0=B4=E4=BD=8D=E5=8D=95=E4=BD=8D=E4=B8=BA=E7=B1=B3?=
=?UTF-8?q?=202.=E7=83=AD=E6=B0=B4=E6=8E=A7=E5=88=B6=E7=95=8C=E9=9D=A2?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B0=B4=E4=BD=8D=E5=8D=95=E4=BD=8D=E4=B8=BA?=
=?UTF-8?q?=E7=B1=B3=EF=BC=8C=E8=BF=90=E8=A1=8C=E7=8A=B6=E6=80=81=E5=80=BC?=
=?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82=E4=BC=A0?=
=?UTF-8?q?=E6=84=9F=E5=99=A8=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0=E8=AE=BE?=
=?UTF-8?q?=E5=AE=9A=E4=B8=8A=E9=99=90=E5=80=BC=E3=80=81=E8=AE=BE=E5=AE=9A?=
=?UTF-8?q?=E4=B8=8B=E9=99=90=E5=80=BC=E3=80=81=E6=9C=80=E4=BD=8E=E8=AE=BE?=
=?UTF-8?q?=E5=AE=9A=E5=80=BC=E3=80=81=E5=BC=82=E5=B8=B8=E5=A4=8D=E4=BD=8D?=
=?UTF-8?q?=E7=9A=84=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 4 +-
src/views/hotWater/waterControl/index.vue | 186 +++++++++++++++---
.../waterMonitor/waterMonitorDetails.vue | 108 +++++-----
3 files changed, 225 insertions(+), 73 deletions(-)
diff --git a/.env.development b/.env.development
index c000d60..eb84861 100644
--- a/.env.development
+++ b/.env.development
@@ -7,9 +7,9 @@ ENV = 'development'
# 开发环境
# VUE_APP_BASE_API = '/dev-api'
# 后台
-VUE_APP_BASE_API = 'http://192.168.1.222:8080'
+# VUE_APP_BASE_API = 'http://192.168.1.222:8080'
# 海湾酒店-云端
-# VUE_APP_BASE_API = 'http://106.55.173.225:8090'
+VUE_APP_BASE_API = 'http://106.55.173.225:8090'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
diff --git a/src/views/hotWater/waterControl/index.vue b/src/views/hotWater/waterControl/index.vue
index bde3654..e8a65aa 100644
--- a/src/views/hotWater/waterControl/index.vue
+++ b/src/views/hotWater/waterControl/index.vue
@@ -62,7 +62,7 @@
运行状态:
{{ item.runningStatus
- }}
+ }}
不运行
@@ -123,7 +123,7 @@
运行状态:
{{ item.runningStatus
- }}
+ }}
{{
item.runningStatus
}}
@@ -173,7 +173,7 @@
运行状态:
{{ item.runningStatus
- }}
+ }}
{{
item.runningStatus
}}
@@ -293,7 +293,7 @@
-
+
-
![]()
+ alt="" />
-
![]()
-
-

+
+

-

+

-

+

-

+

@@ -190,13 +182,13 @@
{{ temdata2 }}℃
-
-
-
{{ progress2 }}%
+
-
-
{{ progress2 }}%
+
+
{{ progress2 }}米
@@ -208,13 +200,13 @@
{{ temdata1 }}℃
-
-
-
{{ progress1 }}%
+
-
-
{{ progress1 }}%
+
+
{{ progress1 }}米
@@ -253,10 +245,12 @@

-
-
![]()
-
@@ -297,13 +291,13 @@
{{ temdata1 }}℃
-
-
-
{{ progress1 }}%
+
-
-
{{ progress1 }}%
+
+
{{ progress1 }}米
@@ -347,7 +341,7 @@
{{ row.levelSet1 }}
-->
-
+
{{ row.waterLevel1 }}
@@ -358,7 +352,7 @@
{{ row.levelSet2 }}
-->
-
+
{{ row.waterLevel2 }}
@@ -481,17 +475,14 @@ export default {
this.getAlarnStatus();
this.getDayData();
// 设置定时器,每 10 秒执行一次
- // this.timer = setInterval(() => {
- // if (this.isShowHotWater) {
- // this.baseMessgae();
- // this.sysStatus();
- // }
- // this.sysStatus();
- // }, 10000);
- // // 每秒更新一次时间
- // this.nowTimer = setInterval(() => {
- // this.currentDate = new Date();
- // }, 1000);
+ this.timer = setInterval(() => {
+ this.baseMessgae();
+ this.sysStatus();
+ }, 10000);
+ // 每秒更新一次时间
+ this.nowTimer = setInterval(() => {
+ this.currentDate = new Date();
+ }, 1000);
},
beforeDestroy() {
// 组件销毁前清除定时器
@@ -796,6 +787,10 @@ export default {
this.tableData.push(deviceItem);
});
console.log("处理后的tableData", this.tableData);
+ this.progress1 = 0;
+ this.progress2 = 0;
+ this.temdata1 = 0;
+ this.temdata2 = 0;
if (this.tableData.length > 0 && this.isShowHotWater) {
// 获取数据
@@ -813,6 +808,10 @@ export default {
// this.upWaterState2 = row.upWaterState2;
// this.upWaterState3 = row.upWaterState3;
// this.upWaterState4 = row.upWaterState4;
+ } else {
+ //水位 温度 热泵名称
+ this.progress1 = this.tableData[0].waterLevel1;
+ this.temdata1 = this.tableData[0].tankWaterTemp;
}
} else {
this.tableData = [];
@@ -843,6 +842,12 @@ export default {
if (state === 2) return require('../../../assets/flowimg/badpum.png');
return require('../../../assets/flowimg/closepum.png');
},
+ // 计算水位百分比(最高值maxLevel)
+ getWaterPercentage(waterLevel, maxLevel) {
+ let percentage = (waterLevel / maxLevel * 100).toFixed(2);
+ // 如果计算的值大于100,则返回100
+ return Number(percentage) > 100 ? 100 : Number(percentage);
+ },
},
};
@@ -1270,18 +1275,21 @@ export default {
left: 10.7rem;
z-index: 1;
}
+
.text19 {
position: absolute;
top: 0.25rem;
left: 3.4rem;
z-index: 1;
}
+
.text20 {
position: absolute;
top: 3.4rem;
left: 5.8rem;
z-index: 1;
}
+
.text21 {
position: absolute;
top: 3.4rem;
@@ -1640,6 +1648,7 @@ export default {
position: absolute;
top: -0.3rem;
z-index: 3;
+ white-space: nowrap;
}
}
@@ -1671,6 +1680,7 @@ export default {
position: absolute;
top: -0.3rem;
z-index: 3;
+ white-space: nowrap;
}
}
@@ -1702,6 +1712,7 @@ export default {
position: absolute;
top: -0.3rem;
z-index: 3;
+ white-space: nowrap;
}
}
@@ -1733,6 +1744,7 @@ export default {
position: absolute;
top: -0.3rem;
z-index: 3;
+ white-space: nowrap;
}
}
@@ -1764,6 +1776,7 @@ export default {
position: absolute;
top: -0.3rem;
z-index: 3;
+ white-space: nowrap;
}
}
@@ -1795,6 +1808,7 @@ export default {
position: absolute;
top: -0.3rem;
z-index: 3;
+ white-space: nowrap;
}
}