From 9a0925c3102ff9e18637271ecdab6bf56ca149dc Mon Sep 17 00:00:00 2001
From: guoshipeng <3194674006@qq.com>
Date: Tue, 21 Mar 2023 13:22:12 +0800
Subject: [PATCH] 1、时间控件修改

---
 src/views/charts/index.vue |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/views/charts/index.vue b/src/views/charts/index.vue
index ecfdd9b..929364a 100644
--- a/src/views/charts/index.vue
+++ b/src/views/charts/index.vue
@@ -168,7 +168,6 @@
       }
       // ������������������������������������������
       this.getSensor()
-      console.log(this.newMac1)
     },
     // ������dataType���������������
     select1(nv, ov) {
@@ -267,22 +266,22 @@
       })
         .then((res) => {
           // console.log('������������������������������')
-          console.log(res)
           const data = res.data
           let lockLength = 0
           for (let i = 0; i < data.length; i++) {
             for (let j = 0; j < data[i].deviceData.length; j++) {
-              // console.log(data[i].deviceData);
-              if (res.data[0].deviceData.length == 1) {
-                newLineChartData.series.push({
-                  data: [],
-                  name: '',
-                  type: 'line',
-                  label: {
-                    show: true,
-                    position: 'top',
-                  },
-                })
+              if (res.data[0].deviceData.length === 1) {
+                if (lockLength < data[i].deviceData.length) {
+                  newLineChartData.series.push({
+                    data: [],
+                    name: '',
+                    type: 'line',
+                    label: {
+                      show: true,
+                      position: 'top',
+                    },
+                  })
+                }
               } else {
                 newLineChartData.series.push({
                   data: [],
@@ -295,6 +294,9 @@
               newLineChartData.series[j].data.push(
                 data[i].deviceData[j].sensorValue
               )
+
+
+
             }
             newLineChartData.xAxis.push(data[i].time)
           }

--
Gitblit v1.8.0