From 832a41e2688553219b540ca772faeaba16a02088 Mon Sep 17 00:00:00 2001
From: zuoxiao <zuoxiao>
Date: 星期五, 22 八月 2025 14:44:23 +0800
Subject: [PATCH] 更新项目配置,提升监测页面功能,新增注肥泵状态管理和故障清除功能;优化样式以增强用户体验和可视化效果。
---
pages/waterIntake/waterIntake.js | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/pages/waterIntake/waterIntake.js b/pages/waterIntake/waterIntake.js
index 78ce934..0ef769c 100644
--- a/pages/waterIntake/waterIntake.js
+++ b/pages/waterIntake/waterIntake.js
@@ -94,18 +94,11 @@
choseCard(event) {
//鏄剧ず浜屾纭寮圭獥
this.setData({
- // showConfirm: true,
+ showConfirm: true,
choseItem: event.currentTarget.dataset.item,
allWaterPoints: []
-
})
- this.initDialogData();
-
- // console.log(intakeId);
- // wx.navigateTo({
- // url: '/pages/openCard/openCard?intakeId='+intakeId,
- // })
-
+ // 娉ㄦ剰锛歩nitDialogData鐨勮皟鐢ㄧЩ鍒颁簡confirmDialog鏂规硶涓�
},
//寮�娉甸�氫俊
/**
@@ -238,14 +231,28 @@
isRefreshing_all: false
});
if (data.success && data.code === "0001") {
- if (!data.content || data.content.itemTotal === 0 || !data.content.obj || data.content.obj.length === 0) {
+ let waterPoints = [];
+
+ // 鍏煎鏂版棫涓ょ鏁版嵁缁撴瀯
+ if (data.content) {
+ // 鏂版暟鎹粨鏋勶細content鐩存帴鍖呭惈鍙栨按鍙d俊鎭�
+ if (data.content.intakeId) {
+ waterPoints = [data.content];
+ }
+ // 鏃ф暟鎹粨鏋勶細content鍖呭惈obj鏁扮粍
+ else if (data.content.obj && Array.isArray(data.content.obj) && data.content.obj.length > 0) {
+ waterPoints = data.content.obj;
+ }
+ }
+
+ if (waterPoints.length === 0) {
wx.showToast({
title: '娌℃湁鎼滅储鍒板彇姘村彛',
icon: 'error',
})
} else {
this.setData({
- allWaterPoints: data.content.obj
+ allWaterPoints: waterPoints
});
}
@@ -313,10 +320,6 @@
this.getcommonWaterPoints();
},
confirmDialog() {
- // this.setData({
- // showConfirm: false
- // })
- // this.postOpenValva(this.data.choseItem.intakeId);
this.setData({
showConfirm: false
})
--
Gitblit v1.8.0