From 60076cbbe1da6cc8ed3a4ebb8f67e92ea9be9e4a Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期二, 15 八月 2023 16:02:58 +0800
Subject: [PATCH] 设置按钮的加载效果

---
 src/views/analysis/graph/DayData.vue       |   26 +--
 dist.zip                                   |    0 
 components.d.ts                            |    4 
 src/views/analysis/graph/OnlineRate.vue    |   24 +--
 src/views/getdata/GetData.vue              |    1 
 src/views/IndexView.vue                    |    9 +
 src/views/analysis/graph/AllRate.vue       |    8 +
 src/views/analysis/graph/PuOpeningRate.vue |   22 +--
 src/views/ExceedingFume.vue                |  112 +++++++-----------
 src/views/HistoryFume.vue                  |   12 +
 src/views/analysis/HomePage.vue            |   48 ++++---
 src/views/analysis/graph/ExceedingRate.vue |   21 +--
 src/views/analysis/graph/DayAverage.vue    |   21 +--
 13 files changed, 137 insertions(+), 171 deletions(-)

diff --git a/components.d.ts b/components.d.ts
index 8275814..a58c31f 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -71,16 +71,12 @@
     IEpHistogram: typeof import('~icons/ep/histogram')['default']
     IEpInfoFilled: typeof import('~icons/ep/info-filled')['default']
     IEpLock: typeof import('~icons/ep/lock')['default']
-    IEpMoney: typeof import('~icons/ep/money')['default']
     IEpMonitor: typeof import('~icons/ep/monitor')['default']
-    IEpNotebook: typeof import('~icons/ep/notebook')['default']
     IEpSearch: typeof import('~icons/ep/search')['default']
     IEpSetting: typeof import('~icons/ep/setting')['default']
-    IEpShop: typeof import('~icons/ep/shop')['default']
     IEpStopwatch: typeof import('~icons/ep/stopwatch')['default']
     IEpTrendCharts: typeof import('~icons/ep/trend-charts')['default']
     IEpUser: typeof import('~icons/ep/user')['default']
-    IEpWindPower: typeof import('~icons/ep/wind-power')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
   }
diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..bb699bf
--- /dev/null
+++ b/dist.zip
Binary files differ
diff --git a/src/views/ExceedingFume.vue b/src/views/ExceedingFume.vue
index 1e65022..ffbb091 100644
--- a/src/views/ExceedingFume.vue
+++ b/src/views/ExceedingFume.vue
@@ -12,7 +12,6 @@
         </ExceptionType>
 
         <TimeSelect @submit-time="giveTime"></TimeSelect>
-        <!-- </div> -->
       </div>
       <div
         ref="h2"
@@ -244,10 +243,9 @@
           </el-card>
         </el-collapse-item>
       </el-collapse>
-      <!-- <hr/>
- <br> -->
+
       <h4 class="table-text">寮傚父鏁版嵁</h4>
-      <!--  -->
+
     </el-col>
   </el-row>
   <el-card class="table-page" v-show="!isNoData">
@@ -354,13 +352,15 @@
         <div class="dialog-button-position">
           <el-button
             type="danger"
-            :disabled="isPreCantouch"
+            :loading="button.preButton"
+            :disabled="isPreCantouch || banTouch"
             @click="getPreviousRowData"
             >涓婃潯寮傚父</el-button
           >
           <el-button
             type="danger"
-            :disabled="isNextCantouch"
+            :loading="button.afterButton"
+            :disabled="isNextCantouch || banTouch"
             @click="getNextRowData"
             >涓嬫潯寮傚父</el-button
           >
