소스 검색

feat(views): 优化实时监测页面智控按钮

1. 仅打开智能启停面板时定时获取模板数据
wangcong 2 주 전
부모
커밋
2d9262d2ab
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/views/real-time-monitor/device-control/DeviceControl.vue

+ 2 - 1
src/views/real-time-monitor/device-control/DeviceControl.vue

@@ -64,7 +64,8 @@ const showCtrlPanel = computed(() => {
 });
 
 watch(activeConfigIndex, () => {
-  if (activeConfigIndex.value === -1) {
+  // 仅打开智能启停面板时定时获取数据
+  if (activeConfigIndex.value !== 0) {
     clearTimeout(moduleTimer);
   } else {
     getModuleInfo();