From 355b21bf4c5023a677e1f0347636518972da32a7 Mon Sep 17 00:00:00 2001
From: guoshipeng <3194674006@qq.com>
Date: Fri, 28 Jul 2023 16:01:43 +0800
Subject: [PATCH] fix

---
 src/views/UVA/index.vue |  826 ++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 510 insertions(+), 316 deletions(-)

diff --git a/src/views/UVA/index.vue b/src/views/UVA/index.vue
index ce60419..045d9bc 100644
--- a/src/views/UVA/index.vue
+++ b/src/views/UVA/index.vue
@@ -3,56 +3,26 @@
     <el-container style="height: 100%">
       <el-aside
         width="300px"
-        style="background-color: rgb(238, 241, 246); overflow-y: hidden"
+        style="background-color: rgb(238, 241, 246); overflow: hidden"
       >
-        <el-card class="box-card" style="width: 274px; margin: 13px auto">
-          <div slot="header" class="clearfix">
-            <div>
-              <img
-                style="float: left; width: 20px; margin: 15px 0 0 18px"
-                src="../../assets/images/uav/calendar.png"
-                alt=""
-              />
-              <span
-                style="
-                  display: inline-block;
-                  float: left;
-                  font-size: 16px;
-                  margin-left: 10px;
-                "
-                >���������������������</span
-              >
-            </div>
-          </div>
-          <el-scrollbar
-            v-if="asideData.dates.length > 0"
-            style="height: 200px; overflow-x: hidden"
-            class="text item"
+        <div style="width: 274px; margin: 13px auto">
+          <el-date-picker
+            :picker-options="pickerOptions"
+            placeholder="������������"
+            popper-class="jlpMySelectPopper"
+            ref="datePick"
+            v-model="datenum"
+            @change="chooseDate"
+            @blur="chooseDate1"
+            @focus="chooseDate"
+            value-format="yyyy-MM-dd"
+            style="width: 280px"
           >
-            <div
-              v-for="(item, index) in asideData.dates"
-              class="per-date"
-              :class="{ active: asideData.activeKey === index }"
-              @click="getTimeAreaData(item, index)"
-              :key="index"
-            >
-              <img
-                style="float: left; width: 14px; margin: 18px 0 0 0"
-                src="../../assets/images/uav/calendar.png"
-                alt=""
-              />
-              <span
-                style="
-                  display: inline-block;
-                  float: left;
-                  font-size: 14px;
-                  margin-left: 15px;
-                "
-                >{{ item }}</span
-              >
-            </div>
-          </el-scrollbar>
-          <div v-else style="height: 180px; width: 274px; overflow-x: hidden">
+          </el-date-picker>
+        </div>
+        <!-- <el-card class="box-card" style="width: 274px; margin: 13px auto"> -->
+
+        <!-- <div v-else style="height: 180px; width: 274px; overflow-x: hidden">
             <div
               style="
                 width: 272px;
@@ -65,21 +35,48 @@
             >
               ���������������
             </div>
-          </div>
-        </el-card>
-        <div style="width: 274px; margin: 13px auto; border-radius: 8px">
+          </div> -->
+        <!-- </el-card> -->
+
+        <div
+          style="width: 274px; margin: 10px auto; border-radius: 8px"
+          class="coll"
+        >
           <!--accordion ���������������-->
+          <el-collapse
+            accordion
+            style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)"
+            v-show="shou1 === true"
+          >
+            <el-collapse-item
+              style="text-indent: 2em; position: relative; padding-botton: 10px"
+            >
+              <template slot="title">
+                <img
+                  style="position: absolute; left: 18px"
+                  src="../../assets/images/uav/uav.png"
+                />
+                <span
+                  style="display: inline-block; position: absolute; left: 20px"
+                >
+                  ������������������������������</span
+                >
+              </template>
+            </el-collapse-item>
+          </el-collapse>
           <el-collapse
             v-model="asideData.activeNames"
             accordion
             style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)"
             @change="handleChange"
+            ref="collapse"
+            v-show="shou1 === false"
           >
             <el-collapse-item
               v-for="(item1, index) in asideData.uavTimeFly"
               :key="index"
               :name="index"
