소스 검색

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

Zimo 3 일 전
부모
커밋
2d1cc66ff7
3개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 4
      src/views/pms/iotrhdailyreport/summary.vue
  2. 2 2
      src/views/pms/iotrydailyreport/summary.vue
  3. 2 2
      src/views/pms/iotrydailyreport/xsummary.vue

+ 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 {