From 072646052483d2007c0c5dbe7594171013aa3cc1 Mon Sep 17 00:00:00 2001
From: Iruka <1017819588@qq.com>
Date: Thu, 13 Feb 2025 11:33:01 +0800
Subject: [PATCH] .
---
api/iot/data_station.js | 10 +
api/iot/data_valve.js | 10 +
.../custom-index-chart/custom-index-chart.vue | 347 ++++++++++++++++++
package.json | 1 +
pages/index.vue | 31 +-
plugins/modal.js | 14 +-
6 files changed, 394 insertions(+), 19 deletions(-)
create mode 100644 api/iot/data_station.js
create mode 100644 api/iot/data_valve.js
create mode 100644 components/custom-index-chart/custom-index-chart.vue
diff --git a/api/iot/data_station.js b/api/iot/data_station.js
new file mode 100644
index 0000000..7caa248
--- /dev/null
+++ b/api/iot/data_station.js
@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询设备-设备单据摘要列表
+export function list(query) {
+ return request({
+ url: '/iotlog/data_station/list',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/api/iot/data_valve.js b/api/iot/data_valve.js
new file mode 100644
index 0000000..22fa352
--- /dev/null
+++ b/api/iot/data_valve.js
@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询设备-设备单据摘要列表
+export function list(query) {
+ return request({
+ url: '/iotlog/data_valve/list',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/components/custom-index-chart/custom-index-chart.vue b/components/custom-index-chart/custom-index-chart.vue
new file mode 100644
index 0000000..1169edc
--- /dev/null
+++ b/components/custom-index-chart/custom-index-chart.vue
@@ -0,0 +1,347 @@
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 8d209bc..75312a0 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"dependencies": {
"axios": "0.28.1",
"dayjs": "^1.11.13",
+ "echarts": "^5.6.0",
"jsencrypt": "^3.3.2",
"leaflet": "^1.9.4",
"mqtt": "^3.0.0"
diff --git a/pages/index.vue b/pages/index.vue
index fee417a..437e414 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -129,7 +129,7 @@
-
+
@@ -253,7 +253,8 @@
-
+
+
+
@@ -683,18 +686,18 @@
// 打开弹窗
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": //曲线
+ 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 "mp": //墒情
this.$refs.mpRef.show(this.ijs.land);
break;
diff --git a/plugins/modal.js b/plugins/modal.js
index e4ea871..70c6def 100644
--- a/plugins/modal.js
+++ b/plugins/modal.js
@@ -47,7 +47,7 @@ export default {
if (res.confirm) {
resolve(res.confirm)
}
- if(res.cancel){
+ if (res.cancel) {
reject(res.cancel);
}
}
@@ -68,10 +68,14 @@ export default {
},
// 打开遮罩层
loading(text) {
- uni.showLoading({
- title: text,
- icon: 'none'
- })
+ let obj = {};
+ if (text) {
+ obj = {
+ title: text,
+ icon: 'none'
+ }
+ }
+ uni.showLoading(obj)
},
// 关闭遮罩层
closeLoading() {