Explorar el Código

🐞 fix(瑞恒日报): 修复表格精度

Zimo hace 3 días
padre
commit
2d1cc66ff7

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

@@ -214,10 +214,10 @@ const getList = useDebounceFn(async () => {
           id: type === '2' ? projectDeptId : teamId,
           name: type === '2' ? projectDeptName : teamName,
           ...other,
-          cumulativeGasInjection: (other.cumulativeGasInjection || 0) / 10000,
-          cumulativeWaterInjection: (other.cumulativeWaterInjection || 0) / 10000,
-          cumulativePowerConsumption: (other.cumulativePowerConsumption || 0) / 1000,
-          cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0) / 10000
+          cumulativeGasInjection: ((other.cumulativeGasInjection || 0) / 10000).toFixed(4),
+          cumulativeWaterInjection: ((other.cumulativeWaterInjection || 0) / 10000).toFixed(4),
+          cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(4),
+          cumulativeFuelConsumption: ((other.cumulativeFuelConsumption || 0) / 10000).toFixed(4)
         }
       }
     )

+ 2 - 2
src/views/pms/iotrydailyreport/summary.vue

@@ -170,8 +170,8 @@ const getList = useDebounceFn(async () => {
         id: type === '2' ? projectDeptId : teamId,
         name: type === '2' ? projectDeptName : teamName,
         ...other,
-        cumulativePowerConsumption: (other.cumulativePowerConsumption || 0) / 1000,
-        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0) / 10000
+        cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(4),
+        cumulativeFuelConsumption: ((other.cumulativeFuelConsumption || 0) / 10000).toFixed(4)
       })
     )
   } finally {

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

@@ -176,8 +176,8 @@ const getList = useDebounceFn(async () => {
         id: type === '2' ? projectDeptId : teamId,
         name: type === '2' ? projectDeptName : teamName,
         ...other,
-        cumulativePowerConsumption: (other.cumulativePowerConsumption || 0) / 1000,
-        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0) / 10000
+        cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(4),
+        cumulativeFuelConsumption: ((other.cumulativeFuelConsumption || 0) / 10000).toFixed(4)
       })
     )
   } finally {