-              style="text-indent: 2em; position: relative"
+              style="text-indent: 2em; position: relative; padding-botton: 10px"
             >
               <template slot="title">
                 <img
@@ -97,8 +94,8 @@
                   v-for="(item, index) in item1.timeSlot"
                   :key="index"
                   class="per-date_area"
-                  :class="{ activeArea: asideData.activeAreaKey === index }"
-                  @click="getFlyData(item, index)"
+                  :class="{ activeArea: asideData.activeKey === index }"
+                  @click="getFlyData(item, index, item1.mac)"
                 >
                   <div style="width: 100%; margin: 0 auto">
                     <span>{{
@@ -108,6 +105,7 @@
                     <span>{{
                       item.endTime.substr(11, item.startTime.length)
                     }}</span>
+                    <span> ({{ item.total }}���) </span>
                   </div>
                 </div>
               </el-scrollbar>
@@ -121,36 +119,73 @@
             position: fixed;
             z-index: 20;
             padding-left: 20px;
-            height: 75px;
-            line-height: 80px;
+            height: 100px;
             width: 100%;
             font-size: 18px;
-            font-weight: bold;
             background-color: rgba(192, 192, 192, 0.4);
           "
+          class="dds"
         >
-          <el-radio-group
-            v-model="radioSeven"
-            size="medium"
-            @change="changeCode"
-          >
-            <el-radio-button label="PM2.5"></el-radio-button>
-            <el-radio-button label="PM10"></el-radio-button>
-            <el-radio-button label="SO2"></el-radio-button>
-            <el-radio-button label="NO2"></el-radio-button>
-            <el-radio-button label="CO"></el-radio-button>
-            <el-radio-button label="03"></el-radio-button>
-            <el-radio-button label="TVOC"></el-radio-button>
-          </el-radio-group>
-          <el-input
+          <div class="numss">
+            <el-radio-group
+              v-model="radioSeven"
+              size="medium"
+              @change="changeCode"
+            >
+              <el-radio-button label="PM2.5"></el-radio-button>
+              <el-radio-button label="PM10"></el-radio-button>
+              <el-radio-button label="SO2"></el-radio-button>
+              <el-radio-button label="NO2"></el-radio-button>
+              <el-radio-button label="CO"></el-radio-button>
+              <el-radio-button label="03"></el-radio-button>
+              <el-radio-button label="TVOC"></el-radio-button>
+            </el-radio-group>
+            <!-- <el-input
             placeholder="���������������"
             v-model="uvasize"
             class="inputNum"
             clearable
           >
-          </el-input>
+          </el-input> -->
+            <div v-if="selecttrue === 1" style="margin-left: 10px">
+              <el-button type="primary" @click="gengD" class="gengD"
+                >������������</el-button
+              >
+            </div>
+            <div v-if="selecttrue === 2" style="margin-left: 10px">
+              <el-button class="gengD" @click="shou">������</el-button>
+              <el-button type="primary" @click="selectDuo">������</el-button>
+            </div>
+          </div>
+          <div class="Duo" v-if="selecttrue === 2">
+            <el-select v-model="Duovalue" placeholder="������������" class="slee">
+              <el-option
+                v-for="item in optionsduo"
+                :key="item.code"
+                :label="item.name"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
+            <div class="spantu">
+              <span>������������(���): </span
+              ><el-input
+                class="inputtu"
+                v-model="uvasize"
+                clearable
+                placeholder="���������������"
+                ref="uvas"
+              ></el-input>
+            </div>
+            <div class="spantuu">
+              <span>���������������������������(���): </span>
+              <el-input class="inputtu" v-model="tallone" ref="uvas"></el-input>
+              --
+              <el-input class="inputtu" v-model="talltwo" ref="uvas"></el-input>
+            </div>
+          </div>
         </div>
-        <div v-if="noneData" class="noneData">������������������������������</div>
+        <!-- <div v-if="noneData" class="noneData">������������������������������</div> -->
         <div id="map_container" v-loading="loading" />
       </el-main>
     </el-container>
@@ -161,6 +196,7 @@
 import json from '@/assets/json/sensor.json'
 import $ from 'jquery'
 import '@/assets/icon/iconfont.css'
+import moment from 'moment'
 
 var GPS = {
   PI: 3.14159265358979324,
@@ -352,12 +388,31 @@
   },
   data() {
     return {
+      chosee: 1,
+      shou1: true,
+      zhanK1: 1,
+      zhanK: 1,
+      Duovalue: '',
+      datenum: new Date(),
+      // orderTime:[Date('2020-06-19'),Date('2021-06-19')]
+      selecttrue: 1,
+      pickerOptions: {
+        cellClassName: (time) => {
+          let timeDate = moment(time.getTime()).format('yyyy-MM-DD')
+          if (this.timeNums.includes(timeDate)) {
+            return 'dateArrClass' // ������������������������������������������
+          }
+        },
+      },
+
+      tallone: 0,
+      talltwo: 500,
       // ���������������
       asideData: {
         dates: [], // ������date������
         activeNames: [0],
         uavTimeFly: [], // ���������������������������������������������
-        activeKey: 0,
+        activeKey: -1,
         activeAreaKey: 0,
       },
       load: 1,
@@ -372,6 +427,7 @@
         { code: 'a05024', name: 'O3' },
         { code: 'a99054', name: 'TVOC' },
       ],
+      valuetime: '2023-01-01',
       defautRadio: { code: 'a34004', name: 'PM2.5' },
       Layler: null, // ������������
       textMarkers: { code: '', markers: [] }, // ������������������
@@ -384,7 +440,7 @@
       radioSeven: 'PM2.5',
       bdLon: null,
       bdLat: null,
-      loading: true,
+      loading: false,
       snesorParams: [
         'PM2.5',
         'PM10',
@@ -404,35 +460,6 @@
       radio1: null,
       viewOptions: ['������', '������'],
       dateValue: [],
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now()
-        },
-        shortcuts: [
-          {
-            text: '������',
-            onClick(picker) {
-              picker.$emit('pick', new Date())
-            },
-          },
-          {
-            text: '������',
-            onClick(picker) {
-              const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24)
-              picker.$emit('pick', date)
-            },
-          },
-          {
-            text: '���������',
-            onClick(picker) {
-              const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
-              picker.$emit('pick', date)
-            },
-          },
-        ],
-      },
       timeOne: '',
       threeOptions: {
         onPick: ({ maxDate, minDate }) => {
@@ -457,10 +484,31 @@
         },
       },
       sensorDate: null,
-      noneData: false,
+      noneData: true,
       defaultData: [],
       carMac: null,
       dialogFormVisible: false,
+      optionsduo: [
+        { code: 'a34004', name: 'PM2.5' },
+        { code: 'a34002', name: 'PM10' },
+        { code: 'a21026', name: 'SO2' },
+        { code: 'a21004', name: 'NO2' },
+        { code: 'a21005', name: 'CO' },
+        { code: 'a05024', name: 'O3' },
+        { code: 'a99054', name: 'TVOC' },
+        {
+          code: 'a01006',
+          name: '������',
+        },
+        {
+          code: 'a01001',
+          name: '������',
+        },
+        {
+          code: 'a01002',
+          name: '������',
+        },
+      ],
       sensorTableData: [
         {
           sensorName: 'PM2.5',
@@ -542,6 +590,19 @@
           tab5: '20000',
           tab6: '50000',
         },
+
+        {
+          sensorName: '������',
+          unit: 'hpa',
+        },
+        {
+          sensorName: '������',
+          unit: '%',
+        },
+        {
+          sensorName: '������',
+          unit: '���',
+        },
       ],
       carWs: null,
       map: null,
@@ -558,92 +619,6 @@
       firstPlayFlag: true,
       firstWsFlag: true,
       msgTemp: [],
-      luvalue: {
-        nnn: [
-          // {
-          //   value:
-          //     '{"flylon":"123.43845599999999 ��","flylat":"41.69658300039269 ��","a34004":"8 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69568400039269 ��","a34004":"7 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69523400039269 ��","a34004":"6 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69478400039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69433500039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69388500039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.692986000392686 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69343500039268 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69478400039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69523400039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69568400039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69568400039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43905875000087 ��","flylat":"41.69658300039335 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.69253600039269 ��","a34004":"65 mg/m��"}',
-          // },
-          // {
-          //   value:
-          //     '{"flylon":"123.43725199999999 ��","flylat":"41.692986000392686 ��","a34004":"65 mg/m��"}',
-          // },
-
-          {
-            value:
-              '{"flylon":"123.4369507 ��","flylat":"41.6968079 ��","a34004":"65 mg/m��"}',
-          },
-          {
-            value:
-              '{"flylon":"123.4369507 ��","flylat":"41.6991119 ��","a34004":"65 mg/m��"}',
-          },
-          {
-            value:
-              '{"flylon":"123.431427 ��","flylat":"41.6968079 ��","a34004":"65 mg/m��"}',
-          },
-          {
-            value:
-              '{"flylon":"123.431427 ��","flylat":"41.6991119 ��","a34004":"65 mg/m��"}',
-          },
-          {
-            value:
-              '{"flylon":"123.4334869 ��","flylat":"41.6990967 ��","a34004":"70 mg/m��"}',
-          },
-        ],
-        nums: 5,
-      },
       dataTypeList: [
         {
           value: 'history',
@@ -671,9 +646,15 @@
         new Date(2020, 1, 1, 0, 0, 0),
         new Date(2022, 12, 31, 23, 59, 59),
       ],
+      timeNums: [],
+      batchs: '',
+      macs: '',
     }
   },
