浏览代码

🦄 refactor(设备监控): 暂时移除重新计算y轴

Zimo 6 天之前
父节点
当前提交
ab4526cc6e
共有 1 个文件被更改,包括 5 次插入7 次删除
  1. 5 7
      src/views/pms/device/monitor/TdDeviceInfo.vue

+ 5 - 7
src/views/pms/device/monitor/TdDeviceInfo.vue

@@ -76,7 +76,7 @@ const handleClickSpec = (modelName: string) => {
       selected: selectSpec.value
     }
   })
-  getIntervalArr()
+  // getIntervalArr()
 }
 
 const chartRef = ref<HTMLDivElement | null>(null)
@@ -188,9 +188,9 @@ const initLoad = async (real_time: boolean = true) => {
 
     updateSingleSeries(identifier)
 
-    if (selectSpec.value[chartMap.value[identifier].name]) {
-      getIntervalArr()
-    }
+    // if (selectSpec.value[chartMap.value[identifier].name]) {
+    //   getIntervalArr()
+    // }
 
     chartLoading.value = false
   }
@@ -242,7 +242,7 @@ const getIntervalArr = (init: boolean = false) => {
     }
   }
 
-  const maxVal = values.length === 0 ? 1000 : Math.max(...values)
+  const maxVal = values.length === 0 ? 10000 : Math.max(...values)
   const minVal = Math.min(...values, -100)
 
   const maxDigits = (Math.floor(maxVal) + '').length
@@ -257,8 +257,6 @@ const getIntervalArr = (init: boolean = false) => {
     intervalArr.value.push(Math.pow(10, i))
   }
 
-  console.log('init :>> ', init)
-
   if (!init) {
     chart?.setOption({
       yAxis: {