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/HistoryFume.vue |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/src/views/HistoryFume.vue b/src/views/HistoryFume.vue
index 390c5e4..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
@@ -672,20 +674,12 @@
 .container {
   display: flex;
   flex-direction: column;
-  height: 100vh;
 }
 :deep().el-dialog {
   border-radius: 9px;
 }
-@media screen and (max-width: 768px) {
-  /* 鍦ㄥ皬灞忓箷涓婂簲鐢ㄧ殑鏍峰紡 */
-}
 
-@media screen and (min-width: 769px) and (max-width: 1024px) {
-  /* 鍦ㄤ腑绛夊睆骞曚笂搴旂敤鐨勬牱寮� */
-}
-
-@media screen and (min-width: 1025px) {
-  /* 鍦ㄥぇ灞忓箷涓婂簲鐢ㄧ殑鏍峰紡 */
+.el-table {
+  color: #000000;
 }
 </style>

--
Gitblit v1.9.3