From 136f8362fb2af4cf98e5593809769821b5dd2c2f Mon Sep 17 00:00:00 2001
From: guoshipeng <3194674006@qq.com>
Date: Mon, 31 Jul 2023 14:39:36 +0800
Subject: [PATCH] fix:loading框加载,样式修改

---
 src/views/UVA/index.vue |  132 +++++++++++++++++++++++++++++++++----------
 1 files changed, 101 insertions(+), 31 deletions(-)

diff --git a/src/views/UVA/index.vue b/src/views/UVA/index.vue
index 045d9bc..49aeb6b 100644
--- a/src/views/UVA/index.vue
+++ b/src/views/UVA/index.vue
@@ -14,7 +14,7 @@
             v-model="datenum"
             @change="chooseDate"
             @blur="chooseDate1"
-            @focus="chooseDate"
+            @focus="chooseDate2"
             value-format="yyyy-MM-dd"
             style="width: 280px"
           >
@@ -47,6 +47,7 @@
             accordion
             style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)"
             v-show="shou1 === true"
+            v-loading="loading"
           >
             <el-collapse-item
               style="text-indent: 2em; position: relative; padding-botton: 10px"
@@ -71,6 +72,7 @@
             @change="handleChange"
             ref="collapse"
             v-show="shou1 === false"
+            v-loading="loading"
           >
             <el-collapse-item
               v-for="(item1, index) in asideData.uavTimeFly"
@@ -131,6 +133,8 @@
               v-model="radioSeven"
               size="medium"
               @change="changeCode"
+              v-if="selecttrue === 1"
+              style="margin-top: 10px; margin-left: 10px"
             >
               <el-radio-button label="PM2.5"></el-radio-button>
               <el-radio-button label="PM10"></el-radio-button>
@@ -140,24 +144,78 @@
               <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> -->
+            <div class="Duo" v-if="selecttrue === 2">
+              <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>
+              <!-- <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>
+              <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="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 v-if="selecttrue === 1" style="margin-left: 10px">
-              <el-button type="primary" @click="gengD" class="gengD"
+              <el-button type="primary" @click="gengD" style="margin-top: 10px"
                 >������������</el-button
               >
             </div>
-            <div v-if="selecttrue === 2" style="margin-left: 10px">
+            <div
+              v-if="selecttrue === 2"
+              style="margin-left: 10px; margin-top: 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">
+          <!-- <div class="Duo" v-if="selecttrue === 2">
             <el-select v-model="Duovalue" placeholder="������������" class="slee">
               <el-option
                 v-for="item in optionsduo"
@@ -183,10 +241,10 @@
               --
               <el-input class="inputtu" v-model="talltwo" ref="uvas"></el-input>
             </div>
-          </div>
+          </div> -->
         </div>
         <!-- <div v-if="noneData" class="noneData">������������������������������</div> -->
-        <div id="map_container" v-loading="loading" />
+        <div id="map_container" v-loading="loading1" />
       </el-main>
     </el-container>
   </div>
@@ -406,7 +464,7 @@
       },
 
       tallone: 0,