@@ -451,6 +451,16 @@
   },
   data() {
     return {
+      button:{
+        // 鏌ヨ鎸夐挳
+        queryButton:false,
+        // 涓婁竴鏉℃寜閽�
+        preButton:false,
+        // 涓嬩竴鏉℃寜閽�
+        afterButton:false,
+        // 
+        banTouch:0
+      },
       // 寮傚父鎶樼嚎鍥剧殑閰嶇疆
       option: {},
       // 鎶樼嚎鍥惧睍绀�
@@ -659,7 +669,6 @@
           let current = timePoints[i];
           let next = timePoints[i + 1];
           while (this.isTimeDifferenceGreaterThan10Minutes(current, next)) {
-            console.log('generateTimePoints');
             current = dayjs(current)
               .add(10, 'minute')
               .format('YYYY-MM-DD HH:mm:ss');
@@ -688,7 +697,6 @@
       const year2 = date2.getFullYear();
       const month2 = date2.getMonth();
       const day2 = date2.getDate();
-      console.log(month1, month2);
 
       // 鍒ゆ柇涓や釜鏃ユ湡鏄惁鐩稿樊涓�涓湀
       if (year1 === year2) {
@@ -798,6 +806,9 @@
     getNextRowData() {
       // 涓嶆槸琛ㄦ牸鐨勭涓�琛�
       if (this.selectedRowIndex !== 0) {
+        // 璁剧疆涓婁笅鏉℃寜閽笉鍙偣鍑�
+        this.banTouch = 1
+
         //寰楀埌涓婁竴琛屾暟鎹储寮�
         this.selectedRowIndex = this.selectedRowIndex - 1;
         //璇锋眰鏁版嵁 鏀瑰彉exceedingData
@@ -813,32 +824,35 @@
         if (this.drawerData.endTime) {
           params['endTime'] = this.displayData[this.selectedRowIndex].endTime;
         }
-
+        this.button.afterButton = true
         axiosInstanceInstance
           .get('/fume/exceed', { params: params })
           .then((response) => {
             // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹�
             this.exceedingData = response.data.data;
-            // this.chart = null;
-            // this.drawChart();
             this.drawChartTest();
             this.exceptionTotal = this.exceedingData.length;
+            this.button.afterButton = false
+
+            this.banTouch = 0
+
           });
       }
-      //琛ㄦ牸鐨勭涓�琛岋紝鍒欎笂涓�鏉℃棤鏁版嵁
-      else {
-        console.log(null);
-      }
+      // //琛ㄦ牸鐨勭涓�琛岋紝鍒欎笂涓�鏉℃棤鏁版嵁
+      // else {
+      //   console.log(null);
+      // }
     },
 
     // 鑾峰彇鑾峰彇琛ㄦ牸涓嬩竴琛屾暟鎹�
     getPreviousRowData() {
       // 涓嶆槸琛ㄦ牸鐨勭涓�琛�
       if (this.selectedRowIndex < this.displayData.length - 1) {
-        //寰楀埌涓婁竴琛屾暟鎹储寮�
+        // 璁剧疆涓婁笅鏉℃寜閽笉鍙偣鍑�
+        this.banTouch = 1
 
+        //寰楀埌涓婁竴琛屾暟鎹储寮�
         this.selectedRowIndex = this.selectedRowIndex + 1;
-        console.log('涓�', this.selectedRowIndex);
 
         //璇锋眰鏁版嵁 鏀瑰彉exceedingData
         this.setinfo(this.selectedRowIndex);
@@ -853,20 +867,24 @@
         if (this.drawerData.endTime) {
           params['endTime'] = this.displayData[this.selectedRowIndex].endTime;
         }
+        this.button.preButton = true
         axiosInstanceInstance
           .get('/fume/exceed', { params: params })
           .then((response) => {
             // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹�
             this.exceedingData = response.data.data;
-            console.log(this.exceedingData);
             this.drawChartTest();
             this.exceptionTotal = this.exceedingData.length;
+            this.button.preButton = false
+
+          
+            this.banTouch = 0
           });
       }
       //琛ㄦ牸鐨勭涓�琛岋紝鍒欎笂涓�鏉℃棤鏁版嵁
-      else {
-        console.log(null);
-      }
+      // else {
+      //   console.log(null);
+      // }
     },
 
     // 鈥樻煡鐪嬭鎯呪�� 寮瑰嚭妗嗛儴鍒�
@@ -916,8 +934,7 @@
       if (this.exceptionValue.length != 0) {
         params['exceptionValue'] = this.exceptionValue.join();
       }
-      console.log('鍘�', this.exceptionValue);
-      console.log('澶勭悊', this.exceptionValue.join());
+
       if (this.beginTime) {
         params['beginTime'] = this.beginTime;
       }
@@ -925,12 +942,14 @@
         params['endTime'] = this.endTime;
       }
       this.loading = true;
+      this.button.queryButton = true
       axiosInstanceInstance
         .get('/fume/abnormalthree', { params: params })
         .then((response) => {
           this.abnormalData = response.data.data;
           this.total = this.abnormalData.length;
           this.loading = false;
+          this.button.queryButton = false
           if (response.data.data.length == 0) {
             ElMessage('璇ユ椂娈垫棤鏁版嵁');
             this.isNoData = true;
@@ -939,8 +958,7 @@
           // 绉婚櫎绌烘暟鎹姸鎬�
           this.isNoData = false;
           this.handleCurrentChange(1);
-          console.log('杩斿洖鐨勬暟鎹�', this.abnormalData);
-          console.log('闀垮害', response.data.data.total);
+
         });
     },
     handleSizeChange(val) {
@@ -964,7 +982,6 @@
       // 璁$畻缁撴潫鏃堕棿鍑忓幓寮�濮嬫椂闂翠腑闂寸浉宸灏戜釜鍗佸垎閽�
       const diffInMinutes = end.diff(start, 'minute');
       const diffInTenMinutes = Math.floor(diffInMinutes / 10);
-      console.log('鍑犱釜10鍒嗛挓', diffInTenMinutes);
       return diffInTenMinutes;
     },
 
@@ -1317,13 +1334,11 @@
         .get('/fume/history', { params: paramsBefore })
         .then((result1) => {
           this.beforeData = result1.data.data;
-          console.log('beforeData:', this.beforeData);
           // 璇锋眰鍚庡崐娈�
           axiosInstanceInstance
             .get('/fume/history', { params: paramsAfter })
             .then((result2) => {
               this.afterData = result2.data.data;
-              console.log('afterData:', this.afterData);
               //淇濆瓨寮傚父鍖洪棿鐨勫��
               let tempArr = [];
               // 淇濆瓨寮傚父鍖洪棿鍓嶅悗鐨勫��
@@ -1351,7 +1366,6 @@
 
                 after = this.shallowCopyList(this.afterData);
                 // after = this.afterData
-                console.log('after:', after);
               }
               // 瓒呮爣
               else {
@@ -1381,7 +1395,6 @@
 
               // 灏嗗墠鍚庡尯闂存暟鎹� 涓� 寮傚父鍖洪棿鏁版嵁 鍚堝苟
               this.allExceptionTimeData = [...before, ...tempArr, ...after];
-              console.log('缁勫悎鏁版嵁锛�', this.allExceptionTimeData);
               // x杞存棩鏈熸椂闂�
               let dateList = [];
               // y杞� 瓒呮爣娌圭儫娴撳害
@@ -1397,9 +1410,6 @@
 
               dateList = timeAndValue['xAxis'];
               fumeExceeding = timeAndValue['yAxis'];
-
-              console.log('dateList:', dateList);
-              console.log('fumeExceeding:', fumeExceeding);
 
               // 鎻愬彇寮傚父璧峰鏃堕棿鐐瑰湪鏁翠釜鍖洪棿鍐呯殑鏁版嵁绱㈠紩
               let startIndex = dateList.findIndex(
@@ -1457,7 +1467,6 @@
             ]
           };
         });
-        console.log(this.optionsShop);
       });
     },
     exportDom() {
@@ -1511,8 +1520,6 @@
         })
         .then((result) => {
           this.exception0 = result.data.data;
-          console.log('寮傚父0', this.exception0);
-          console.log('寮傚父0鏁伴噺', this.exception0.length);
         });
       axiosInstanceInstance
         .get('/fume/shopname', {
@@ -1542,7 +1549,6 @@
     getRecentSevenDays() {
       // 缁欑骇鑱旈�夋嫨鍣ㄨ缃粯璁ょ殑閫夋嫨椤�
       this.devId = ['浠樺皬濮愬湪鎴愰兘', 'qinshi_31010320210010'];
-      console.log(this.currentDateTime, this.oneWeekAgoDateTime);
       let params = {};
       params['beginTime'] = this.beginTime;
       params['endTime'] = this.endTime;
@@ -1567,13 +1573,7 @@
 </script>
 
 <style scoped>
-/* .exception-root-container {
-  margin: 20px;
-  padding: 10px;
-  border: 1px;
-  height: 615px;
 
-} */
 .header-container {
   display: flex;
   margin-left: 20px;
@@ -1609,8 +1609,6 @@
 /* 寮傚父鍒嗘瀽鏁版嵁涓庢寜閽� */
 .exception-container {
   display: flex;
-  /* direction: column; */
-  /* flex-grow: 2,1; */
 }
 .example-showcase .el-loading-mask {
   z-index: 9;
@@ -1632,7 +1630,6 @@
   font-size: 18px;
 }
 .collapse-header-text {
-  /* margin-right: 150px; */
   margin-top: 5px;
   font-size: 14px;
   color: gray;
@@ -1641,7 +1638,6 @@
 .box-card-label {
   font-size: 14px;
   white-space: nowrap;
-  /* overflow-x: auto; */
 }
 :deep().el-card {
   border-radius: 9px;
@@ -1656,9 +1652,7 @@
 .table-page {
   margin-left: 20px;
 }
-:deep().table-page .el-card__body {
-  /* padding: 0px; */
-}
+
 .table-text {
   font-size: 18px;
   margin: 5px 0px 10px 20px;
@@ -1697,16 +1691,12 @@
 .box-card {
   height: 190px;
 }
-:deep().box-card .el-card__body {
-  /* padding: 5px; */
-}
+
 .sub-box-card {
   height: 100px;
   border: 0px;
 }
-:deep().sub-box-card .el-card__body {
-  /* padding: 0px; */
-}
+
 .mx-1 {
   margin-bottom: 0px;
 }
@@ -1715,16 +1705,6 @@
   justify-content: right;
   margin-bottom: 10px;
 }
-/* :global(.el-table .exceeding-row) {
-  --el-table-expanded-cell-bg-color: #f53f3f;
-}
-:global(.el-table .abnormal-power-supply) {
-  --el-table-expanded-cell-bg-color: #ffcf8b;
-}
-
-:global(.el-table .disconnect) {
-  --el-table-expanded-cell-bg-color: #ff7d00;
-} */
 
 :deep().el-table__row .exceeding-row{
   background-color:  #F53F3F;
diff --git a/src/views/HistoryFume.vue b/src/views/HistoryFume.vue
index 19cca83..58bf326 100644
--- a/src/views/HistoryFume.vue
+++ b/src/views/HistoryFume.vue
@@ -23,6 +23,10 @@
 },
   data() {
     return {
+      button:{
+        // 鏌ヨ鐨勬寜閽�
+        queryButton:false,
+      },
       // 绌虹姸鎬�
       isNoData:false,
       // 涓嬫媺妗嗕竴寮�濮嬪睍绀虹殑鍚嶅瓧
@@ -312,6 +316,7 @@
       params['endTime'] = this.endTime;
     }
     this.loading=true
+    this.button.queryButton = true
     axiosInstanceInstance
       .get('/fume/history', { params: params })
       .then((response) => {
@@ -319,7 +324,7 @@
         // 淇濆瓨杩斿洖鐨�
         this.exceedingData = response.data.data;
         this.loading=false
-
+        this.button.queryButton = false
         if(response.data.data.length==0){
           ElMessage('璇ユ椂娈垫棤鏁版嵁')
           this.isNoData = true
@@ -327,13 +332,10 @@
         }
         // 绉婚櫎绌烘暟鎹姸鎬�
         this.isNoData = false
-        // this.displayData = response.data.data   //琛ㄦ牸娓叉煋
         // 鍒嗛〉
         this.total = this.exceedingData.length;
         // 榛樿鏄剧ず绗竴椤�
         this.handleCurrentChange(1);
-        // 灞曠ず鎶樼嚎鍥�
-        // this.drawChart(); 
       })
   },
 
@@ -488,7 +490,7 @@
       <!-- <el-date-picker v-model="beginTime" type="datetime" placeholder="寮�濮嬫椂闂�" value-format="YYYY-MM-DD HH:mm:ss" />
       <el-date-picker v-model="endTime" type="datetime" placeholder="缁撴潫鏃堕棿" value-format="YYYY-MM-DD HH:mm:ss" /> -->
       <TimeSelect @submit-time="giveTime"></TimeSelect>
-      <el-button type="primary" plain @click="lineChart">鏌ヨ</el-button>
+      <el-button type="primary" plain :loading="button.queryButton" @click="lineChart">鏌ヨ</el-button>
 
 
       <el-tooltip
diff --git a/src/views/IndexView.vue b/src/views/IndexView.vue
index 58ef864..0e9f87d 100644
--- a/src/views/IndexView.vue
+++ b/src/views/IndexView.vue
@@ -12,6 +12,9 @@
   },
   data() {
     return {
+      button:{
+        setButton:false
+      },
       totalData: [],
       // 淇濆瓨璁剧疆
       save: false,
@@ -273,6 +276,8 @@
 
     // 鐐瑰嚮鎸夐挳瑙﹀彂
     show() {
+      // 
+      this.button.setButton = true
       // 褰撳彇娑堥�夋嫨鏃讹紝闃叉鍥惧舰杩樹繚鐣欏湪椤甸潰銆�
       if (this.outside.checkedShops.length == 0) {
         this.outside.realTimeData = [];
@@ -282,6 +287,8 @@
       }
       // 鏍规嵁鎵�閫夌殑搴楅摵璇锋眰鏁版嵁
       this.request();
+      this.button.setButton = false
+      // 瀹氭椂鏇存柊
       setInterval(() => {
         this.request();
       }, this.timeInterval);
@@ -432,7 +439,7 @@
       content="鐐瑰嚮灞曠ず瀹炴椂鏁版嵁"
       placement="top-start"
     >
-      <el-button type="success" @click="show" style="margin-left: 10px">
+      <el-button type="success" :loading="button.setButton" @click="show" style="margin-left: 10px">
         璁剧疆
       </el-button>
     </el-tooltip>
diff --git a/src/views/analysis/HomePage.vue b/src/views/analysis/HomePage.vue
index e864a56..91ad87c 100644
--- a/src/views/analysis/HomePage.vue
+++ b/src/views/analysis/HomePage.vue
@@ -42,8 +42,8 @@
   <!-- </el-form-item> -->
 </div> 
   <div style="display: flex; justify-content: right; margin-right: 160px;">
-  <el-button type="primary" @click="isRepeat">缁熻鍒嗘瀽</el-button>
-  <el-button type="primary" @click="toSql">鍏ュ簱绠$悊</el-button>
+  <el-button type="primary" :loading="button.statisticsButton"  @click="isRepeat">缁熻鍒嗘瀽</el-button>
+  <el-button type="primary" :loading="button.WarehousingButton"  @click="toSql">鍏ュ簱绠$悊</el-button>
 </div>
 
   
@@ -65,8 +65,8 @@
   <!-- </el-header> -->
 
   <!-- <el-main> -->
-    <div class="table" v-show="!isNoData">
-      <el-table  :data="displayData" border="" id="table" ref="table" height="500px" v-loading="loading" >
+    <div class="table" v-show="!isNoData" v-loading="loading">
+      <el-table  :data="displayData" border="" id="table" ref="table" height="500px"  >
       <el-table-column type="index" label="搴忓彿" :index="indexMethod" v-if="showColumn.num"> </el-table-column> <!--缁戝畾涓�涓柟娉曪紝灏嗚繑鍥炲�艰祴缁檌ndex,鍗宠〃鏍兼瘡琛屾暟鎹殑涓嬫爣-->
       <el-table-column prop="fumeDevId" label="璁惧缂栧彿" v-if="showColumn.deviceid" fixed> </el-table-column>
       <el-table-column prop="fumeDate"   label="鏃ユ湡"  v-if="showColumn.date"> </el-table-column>
@@ -164,6 +164,12 @@
 export default {
 data() {
 return {
+      button:{
+        // 缁熻鍒嗘瀽鎸夐挳
+        statisticsButton:false,
+        // 鍏ュ簱鎸夐挳
+        WarehousingButton:false
+      },
       isNoData:true,
       loading:false,
       radio: '閫変腑涓旂鐢�',
@@ -318,7 +324,7 @@
           this.isNoData = true
           return
         }
-        // 绉婚櫎绌烘暟鎹姸鎬�
+      // 绉婚櫎绌烘暟鎹姸鎬�
       this.isNoData = false
     this.total = this.afterAnalysis.length;
     this.handleCurrentChange(1); // 榛樿鏄剧ず绗竴椤�
@@ -340,35 +346,36 @@
   if (this.shopname) {
     params['shopname'] = this.shopname;
   }
+  if(this.value){
+    params['value'] = this.value;
+  }
   if(this.begin){
     params['begin']=this.begin
   }
   if(this.end){
     params['end'] = this.end
   }
+  // 鍙﹀涓�涓猯oading鍦╝nalysisData()涓�
   this.loading=true
-  axiosInstanceInstance.get('/data/search',{params:params})
-    .then(response => {
+  this.button.statisticsButton = true
+  axiosInstanceInstance.get('/data/search',{params:params}).then(response => {
       this.isRepeated=response.data.data
-      console.log('璇锋眰',this.isRepeated);
+      if(this.isRepeated>0){
+          alert('璇ュ簵閾虹殑鏃舵宸插瓨鍦ㄥ垎鏋愭暟鎹�,璇烽噸鏂伴�夋嫨')
+          this.button.statisticsButton = false
+          return
+      }else{
+        this.analysisData()
+        this.button.statisticsButton = false
+      }
+      
     })
-
-   setTimeout(() => {
-    console.log('璇锋眰鍚�',this.isRepeated);
-    if(this.isRepeated>0){
-      alert('璇ュ簵閾虹殑鏃舵宸插瓨鍦ㄥ垎鏋愭暟鎹�,璇烽噸鏂伴�夋嫨')
-        return
-    }else{
-      this.analysisData()
-      console.log('鎵ц浜�');
-    }
-   }, 1000);
-    
 },
 
 
 //鍐欏叆MySql
 toSql(){
+  this.button.WarehousingButton = true
   this.afterAnalysis.forEach((item)=>{
     console.log(item);
     let jsonData=JSON.stringify(item)
@@ -381,6 +388,7 @@
     
   })
   alert('宸叉垚鍔熷啓鍏ユ暟鎹簱')
+  this.button.WarehousingButton = fasle
   this.isWrite='鏄�'
 },
 
diff --git a/src/views/analysis/graph/AllRate.vue b/src/views/analysis/graph/AllRate.vue
index 42ba7b2..793398e 100644
--- a/src/views/analysis/graph/AllRate.vue
+++ b/src/views/analysis/graph/AllRate.vue
@@ -37,7 +37,7 @@
     </el-form-item>
  
        <el-form-item>
-        <el-button type="primary" @click="fetchData">灞曠ず鍥�</el-button>
+        <el-button type="primary" :loading="button.showChartButton" @click="fetchData">灞曠ず鍥�</el-button>
      </el-form-item> 
      </el-form>
 
@@ -58,6 +58,10 @@
 export default {
   data() {
     return {
+      button:{
+        // 灞曠ず鍥剧殑鎸夐挳
+        showChartButton:false,
+      },
       isNoData:false,
       chart:null,
       loading:false,
@@ -218,10 +222,12 @@
         params['end'] = this.end
       }
       this.loading = true
+      this.button.showChartButton = true
       axiosInstanceInstance.get('/data/id',{params:params})
         .then(response => {
           this.chartData = response.data.data
           this.loading = false
+          this.button.showChartButton = false
         if(response.data.data.length==0){
           alert('璇ユ椂娈垫棤鏁版嵁')
           this.isNoData = true
diff --git a/src/views/analysis/graph/DayAverage.vue b/src/views/analysis/graph/DayAverage.vue
index 85135e3..5c0e5a8 100644
--- a/src/views/analysis/graph/DayAverage.vue
+++ b/src/views/analysis/graph/DayAverage.vue
@@ -2,22 +2,11 @@
     <div class="search-container">
       <el-container>
 
-        <!-- <el-header style="text-align:right; font-size:15px ">
-         <i class="el-icon-s-data" style="font-size: 15px;color:rgb(226,207,207);margin-right:10px;"></i>
-        <span style="color:rgb(226,207,207);">娴撳害鍧囧��</span>
-        </el-header> -->
   
      <el-main>
         <el-form :inline="true" :model="form" class="demo-form-inline">
             <el-form-item label="搴楅摵鍚嶅拰璁惧缂栧彿">
-              <!-- <el-select class="checkbox" v-model="devId" placeholder="璇烽�夋嫨璁惧缂栧彿">
-          <el-option
-            v-for="item in options"
-            :key="item.label"
-            :label="item.label"
-            :value="item.label">
-          </el-option>
-        </el-select> -->
+
         <el-cascader 
             :options="options" 
             :show-all-levels="false" 
@@ -48,7 +37,7 @@
       </el-form-item>
    
          <el-form-item>
-          <el-button type="primary" @click="fetchData">灞曠ず鍥�</el-button>
+          <el-button type="primary" :loading="button.showChartButton" @click="fetchData">灞曠ず鍥�</el-button>
        </el-form-item> 
        </el-form>
 
@@ -67,6 +56,10 @@
   export default {
     data() {
       return {
+        button:{
+        // 灞曠ず鍥剧殑鎸夐挳
+        showChartButton:false,
+      },
         isNoData:false,
         loading:false,
         chartData: [],     //淇濆瓨鏌ヨ鐨勭粨鏋�
@@ -222,10 +215,12 @@
           params['end'] = this.end
         }
         this.loading=true
+        this.button.showChartButton = true
         axiosInstanceInstance.get('/data/id',{params:params})
           .then(response => {
             this.chartData = response.data.data
             this.loading=false
+            this.button.showChartButton = false
             if(response.data.data.length==0){
             alert('璇ユ椂娈垫棤鏁版嵁')
             this.isNoData = true
diff --git a/src/views/analysis/graph/DayData.vue b/src/views/analysis/graph/DayData.vue
index 940909e..6bc06c1 100644
--- a/src/views/analysis/graph/DayData.vue
+++ b/src/views/analysis/graph/DayData.vue
@@ -1,24 +1,10 @@
 <template>
   <div class="search-container">
     <el-container>
-      <!-- <el-header>
-    <el-header style="text-align:right; font-size:15px ">
-         <i class="el-icon-s-data" style="font-size: 15px;color:rgb(226,207,207);margin-right:10px;"></i>
-        <span style="color:rgb(226,207,207);">鏃ユ暟鎹�</span>
-        </el-header>
-   </el-header> -->
+
 
       <el-main>
         <el-form :inline="true" :model="form" class="demo-form-inline">
-          <!-- <el-form-item label="璁惧缂栧彿">
-            <el-select class="checkbox" v-model="devId" placeholder="璇烽�夋嫨璁惧缂栧彿">
-        <el-option
-          v-for="item in options"
-          :key="item.label"
-          :label="item.label"
-          :value="item.label">
-        </el-option>
-      </el-select> -->
           <el-form-item label="搴楅摵鍚嶅拰璁惧缂栧彿">
             <el-cascader
               :options="options"
@@ -52,12 +38,12 @@
           </el-form-item>
 
           <el-form-item>
-            <el-button type="primary" @click="fetchData">灞曠ず鍥�</el-button>
+            <el-button type="primary" loading="button.showChartButton" @click="fetchData">灞曠ず鍥�</el-button>
           </el-form-item>
         </el-form>
 
         <el-card v-loading="loading">
-          <div class="chart-container" ref="chart" v-show="!isNoData"></div>
+          <div class="chart-container"  ref="chart" v-show="!isNoData"></div>
           <el-empty v-show="isNoData" :image-size="200" />
         </el-card>
       </el-main>
@@ -71,6 +57,10 @@
 export default {
   data() {
     return {
+      button:{
+        // 灞曠ず鍥剧殑鎸夐挳
+        showChartButton:false,
+      },
       isNoData:false,
       loading: false,
       chartData: [], //淇濆瓨鏌ヨ鐨勭粨鏋�
@@ -257,12 +247,14 @@
         params['end'] = this.end;
       }
       this.loading = true;
+      this.button.showChartButton = true
       axiosInstanceInstance
         .get('/data/id', { params: params })
         .then((response) => {
           
           this.chartData = response.data.data;
           this.loading = false;
+          this.button.showChartButton = false
           if(response.data.data.length==0){
           alert('璇ユ椂娈垫棤鏁版嵁')
           this.isNoData = true
diff --git a/src/views/analysis/graph/ExceedingRate.vue b/src/views/analysis/graph/ExceedingRate.vue
index 0dd1fac..4ef5a7f 100644
--- a/src/views/analysis/graph/ExceedingRate.vue
+++ b/src/views/analysis/graph/ExceedingRate.vue
@@ -1,22 +1,11 @@
 <template>
   <div>
     <el-container>
-      <!-- <el-header style="text-align:right; font-size:15px ">
-         <i class="el-icon-s-data" style="font-size: 15px;color:rgb(226,207,207);margin-right:10px;"></i>
-        <span style="color:rgb(226,207,207);">鏁版嵁瓒呮爣鐜�</span>
-     </el-header> -->
 
       <el-main>
         <el-form :inline="true" :model="form" class="demo-form-inline">
           <el-form-item label="搴楅摵鍚嶅拰璁惧缂栧彿">
-            <!-- <el-select class="checkbox" v-model="devId" placeholder="璇烽�夋嫨璁惧缂栧彿">
-          <el-option
-            v-for="item in options"
-            :key="item.label"
-            :label="item.label"
-            :value="item.label">
-          </el-option>
-        </el-select> -->
+
             <el-cascader
               :options="options"
               :show-all-levels="false"
@@ -49,7 +38,7 @@
           </el-form-item>
 
           <el-form-item>
-            <el-button type="primary" @click="fetchData">灞曠ず鍥�</el-button>
+            <el-button type="primary" :loading="button.showChartButton" @click="fetchData">灞曠ず鍥�</el-button>
           </el-form-item>
         </el-form>
 
@@ -68,6 +57,10 @@
 export default {
   data() {
     return {
+      button:{
+        // 灞曠ず鍥剧殑鎸夐挳
+        showChartButton:false,
+      },
       isNoData:false,
       loading: false,
       chartData: [], //淇濆瓨鏌ヨ鐨勭粨鏋�
@@ -254,12 +247,14 @@
         params['end'] = this.end;
       }
       this.loading = true;
+      this.button.showChartButton = true
       axiosInstanceInstance
         .get('/data/id', { params: params })
         .then((response) => {
           
           this.chartData = response.data.data;
           this.loading = false;
+          this.button.showChartButton = false
           if(response.data.data.length==0){
           alert('璇ユ椂娈垫棤鏁版嵁')
           this.isNoData = true
diff --git a/src/views/analysis/graph/OnlineRate.vue b/src/views/analysis/graph/OnlineRate.vue
index b1d220c..1b50852 100644
--- a/src/views/analysis/graph/OnlineRate.vue
+++ b/src/views/analysis/graph/OnlineRate.vue
@@ -1,23 +1,9 @@
 <template>
     <div>
       <el-container>
-
-        <!-- <el-header style="text-align:right; font-size:15px ">
-         <i class="el-icon-s-data" style="font-size: 15px;color:rgb(226,207,207);margin-right:10px;"></i>
-        <span style="color:rgb(226,207,207);">妫�娴嬭澶囧湪绾跨巼</span>
-        </el-header> -->
-  
       <el-main> 
         <el-form :inline="true" :model="form" class="demo-form-inline">
-            <!-- <el-form-item label="璁惧缂栧彿">
-              <el-select class="checkbox" v-model="devId" placeholder="璇烽�夋嫨璁惧缂栧彿">
-          <el-option
-            v-for="item in options"
-            :key="item.label"
-            :label="item.label"
-            :value="item.label">
-          </el-option>
-        </el-select> -->
+
         <el-form-item label="搴楅摵鍚嶅拰璁惧缂栧彿">
         <el-cascader 
             :options="options" 
@@ -48,7 +34,7 @@
       </el-form-item>
    
          <el-form-item>
-          <el-button type="primary" @click="fetchData">鐢熸垚鎶樼嚎鍥�</el-button>
+          <el-button type="primary" :loading="button.showChartButton" @click="fetchData">鐢熸垚鎶樼嚎鍥�</el-button>
        </el-form-item> 
        </el-form>
 
@@ -67,6 +53,10 @@
   export default {
     data() {
       return {
+        button:{
+        // 灞曠ず鍥剧殑鎸夐挳
+        showChartButton:false,
+      },
         isNoData:false,
         loading:false,
         chartData: [],     //淇濆瓨鏌ヨ鐨勭粨鏋�
@@ -223,11 +213,13 @@
           params['end'] = this.end
         }
         this.loading=true
+        this.button.showChartButton = true
         axiosInstanceInstance.get('/data/id',{params:params})
           .then(response => {
         
             this.chartData = response.data.data
             this.loading= false
+            this.button.showChartButton = false
             if(response.data.data.length==0){
           alert('璇ユ椂娈垫棤鏁版嵁')
           this.isNoData = true
diff --git a/src/views/analysis/graph/PuOpeningRate.vue b/src/views/analysis/graph/PuOpeningRate.vue
index b7e884c..cd83b98 100644
--- a/src/views/analysis/graph/PuOpeningRate.vue
+++ b/src/views/analysis/graph/PuOpeningRate.vue
@@ -1,22 +1,10 @@
 <template>
   <div>
     <el-container>
-      <!-- <el-header style="text-align:right; font-size:15px ">
-         <i class="el-icon-s-data" style="font-size: 15px;color:rgb(226,207,207);margin-right:10px;"></i>
-        <span style="color:rgb(226,207,207);">鍑�鍖栧櫒寮�鍚巼</span>
-     </el-header> -->
 
       <el-main>
         <el-form :inline="true" :model="form" class="demo-form-inline">
-          <!-- <el-form-item label="璁惧缂栧彿">
-              <el-select class="checkbox" v-model="devId" placeholder="璇烽�夋嫨璁惧缂栧彿">
-          <el-option
-            v-for="item in options"
-            :key="item.label"
-            :label="item.label"
-            :value="item.label">
-          </el-option>
-        </el-select> -->
+
           <el-form-item label="搴楅摵鍚嶅拰璁惧缂栧彿">
             <el-cascader
               :options="options"
@@ -50,7 +38,7 @@
           </el-form-item>
 
           <el-form-item>
-            <el-button type="primary" @click="fetchData">鐢熸垚鎶樼嚎鍥�</el-button>
+            <el-button type="primary" :loading="button.showChartButton" @click="fetchData">鐢熸垚鎶樼嚎鍥�</el-button>
           </el-form-item>
         </el-form>
 
@@ -69,6 +57,10 @@
 export default {
   data() {
     return {
+      button:{
+        // 灞曠ず鍥剧殑鎸夐挳
+        showChartButton:false,
+      },
       isNoData:false,
       loading: false,
       chartData: [], //淇濆瓨鏌ヨ鐨勭粨鏋�
@@ -255,11 +247,13 @@
         params['end'] = this.end;
       }
       this.loading = true;
+      this.button.showChartButton = true
       axiosInstanceInstance
         .get('data/id', { params: params })
         .then((response) => {
           this.chartData = response.data.data;
           this.loading = false;
+          this.button.showChartButton = false
           if(response.data.data.length==0){
           alert('璇ユ椂娈垫棤鏁版嵁')
           this.isNoData = true
diff --git a/src/views/getdata/GetData.vue b/src/views/getdata/GetData.vue
index 0d8361c..aa103e7 100644
--- a/src/views/getdata/GetData.vue
+++ b/src/views/getdata/GetData.vue
@@ -1,6 +1,5 @@
 <script>
 import axiosInstancePy from '../../utils/requestPy'
-// import ShopNameSelect from '../sfc/ShopNameSelect.vue'
 import ShopNameCheckBox from '../../sfc/ShopNameCheckBox.vue';
 import TimeSelectCrawling from '../../sfc/TimeSelectCrawling.vue';
 

--
Gitblit v1.9.3