From 5bbcdadbb201985f7bafcc60bd679d9e6f0e4229 Mon Sep 17 00:00:00 2001
From: guoshipeng <3194674006@qq.com>
Date: Mon, 12 Dec 2022 13:24:57 +0800
Subject: [PATCH] 1.浑南区走航车报告下载;2.菜单分配可以选择某个子菜单,但必须选择实时风场页面;3.空气质量报告模板更新;

---
 src/views/charts/index.vue |   46 ++++++++++++++++++++++------------------------
 1 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/src/views/charts/index.vue b/src/views/charts/index.vue
index 4f4a0b9..31fb437 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
@@ -18,8 +18,8 @@
         style="margin-left: 20px"
       >
         <el-option
-          v-for="item in newSensor"
-          :key="item.value"
+          v-for="(item, index) in newSensor"
+          :key="index"
           :label="item.label"
           :value="item.value"
         />
@@ -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'
@@ -168,7 +168,6 @@
       }
       // ������������������������������������������
       this.getSensor()
-      console.log(this.newMac1)
     },
     // ������dataType���������������
     select1(nv, ov) {
@@ -267,25 +266,23 @@
       })
         .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++) {
-             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) {
+              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 +292,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