+
   mounted() {
+    this.initStart()
+    // this.$refs.datePick.focus()
     // this.getDate()
     // this.flyData()
   },
@@ -704,24 +685,114 @@
     this.newTime(this.timeValue)
     this.newDate()
     this.getDate()
-    // this.$watch('carMac', () => {
-    // })
-    // var c = {}
-    // var cc = []
-    // for (var i = 0; i < this.luvalue.nnn.length; i++) {
-    //   this.luvalue.nnn[i].value = JSON.parse(this.luvalue.nnn[i].value)
-    //   cc.push(this.luvalue.nnn[i].value)
-    //   console.log(cc)
-    //   for (let item of cc) {
-    //     console.log(item)
-    //   }
-    // for (var j = 0; j < this.luvalue.nnn[i].value.length; j++) {
-    //   console.log(j)
-    //   console.log(parseFloat(this.luvalue.nnn[i].value.flylat))
-    // c.push(parseFloat(this.luvalue.nnn[i].value[j].flylat)+0.00048)
-    // }
+
+    // this.getFlyData()
   },
   methods: {
+    selectDuo() {
+      if (this.chosee === 1) {
+        this.$message.warning('������������������������������������')
+        return
+      }
+      if (this.view) {
+        this.view.removeAllLayers()
+        this.map.clearOverlays()
+      }
+      this.$request({
+        // url: '/uav/queryDataByBatch',
+        url: '/uav/test',
+        method: 'post',
+        data: {
+          batch: this.batchs,
+          uvasize: this.uvasize,
+          height: 0,
+          mac: this.macs,
+          // batch: '2023-06-16 16:21:21',
+        },
+      }).then((res) => {
+        // console.log(res)
+        this.carData = []
+        if (res.data === 'null') {
+          this.noneData = true
+          this.loading = false
+          return
+        }
+        for (var i = 0; i < res.data.length; i++) {
+          res.data[i].flyLat = res.data[i].flyLat + ' ��'.toString()
+          res.data[i].flyLon = res.data[i].flyLon + ' ��'.toString()
+          // res.data[i].a34004 = Math.floor(Math.random() * 100 + 1)
+          this.carData.push(res.data[i])
+        }
+        if (this.Duovalue != '') {
+          this.radioSeven = ''
+        }
+        this.changeCode(this.Duovalue)
+        this.initStart(this.carData)
+      })
+    },
+    chooseDate() {
+      // this.$refs.datePick.focus() // ���������������������������������
+      this.getTimeAreaData(this.datenum)
+      $('.coll').css('margin-top', '350px')
+    },
+    chooseDate1() {
+      $('.coll').css('margin-top', '10px')
+      // this.$refs.datePick.focus() // ���������������������������������
+    },
+    gengD() {
+      // if (this.zhanK === 1) {
+      //   this.$message.warning('���������������������������������������')
+      //   return
+      // }
+      this.selecttrue = 2
+      $('.dds').css({ height: '170px' })
+      $('.numss').css({ width: '750px' })
+    },
+    shou() {
+      this.selecttrue = 1
+      $('.dds').css({ height: '100px' })
+      $('.numss').css({ width: '690px' })
+    },
+    parseTime(time, cFormat) {
+      if (arguments.length === 0 || !time) {
+        return null
+      }
+      const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
+      let date
+      if (typeof time === 'object') {
+        date = time
+      } else {
+        if (typeof time === 'string') {
+          if (/^[0-9]+$/.test(time)) {
+            time = parseInt(time)
+          } else {
+            time = time.replace(new RegExp(/-/gm), '/')
+          }
+        }
+
+        if (typeof time === 'number' && time.toString().length === 10) {
+          time = time * 1000
+        }
+        date = new Date(time)
+      }
+      const formatObj = {
+        y: date.getFullYear(),
+        m: date.getMonth() + 1,
+        d: date.getDate(),
+        h: date.getHours(),
+        i: date.getMinutes(),
+        s: date.getSeconds(),
+        a: date.getDay(),
+      }
+      const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
+        const value = formatObj[key]
+        if (key === 'a') {
+          return ['���', '���', '���', '���', '���', '���', '���'][value]
+        }
+        return value.toString().padStart(2, '0')
+      })
+      return time_str
+    },
     newTime2(timeArr) {
       var arr = []
       timeArr.map((v) => {
@@ -815,9 +886,7 @@
       }
     },
     // ���������������������������������
-    getTimeAreaData(item, index) {
-      this.asideData.activeAreaKey = -1
-      this.asideData.activeKey = index
+    getTimeAreaData(item) {
       this.$request({
         url: 'uav/queryTimeSlot',
         method: 'get',
@@ -826,12 +895,14 @@
           date: item,
         },
       }).then((res) => {
-        console.log(res.data.vos.length, 'res.data.vos')
-        if (res.data.vos.length == 0) {
+        // console.log(res, 'res.data.vos')
+        if (res.code === -47) {
           this.noneData = true
           this.loading = false
-          return false
+          // this.asideData.uavTimeFly=res.message
+          this.shou1 = true
         } else {
+          this.shou1 = false
           this.asideData.uavTimeFly = res.data.vos
         }
         // if (res.code === 0) {
@@ -852,9 +923,18 @@
       this.addLayers(item)
     },
     // ���������������
-    getFlyData(item, index) {
-      console.log(index, 'index')
-      console.log(item.batch)
+    getFlyData(item, index, mac) {
+      // for (var i = 0; i < this.xie.date.length; i++) {
+      //   this.xie.date[i].flyLat = this.xie.date[i].flyLat + ' ��'.toString()
+      //   this.xie.date[i].flyLon = this.xie.date[i].flyLon + ' ��'.toString()
+      //   this.xie.date[i].a34004 = this.xie.date[i].a34004
+      //   this.carData.push(this.xie.date[i])
+      // }
+      // this.initStart(this.carData)
+      this.asideData.activeKey = index
+      this.chosee = 2
+      this.batchs = item.batch
+      this.macs = mac
       this.noneData = false
       if (this.view) {
         this.view.removeAllLayers()
@@ -863,14 +943,16 @@
       this.$request({
         // url: '/uav/queryDataByBatch',
         url: '/uav/test',
-        method: 'get',
-        params: {
-          // batch: item.batch,
+        method: 'post',
+        data: {
+          batch: item.batch,
           uvasize: this.uvasize,
+          height: 0,
+          mac: mac,
           // batch: '2023-06-16 16:21:21',
         },
       }).then((res) => {
-        console.log(res)
+        // console.log(res)
         this.carData = []
         if (res.data === 'null') {
           this.noneData = true
@@ -880,25 +962,11 @@
         for (var i = 0; i < res.data.length; i++) {
           res.data[i].flyLat = res.data[i].flyLat + ' ��'.toString()
           res.data[i].flyLon = res.data[i].flyLon + ' ��'.toString()
-          res.data[i].a34004 = Math.floor(Math.random() * 100 + 1)
+          // res.data[i].a34004 = Math.floor(Math.random() * 100 + 1)
           this.carData.push(res.data[i])
         }
         this.initStart(this.carData)
-        // if (res.data.vos.length) {
-        //   // for (var i = 0; i < this.luvalue.nums; i++) {
-        //   //   this.carData.push(JSON.parse(this.luvalue.nnn[i].value))
-        //   // }
-        //   //  for (var i = 0; i < res.data.vos.length; i++) {
-        //   //   this.carData.push(JSON.parse(res.data.vos[i].value))
-        //   // }
-
-        //   // this.carData.push(
-        //   //   JSON.parse(
-        //   //     '{"flylon":"123.516289 ��","flylat":"41.738213 ��","a21005":"0.045 mg/m��","a21004":"39 ug/m��","a21026":"8 ug/m��","flyhig":"1.4 m","a34002":"86 ug/m��","a99054":"0.008 mg/m��","a05024":"51 ug/m��","a34004":"64 ug/m��"}'
-        //   //   )
-        //   // )
-        //   this.initStart(this.carData)
-        // }
+        this.zhanK = 2
       })
     },
     // ������������������������������������������
@@ -911,25 +979,78 @@
         },
       }).then((res) => {
         this.asideData.dates = JSON.parse(JSON.stringify(res.data.datesStr))
+        this.timeNums = this.asideData.dates
         if (this.asideData.dates.length > 0) {
-          this.getTimeAreaData(this.asideData.dates[0], 0)
-          setTimeout(() => {
-            if (this.asideData.uavTimeFly[0].timeSlot) {
-              // console.log(
-              //   this.asideData.uavTimeFly[0].timeSlot,
-              //   'this.asideData.uavTimeFly[0].timeSlot[0]'
-              // )
-              this.getFlyData(this.asideData.uavTimeFly[0].timeSlot[0], 0)
-            }
-          }, 500)
+          this.getTimeAreaData(this.datenum, 0)
+          // this.datenum = this.asideData.dates[0]
+          // setTimeout(() => {
+          //   if (this.asideData.uavTimeFly[0].timeSlot) {
+          //     console.log(
+          //       this.asideData.uavTimeFly[0].timeSlot,
+          //       'this.asideData.uavTimeFly[0].timeSlot'
+          //     )
+          //     // console.log(
+          //     //   this.asideData.uavTimeFly[0].timeSlot,
+          //     //   'this.asideData.uavTimeFly[0].timeSlot[0]'
+          //     // )
+          //     this.getFlyData(this.asideData.uavTimeFly[0].timeSlot[0], 0, mac)
+          //   }
+          // }, 500)
         }
       })
     },
     initStart(res) {
-      console.log(res, 'res')
       this.abc += 1
       const that = this
       if (!res) {
+        console.log(1)
+        that.map = new BMapGL.Map('map_container')
+        that.map.enableScrollWheelZoom(true) // ������������������������������������������������������s
+        that.map.setMapType(BMAP_EARTH_MAP) // ���������������������������������
+        that.map.setDisplayOptions({
+          street: false, // ������������������������������������������������������������
+        })
+        that.map.setHeading(0) // ������������������
+        if (that.viewKey === '2D') {
+          that.map.setTilt(0) // ������������
+        } else {
+          that.map.setTilt(52)
+        }
+        that.map.setMapStyleV2({
+          styleJson: [
+            {
+              featureType: 'road',
+              elementType: 'all',
+              stylers: {
+                color: '#ffffff',
+                visibility: 'off',
+              },
+            },
+            {
+              featureType: 'building',
+              elementType: 'all',
+              stylers: {
+                visibility: 'off',
+              },
+            },
+            {
+              featureType: 'poilabel',
+              elementType: 'all',
+              stylers: {
+                visibility: 'off',
+              },
+            },
+            {
+              featureType: 'manmade',
+              elementType: 'all',
+              stylers: {
+                visibility: 'off',
+              },
+            },
+          ],
+        })
+        showNoPoints()
+
         return
       }
       if (this.dataType === 'history') {
@@ -966,20 +1087,13 @@
             point.a34002 = parseInt(value.a34002)
             point.a21026 = parseInt(value.a21026)
             point.a21004 = parseInt(value.a21004)
+            point.a01006 = parseInt(value.a01006)
+            point.a01001 = parseInt(value.a01001)
+            point.a01002 = parseInt(value.a01002)
             point.a21005 = parseFloat(value.a21005).toFixed(3)
             point.a05024 = parseInt(value.a05024)
             point.a99054 = parseFloat(value.a99054).toFixed(3)
-            if (
-              value.dustld - 0 !== 0 &&
-              value.dustld - 0 < 100 &&
-              (that.carMac === 'p5dnd7a0243622' ||
-                that.carMac === 'p5dnd7a0243625')
-            ) {
-              point.dustld = 100
-            } else {
-              point.dustld = value.dustld - 0
-            }
-            // point.dustld = value.dustld - 0
+            point.dustld = value.dustld - 0
             trackPoints.push(point)
           }
         })
@@ -988,54 +1102,22 @@
         that.size = this.uvasize
         that.distance = that.size / 2 / Math.sin((1 * Math.PI) / 4)
         // ���������������������������������
-        if (!that.showPoints) {
-          that.map = new BMapGL.Map('map_container')
-        }
-        that.map.enableScrollWheelZoom(true) // ������������������������������������������������������
-        that.map.setMapType(BMAP_EARTH_MAP) // ���������������������������������
-        that.map.setDisplayOptions({
-          street: false, // ������������������������������������������������������������
-        })
-        that.map.setHeading(20) // ������������������
-        if (that.viewKey === '2D') {
-          that.map.setTilt(0) // ������������
-        } else {
-          that.map.setTilt(52)
-        }
+        // if (!that.showPoints) {
+        //   console.log(111)
+        //   that.map = new BMapGL.Map('map_container')
+        // }
+        // that.map.enableScrollWheelZoom(true) // ������������������������������������������������������s
+        // that.map.setMapType(BMAP_EARTH_MAP) // ���������������������������������
+        // that.map.setDisplayOptions({
+        //   street: false, // ������������������������������������������������������������
+        // })
+        // that.map.setHeading(20) // ������������������
+        // if (that.viewKey === '2D') {
+        //   that.map.setTilt(0) // ������������
+        // } else {
+        //   that.map.setTilt(52)
+        // }
         // ������������������v3.0������������������������
-        that.map.setMapStyleV2({
-          styleJson: [
-            {
-              featureType: 'road',
-              elementType: 'all',
-              stylers: {
-                color: '#ffffff',
-                visibility: 'off',
-              },
-            },
-            {
-              featureType: 'building',
-              elementType: 'all',
-              stylers: {
-                visibility: 'off',
-              },
-            },
-            {
-              featureType: 'poilabel',
-              elementType: 'all',
-              stylers: {
-                visibility: 'off',
-              },
-            },
-            {
-              featureType: 'manmade',
-              elementType: 'all',
-              stylers: {
-                visibility: 'off',
-              },
-            },
-          ],
-        })
 
         // that.map.setDisplayOptions({
         //   // ������������������
@@ -1054,14 +1136,12 @@
         // console.log(that.mapZoom, 'that.mapZoom')
         that.centerPoint = that.viewport.center
         if (that.firstPlayFlag) {
-          console.log(that.mapZoom, that.centerPoint, '1')
           that.map.centerAndZoom(that.centerPoint, that.mapZoom)
           that.view = new mapvgl.View({
             map: that.map,
           })
           that.firstPlayFlag = false
         } else {
-          console.log(that.mapZoom, that.centerPoint, '2')
           this.view.removeAllLayers()
           this.map.clearOverlays()
           that.map.centerAndZoom(that.centerPoint, that.mapZoom)
@@ -1261,7 +1341,7 @@
 
         $.each(that.showPoints, function (index, value) {
           var sw = getPoint(225, value.lng, value.lat, that.distance)
-          var ne = getPoint(45, value.lng, value.lat, that.distance)
+          var ne = getPoint(45, value.lng, value.lat, 30)
           var polygon = []
           var point1 = []
           var point2 = []
@@ -1534,6 +1614,24 @@
               level = 6
             }
             break
+          case 'a01006':
+            if (data) {
+              color = '#00e400'
+              level = 1
+            }
+            break
+          case 'a01001':
+            if (data) {
+              color = '#00e400'
+              level = 1
+            }
+            break
+          case 'a01002':
+            if (data) {
+              color = '#00e400'
+              level = 1
+            }
+            break
           case 'dustld':
             if (data < levelData[7].tab1) {
               color = '#00e400'
@@ -1661,6 +1759,15 @@
         case 'TVOC':
           this.sensorKey = 'a99054'
           break
+        case '������':
+          this.sensorKey = 'a01002'
+          break
+        case '������':
+          this.sensorKey = 'a01001'
+          break
+        case '������':
+          this.sensorKey = 'a01006'
+          break
         case 'dustld':
           this.sensorKey = 'dustld'
           break
@@ -1680,7 +1787,7 @@
 }
 </script>
 
-<style  lang="scss" scoped>
+<style  lang="scss" >
 /deep/.BMap_cpyCtrl {
   display: none;
 }
@@ -1710,12 +1817,6 @@
   z-index: 10;
 }
 
-/deep/ .el-input__inner {
-  height: 40px;
-}
-/deep/ .el-picker-panel__body {
-  width: 280px;
-}
 .el-main {
   padding: 0;
   width: 100%;
@@ -1740,6 +1841,7 @@
   height: 38px;
   border-radius: 0;
   width: 80px;
+  line-height: 0.5;
 }
 .per-date {
   height: 50px;
@@ -1777,6 +1879,7 @@
 }
 .activeArea {
   background-color: #f5f7fa;
+  color: rgb(36, 36, 36);
 }
 /*������������*/
 .textShow {
@@ -1804,6 +1907,12 @@
 .per-text-data:nth-last-child(1) {
   padding-bottom: 8px;
 }
+.el-collapse {
+  border-top: 1px solid #ebeef5;
+  border-bottom: 1px solid #ebeef5;
+  width: 280px;
+}
+
 /deep/.el-scrollbar__wrap {
   overflow-x: hidden;
   //overflow-y: hidden;
@@ -1851,6 +1960,91 @@
   font-family: '������������';
 }
 /deep/.inputNum {
-  width: 5% !important;
+  width: 4% !important;
+}
+.dateArrClass {
+  position: relative;
+}
+.dateArrClass > div ::after {
+  content: '';
+  position: absolute;
+  right: 8px;
+  top: 23px;
+  width: 5px;
+  height: 5px;
+  border-radius: 50%;
+  z-index: 999;
+  background-color: #f40;
+}
+.numss {
+  width: 690px;
+  background-color: white;
+  padding: 10px;
+  margin-top: 17px;
+  display: flex;
+}
+/deep/.el-select {
+  width: 8% !important;
+}
+.Duo {
+  height: 60px;
+  display: flex;
+  overflow: hidden;
+  background-color: white;
+  width: 750px;
+  padding-left: 10px;
+  margin-top: 17px;
+}
+.spantu {
+  width: 190px;
+  // margin-top: 10px;
+  // margin-left: 20px;
+  // background-color: white;
+  // height: 40px;
+  display: flex;
+  margin-left: 25px;
+  line-height: 60px;
+  font-weight: 5px;
+  .inputtu {
+    width: 40%;
+    margin-left: 5px;
+  }
+}
+.slee {
+  line-height: 60px;
+  width: 100px;
+}
+.spantuu {
+  margin-left: 25px;
+  width: 400px;
+  line-height: 60px;
+  .inputtu {
+    width: 20%;
+  }
+}
+.jlpMySelectPopper.el-picker-panel {
+  width: 280px;
+  height: 330px;
+}
+.jlpMySelectPopper.el-date-picker table {
+  width: 88%;
+}
+.BMap_cpyCtrl {
+  display: none;
+}
+
+.anchorBL {
+  display: none;
+}
+.el-collapse-item__arrow.is-active {
+  -webkit-transform: rotate(90deg);
+  transform: rotate(90deg);
+  position: absolute;
+  top: -3px;
+  right: -3px;
+}
+/* ������������������������ x ��������������� */
+.el-scrollbar__wrap {
+  overflow-x: hidden;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0