-      talltwo: 500,
+      talltwo: 120,
       // ���������������
       asideData: {
         dates: [], // ������date������
@@ -441,6 +499,7 @@
       bdLon: null,
       bdLat: null,
       loading: false,
+      loading1: false,
       snesorParams: [
         'PM2.5',
         'PM10',
@@ -690,6 +749,7 @@
   },
   methods: {
     selectDuo() {
+      this.loading1 = true
       if (this.chosee === 1) {
         this.$message.warning('������������������������������������')
         return
@@ -705,8 +765,9 @@
         data: {
           batch: this.batchs,
           uvasize: this.uvasize,
-          height: 0,
           mac: this.macs,
+          height1: this.tallone,
+          height2: this.talltwo,
           // batch: '2023-06-16 16:21:21',
         },
       }).then((res) => {
@@ -714,7 +775,6 @@
         this.carData = []
         if (res.data === 'null') {
           this.noneData = true
-          this.loading = false
           return
         }
         for (var i = 0; i < res.data.length; i++) {
@@ -735,6 +795,11 @@
       this.getTimeAreaData(this.datenum)
       $('.coll').css('margin-top', '350px')
     },
+    chooseDate2() {
+      // this.$refs.datePick.focus() // ���������������������������������
+      // this.getTimeAreaData(this.datenum)
+      $('.coll').css('margin-top', '350px')
+    },
     chooseDate1() {
       $('.coll').css('margin-top', '10px')
       // this.$refs.datePick.focus() // ���������������������������������
@@ -745,12 +810,10 @@
       //   return
       // }
       this.selecttrue = 2
-      $('.dds').css({ height: '170px' })
-      $('.numss').css({ width: '750px' })
+      $('.numss').css({ width: '930px' })
     },
     shou() {
       this.selecttrue = 1
-      $('.dds').css({ height: '100px' })
       $('.numss').css({ width: '690px' })
     },
     parseTime(time, cFormat) {
@@ -887,6 +950,8 @@
     },
     // ���������������������������������
     getTimeAreaData(item) {
+      // this.asideData.uavTimeFly = []
+      this.loading = true
       this.$request({
         url: 'uav/queryTimeSlot',
         method: 'get',
@@ -898,13 +963,13 @@
         // console.log(res, 'res.data.vos')
         if (res.code === -47) {
           this.noneData = true
-          this.loading = false
           // this.asideData.uavTimeFly=res.message
           this.shou1 = true
         } else {
           this.shou1 = false
           this.asideData.uavTimeFly = res.data.vos
         }
+        this.loading = false
         // if (res.code === 0) {
         //   this.asideData.uavTimeFly = res.data.vos
         // }
@@ -931,6 +996,7 @@
       //   this.carData.push(this.xie.date[i])
       // }
       // this.initStart(this.carData)
+      this.loading1 = true
       this.asideData.activeKey = index
       this.chosee = 2
       this.batchs = item.batch
@@ -947,7 +1013,8 @@
         data: {
           batch: item.batch,
           uvasize: this.uvasize,
-          height: 0,
+          height1: this.tallone,
+          height2: this.talltwo,
           mac: mac,
           // batch: '2023-06-16 16:21:21',
         },
@@ -956,7 +1023,6 @@
         this.carData = []
         if (res.data === 'null') {
           this.noneData = true
-          this.loading = false
           return
         }
         for (var i = 0; i < res.data.length; i++) {
@@ -1003,7 +1069,6 @@
       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) // ���������������������������������
@@ -1050,7 +1115,7 @@
           ],
         })
         showNoPoints()
-
+        this.loading1 = false
         return
       }
       if (this.dataType === 'history') {
@@ -1062,7 +1127,6 @@
       // console.log('������snesor������������')
       // console.log(this.responseJSON)
       var trackPoints = []
-      this.loading = false
       if (this.responseJSON.length > 0) {
         this.noneData = false
         $.each(this.responseJSON, (item, value) => {
@@ -1082,6 +1146,8 @@
             lat = GPS.gcj_encrypt(lat, lng).lat
             lng = GPS.bd_encrypt(lat, lng).lon
             lat = GPS.bd_encrypt(lat, lng).lat
+            // lng = GPS.bd_decrypt(lat, lng).lon
+            // lat = GPS.bd_decrypt(lat, lng).lat
             var point = new BMapGL.Point(lng, lat)
             point.a34004 = parseInt(value.a34004)
             point.a34002 = parseInt(value.a34002)
@@ -1141,6 +1207,7 @@
             map: that.map,
           })
           that.firstPlayFlag = false
+          that.loading1 = false
         } else {
           this.view.removeAllLayers()
           this.map.clearOverlays()
@@ -1148,6 +1215,8 @@
           that.view = new mapvgl.View({
             map: that.map,
           })
+          that.loading1 = false
+
           // that.map.centerAndZoom(that.centerPoint, 18)
         }
       }
@@ -1279,6 +1348,7 @@
             }
           }
           points.push(point1)
+          // console.log(points, 'image.png')
           // if (flag) {
           //   points.push(point1)
           //   console.log(points, 'points')
@@ -1977,23 +2047,21 @@
   background-color: #f40;
 }
 .numss {
-  width: 690px;
+  width: 700px;
   background-color: white;
-  padding: 10px;
   margin-top: 17px;
   display: flex;
+  height: 60px;
 }
 /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;
@@ -2002,9 +2070,10 @@
   // background-color: white;
   // height: 40px;
   display: flex;
-  margin-left: 25px;
+  margin-left: 10px;
   line-height: 60px;
   font-weight: 5px;
+  color: #696b6f;
   .inputtu {
     width: 40%;
     margin-left: 5px;
@@ -2013,11 +2082,12 @@
 .slee {
   line-height: 60px;
   width: 100px;
+  margin-left: 25px;
 }
 .spantuu {
-  margin-left: 25px;
   width: 400px;
   line-height: 60px;
+  color: #696b6f;
   .inputtu {
     width: 20%;
   }

--
Gitblit v1.8.0