diff --git a/src/assets/flowimg/cycle-pipeline.gif b/src/assets/flowimg/cycle-pipeline.gif index 480c368..8ec41ea 100644 Binary files a/src/assets/flowimg/cycle-pipeline.gif and b/src/assets/flowimg/cycle-pipeline.gif differ diff --git a/src/assets/flowimg/cycle-pipeline.png b/src/assets/flowimg/cycle-pipeline.png index 3e581ca..7d4a322 100644 Binary files a/src/assets/flowimg/cycle-pipeline.png and b/src/assets/flowimg/cycle-pipeline.png differ diff --git a/src/views/components/monitor/hotWaterMonitor.vue b/src/views/components/monitor/hotWaterMonitor.vue index 72cfb46..16664a6 100644 --- a/src/views/components/monitor/hotWaterMonitor.vue +++ b/src/views/components/monitor/hotWaterMonitor.vue @@ -177,7 +177,8 @@ : require('../../../assets/flowimg/onlineweb.png') " alt="" /> - + @@ -198,7 +199,8 @@ - +
@@ -393,7 +395,7 @@
-
@@ -412,7 +414,8 @@
-
+
-
+
-
+
-
+
+ " @input="handleWaterInput(hotPumpOperateData)" @blur="handleBlur()">
@@ -572,6 +578,17 @@ 不运行
+ +
+ + {{ + hotPumpOperateData.localRemoteStatus + }} + {{ + hotPumpOperateData.localRemoteStatus + }} +
+
@@ -594,6 +611,7 @@ export default { data() { return { loading: false, + dialogLoading:false, currentDate: new Date(), nowTimer: null, timer: null, // 用于存储定时器 ID @@ -658,7 +676,7 @@ export default { this.timer = setInterval(() => { this.baseMessgae(); this.sysStatus(); - }, 10000); + }, 10 * 1000); this.getSysBuild(); }, @@ -981,7 +999,7 @@ export default { systemType: "1", floorId: this.currentId, }; - waterMonitorList(data).then((res) => { + return waterMonitorList(data).then((res) => { console.log("系统状态返回", res); if (res.code == 200 && res.rows.length > 0) { this.tableData = []; @@ -1096,8 +1114,13 @@ export default { if (matchedItem) { this.hotPumpOperateData = { ...matchedItem, + tempSet: + (itemName.includes('热泵') && matchedItem.tempSet) + ? Math.round(Number(matchedItem.tempSet)) + : matchedItem.tempSet || '', waterLevel: Number(matchedItem.waterLevel), runningStatus: Number(matchedItem.runningStatus) === 0 ? "停止" : "运行", //运行状态 + localRemoteStatus: Number(matchedItem.localRemoteStatus) == 0 ? "远程" : "本地", //本地/远程控制状态 hotPumpStatus: Number(matchedItem.switchStatus) === 0 ? false @@ -1251,6 +1274,9 @@ export default { item.tempSet = parts[0] + "." + parts[1].slice(0, 2); } }, + handleWaterInput(item) { + item.tempSet = String(item.tempSet).replace(/[^\d]/g, ""); + }, // 失去焦点 handleBlur() { }, hadleOperationConrol(id, param) { @@ -1260,25 +1286,49 @@ export default { }; console.log("操作参数", data); // 开启 loading 效果 - this.loading = true; + this.dialogLoading = true; + console.log("开始调用 operationConrol API"); operationConrol([data]) .then((res) => { + console.log("operationConrol 返回结果:", res); + console.log("res.code:", res.code, "类型:", typeof res.code); + console.log("res.code == 200:", res.code == 200); + console.log("res.code === 200:", res.code === 200); + if (res.code == 200) { + console.log("进入 res.code == 200 分支"); this.$modal.msgSuccess("指令下发成功!"); // 更新所有设备状态; setTimeout(() => { + console.log("1") this.sysStatus().finally(() => { + // 更新操作数据 + if (this.hotPumpTitle && this.currentPumpType) { + console.log("更新操作数据", this.hotPumpTitle, this.currentPumpType); + // 根据不同的设备类型获取对应的组名 + let groupName = ""; + if (this.currentPumpType === "hotpump") { + groupName = "热泵"; + } else if (this.currentPumpType === "cyclepump") { + groupName = "贵宾楼循环泵"; + } else if (this.currentPumpType === "waterBox") { + groupName = "水箱"; + } + this.loadOperateData(groupName, this.hotPumpTitle); + } // 关闭 loading 效果 - this.loading = false; + this.dialogLoading = false; + console.log("2") }); }, 5000); } else { + console.log("进入 else 分支,res.code:", res.code); // this.$modal.msgError("操作失败"); console.log("应该更新状态的"); // 更新所有设备状态; this.sysStatus().finally(() => { // 关闭 loading 效果 - this.loading = false; + this.dialogLoading = false; }); } }) @@ -1287,7 +1337,7 @@ export default { // 更新所有设备状态; this.sysStatus().finally(() => { // 关闭 loading 效果 - this.loading = false; + this.dialogLoading = false; }); }); }, @@ -1651,14 +1701,14 @@ export default { .text20 { position: absolute; top: 3.4rem; - left: 5.8rem; + left: 5.4rem; z-index: 1; } .text21 { position: absolute; top: 3.4rem; - left: 3rem; + left: 2.8rem; z-index: 1; } @@ -1683,8 +1733,8 @@ export default { .cycle-pipeline { position: absolute; top: 3.3rem; - left: 5.3rem; - width: 3rem; + left: 3.5rem; + width: 4.4rem; height: 1.5rem; z-index: 0; } @@ -1944,6 +1994,7 @@ export default { width: 2.16rem; height: 2.6rem; z-index: 2; + cursor: pointer; } .waterBox2 { @@ -1953,6 +2004,7 @@ export default { width: 2.16rem; height: 2.6rem; z-index: 2; + cursor: pointer; } .waterBox3 {