From 53b6036452f45181993b3263b0130324d981c0ca Mon Sep 17 00:00:00 2001
From: Iruka <1017819588@qq.com>
Date: Thu, 13 Feb 2025 15:00:07 +0800
Subject: [PATCH] .
---
.../custom-index-chart/custom-index-chart.vue | 20 +++++----
pages/index-map.vue | 44 +++++++++++++------
pages/index.vue | 21 +++++++--
utils/indexUtil/imageAssets.js | 3 ++
4 files changed, 63 insertions(+), 25 deletions(-)
diff --git a/components/custom-index-chart/custom-index-chart.vue b/components/custom-index-chart/custom-index-chart.vue
index 1169edc..a4b7c07 100644
--- a/components/custom-index-chart/custom-index-chart.vue
+++ b/components/custom-index-chart/custom-index-chart.vue
@@ -59,14 +59,10 @@
* @param data
*/
async show(row) {
+ console.error("row:", row);
this.open = true;
- if (row?.deviceTypeId == 1) {
- this.type = "station";
- this.title = `设备曲线【${row.deviceCode}】`;
- } else {
- this.type = "valve";
- this.title = `设备曲线【${row.showName}】`;
- }
+ this.type = row._type;
+ this.title = `设备曲线【${row._showName}】`;
this.item = row;
this.getList(0);
},
@@ -96,14 +92,17 @@
type: this.type,
data: res.rows || []
};
+ }).catch(error => {
+ uni.hideLoading()
+ plugin.modal.showToast(error)
})
} else if (this.type == "valve") {
let queryParams = {
pageNum: 1,
pageSize: 9999,
landId: this.item.landId,
- wogId: this.item.landGroupId,
- woId: this.item.id,
+ wogId: this.item.wogId,
+ woId: this.item.woId,
reportType: "device_thing",
params: {
beginTime: this.getNowFormatDate(day),
@@ -116,6 +115,9 @@
type: this.type,
data: res.rows || []
};
+ }).catch(error => {
+ uni.hideLoading()
+ plugin.modal.showToast(error)
})
}
diff --git a/pages/index-map.vue b/pages/index-map.vue
index 5f00fe3..6c13990 100644
--- a/pages/index-map.vue
+++ b/pages/index-map.vue
@@ -131,8 +131,9 @@
+
-
+
@@ -454,6 +455,8 @@
+
+
@@ -841,18 +844,33 @@
// 打开弹窗
async openDialog(key, row = null) {
switch (key) {
- // case "chart": //曲线
- // this.$refs.adcChartRef.show(row);
- // break;
- // case "wo":
- // this.$refs.woRemarkRef.show(row);
- // break;
- // case "wh": //浇灌履历
- // this.$refs.wateringHistoryRef.show(this.land, row);
- // break;
- // case "log": //日志
- // this.$refs.deviceLogRef.show(this.land, row);
- // break;
+ case "chart": //曲线
+ if (row.type == "jz") {
+ this.$refs.adcChartRef.show({
+ _type: "station",
+ _showName: row.showName,
+ deviceId: row.device.deviceId,
+ deviceCode: row.device.deviceCode,
+ });
+ } else {
+ this.$refs.adcChartRef.show({
+ _type: "valve",
+ _showName: row.showName,
+ landId: row.logParams.landId,
+ wogId: row.logParams.wogId,
+ woId: row.logParams.woId,
+ });
+ }
+ break;
+ // case "wo":
+ // this.$refs.woRemarkRef.show(row);
+ // break;
+ // case "wh": //浇灌履历
+ // this.$refs.wateringHistoryRef.show(this.land, row);
+ // break;
+ // case "log": //日志
+ // this.$refs.deviceLogRef.show(this.land, row);
+ // break;
case "mp": //墒情
this.$refs.mpRef.show(this.land);
break;
diff --git a/pages/index.vue b/pages/index.vue
index 437e414..f7a2d1e 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -113,7 +113,7 @@
:disabled="refreshAllDisabled" />
+ v-hasPermi="['irrigate:irrigateScenario:batchControl']">
@@ -544,7 +544,7 @@
-
+
@@ -687,7 +687,22 @@
async openDialog(key, row = null) {
switch (key) {
case "chart": //曲线
- this.$refs.adcChartRef.show(row);
+ if (row?.deviceTypeId == 1) {
+ this.$refs.adcChartRef.show({
+ _type: "station",
+ _showName: row.deviceCode,
+ deviceId: row.deviceId,
+ deviceCode: row.deviceCode,
+ });
+ } else {
+ this.$refs.adcChartRef.show({
+ _type: "valve",
+ _showName: row.showName,
+ landId: row.landId,
+ wogId: row.landGroupId,
+ woId: row.id,
+ });
+ }
break;
// case "wo":
// this.$refs.woRemarkRef.show(row);
diff --git a/utils/indexUtil/imageAssets.js b/utils/indexUtil/imageAssets.js
index 7a97a21..d7c877f 100644
--- a/utils/indexUtil/imageAssets.js
+++ b/utils/indexUtil/imageAssets.js
@@ -10,6 +10,8 @@ import scd from '@/static/images/map/scd.png' //杀虫灯
import sq from '@/static/images/map/sq.png' //墒情
import csk from '@/static/images/map/csk.png' //出水口
+import jz_select from '@/static/images/valves/jz.png' //基站
+
import df from '@/static/images/map/map-df.png'
import df_select from '@/static/images/map/map-df-select.png'
import valve_df_close from '@/static/images/valves/df/valve_df_close.png'
@@ -55,6 +57,7 @@ export {
scd,
sq,
csk,
+ jz_select,
df,
df_select,
valve_df_close,