Browse Source

修复BUG

zhangchuang 1 month ago
parent
commit
6d2d60c48e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/views/HealthStatusAnalysis/mock.vue

+ 4 - 4
src/views/HealthStatusAnalysis/mock.vue

@@ -354,8 +354,8 @@
               {{ healthyStatusText.name }}
             </div>
           </div>
-          <div class="status-btn" v-if="isSuspend" @click="goResult(false)">暂停数据</div>
-          <div class="status-btn" v-else @click="goResult(true)">继续加载</div>
+          <div class="status-btn" v-if="isSuspend"  @click="goResult(true)">继续加载</div>
+          <div class="status-btn" v-else @click="goResult(false)">暂停数据</div>
         </div>
 
         <div class="history-all">
@@ -1628,10 +1628,10 @@ const goResult = async (suspend: boolean) => {
   isSuspend.value = suspend
   // 开启暂停
   if (isSuspend.value) {
+    await lineChartRef.value.pauseDataUpdate();
+  } else {
     // 继续刷新数据
     await lineChartRef.value.startDataUpdate();
-  } else {
-    await lineChartRef.value.pauseDataUpdate();
 
   }
 };