Преглед на файлове

🐞 fix(日报汇总): 看板不显示问题

Zimo преди 5 дни
родител
ревизия
32fe1b7805

+ 1 - 1
src/views/pms/device/monitor/TdDeviceInfo.vue

@@ -207,7 +207,7 @@ function render() {
     ],
     yAxis: {
       type: 'value',
-      min: minInterval.value,
+      min: -minInterval.value,
       max: maxInterval.value,
       interval: 1,
       axisLabel: {

+ 3 - 3
src/views/pms/iotrhdailyreport/summary.vue

@@ -268,10 +268,10 @@ const render = () => {
   }
 
   const maxVal = values.length === 0 ? 10000 : Math.max(...values)
-  const minVal = values.length === 0 ? 0 : Math.min(...values)
+  const minVal = values.length === 0 ? 0 : Math.min(...values) > 0 ? 0 : Math.min(...values)
 
   const maxDigits = (Math.floor(maxVal) + '').length
-  const minDigits = (Math.floor(Math.abs(minVal)) + '').length
+  const minDigits = minVal === 0 ? 0 : (Math.floor(Math.abs(minVal)) + '').length
   const interval = Math.max(maxDigits, minDigits)
 
   const maxInterval = interval
@@ -310,7 +310,7 @@ const render = () => {
     },
     yAxis: {
       type: 'value',
-      min: minInterval,
+      min: -minInterval,
       max: maxInterval,
       interval: 1,
       axisLabel: {

+ 4 - 3
src/views/pms/iotrydailyreport/summary.vue

@@ -263,10 +263,11 @@ const render = () => {
   }
 
   const maxVal = values.length === 0 ? 10000 : Math.max(...values)
-  const minVal = values.length === 0 ? 0 : Math.min(...values)
+  const minVal = values.length === 0 ? 0 : Math.min(...values) > 0 ? 0 : Math.min(...values)
 
   const maxDigits = (Math.floor(maxVal) + '').length
-  const minDigits = (Math.floor(Math.abs(minVal)) + '').length
+  const minDigits = minVal === 0 ? 0 : (Math.floor(Math.abs(minVal)) + '').length
+
   const interval = Math.max(maxDigits, minDigits)
 
   const maxInterval = interval
@@ -305,7 +306,7 @@ const render = () => {
     },
     yAxis: {
       type: 'value',
-      min: minInterval,
+      min: -minInterval,
       max: maxInterval,
       interval: 1,
       axisLabel: {

+ 3 - 3
src/views/pms/iotrydailyreport/xsummary.vue

@@ -261,10 +261,10 @@ const render = () => {
   }
 
   const maxVal = values.length === 0 ? 10000 : Math.max(...values)
-  const minVal = values.length === 0 ? 0 : Math.min(...values)
+  const minVal = values.length === 0 ? 0 : Math.min(...values) > 0 ? 0 : Math.min(...values)
 
   const maxDigits = (Math.floor(maxVal) + '').length
-  const minDigits = (Math.floor(Math.abs(minVal)) + '').length
+  const minDigits = minVal === 0 ? 0 : (Math.floor(Math.abs(minVal)) + '').length
   const interval = Math.max(maxDigits, minDigits)
 
   const maxInterval = interval
@@ -303,7 +303,7 @@ const render = () => {
     },
     yAxis: {
       type: 'value',
-      min: minInterval,
+      min: -minInterval,
       max: maxInterval,
       interval: 1,
       axisLabel: {