From 49f1db40efa2a03c0eada89abdfb9e9bd779f64c Mon Sep 17 00:00:00 2001
From: yupan <yupanx@163.com>
Date: Mon, 07 Nov 2022 16:05:09 +0800
Subject: [PATCH] 易晨曦提交1、监测因子趋势页面修改时间控件 2、监测因子对比修改echarts显示

---
 src/views/charts/index.vue |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/views/charts/index.vue b/src/views/charts/index.vue
index 4f4a0b9..6ccbfaa 100644
--- a/src/views/charts/index.vue
+++ b/src/views/charts/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <div style="width: 100%;height:100%">
+  <div style="width: 100%; height: 100%">
     <div class="topSelect">
       <!-- <el-cascader v-model="newMac" :options="options" clearable change-on-select :props="{ checkStrictly: true }" placeholder="������������" /> -->
       <el-cascader
@@ -65,7 +65,7 @@
 // ���������������������������������������������������������js������������������js���json������������������������������
 // ���������import������������������from'������������������';
 
-import LineChart from '@/components/Echarts/LineChart'
+import LineChart from '@/components/Echarts/LineChart2'
 import DatePicker from '@/components/Form/DatePicker'
 import MouthPicker from '@/components/Form/MouthPicker'
 import HourPicker from '@/components/Form/HourPicker'
@@ -272,20 +272,20 @@
           let lockLength = 0
           for (let i = 0; i < data.length; i++) {
             for (let j = 0; j < data[i].deviceData.length; j++) {
-             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 if (lockLength < data[i].deviceData.length) {
+              console.log(data[i].deviceData);
+              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 if (lockLength < data[i].deviceData.length) {
                 newLineChartData.series.push({
                   data: [],
                   name: '',
@@ -295,16 +295,17 @@
                     position: 'top',
                   },
                 })
-                newLineChartData.series[j].name = data[i].deviceData[j].name
-                newLineChartData.title.push(data[i].deviceData[j].name)
               }
+              newLineChartData.series[j].name = data[i].deviceData[j].name
+              newLineChartData.title.push(data[i].deviceData[j].name)
               lockLength++
               newLineChartData.series[j].data.push(
                 data[i].deviceData[j].sensorValue
               )
+
+            
+
             }
-             
-             
             newLineChartData.xAxis.push(data[i].time)
           }
           // newLineChartData.title = this.value

--
Gitblit v1.8.0