Browse Source

🦄 refactor: 调整单位精度

Zimo 1 week ago
parent
commit
e16a4213d3

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.149:48080  https://iot.deepoil.cc
-VITE_BASE_URL='http://192.168.188.149:48080'
+VITE_BASE_URL='https://iot.deepoil.cc'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

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

@@ -47,26 +47,26 @@ const totalWorkKeys: [string, string, string, string, number][] = [
   ['notReported', '个', '未填报', 'i-material-symbols:cancel-outline-rounded text-rose', 0],
   [
     'totalFuelConsumption',
-    '升',
+    '升',
     '累计油耗',
     'i-material-symbols:directions-car-outline-rounded text-sky',
-    4
+    2
   ],
   [
     'totalPowerConsumption',
     'MWh',
     '累计用电量',
     'i-material-symbols:electric-bolt-outline-rounded text-sky',
-    4
+    2
   ],
   [
     'totalWaterInjection',
     '万方',
     '累计注水量',
     'i-material-symbols:water-drop-outline-rounded text-sky',
-    4
+    2
   ],
-  ['totalGasInjection', '万方', '累计注气量', 'i-material-symbols:cloud-outline text-sky', 4]
+  ['totalGasInjection', '万方', '累计注气量', 'i-material-symbols:cloud-outline text-sky', 2]
 ]
 
 const totalWork = ref({
@@ -107,7 +107,7 @@ const getTotal = useDebounceFn(async () => {
       totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
       totalWaterInjection: (res2.totalWaterInjection || 0) / 10000,
       totalGasInjection: (res2.totalGasInjection || 0) / 10000,
-      totalFuelConsumption: (res2.totalFuelConsumption || 0) / 10000
+      totalFuelConsumption: res2.totalFuelConsumption || 0
     }
   } finally {
     totalLoading.value = false
@@ -162,7 +162,7 @@ const columns = (type: string) => {
       prop: 'cumulativePowerConsumption'
     },
     {
-      label: '累计油耗(升)',
+      label: '累计油耗(升)',
       prop: 'cumulativeFuelConsumption'
     },
     {
@@ -221,10 +221,10 @@ const getList = useDebounceFn(async () => {
           id: type === '2' ? projectDeptId : teamId,
           name: type === '2' ? projectDeptName : teamName,
           ...other,
-          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)
+          cumulativeGasInjection: ((other.cumulativeGasInjection || 0) / 10000).toFixed(2),
+          cumulativeWaterInjection: ((other.cumulativeWaterInjection || 0) / 10000).toFixed(2),
+          cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(2),
+          cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2)
         }
       }
     )

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

@@ -49,17 +49,17 @@ const totalWorkKeys: [string, string, string, string, number][] = [
   ['notReported', '个', '未填报', 'i-material-symbols:cancel-outline-rounded text-rose', 0],
   [
     'totalFuelConsumption',
-    '升',
+    '升',
     '累计油耗',
     'i-material-symbols:directions-car-outline-rounded text-sky',
-    4
+    2
   ],
   [
     'totalPowerConsumption',
     'MWh',
     '累计用电量',
     'i-material-symbols:electric-bolt-outline-rounded text-sky',
-    4
+    2
   ],
   ['totalFootage', 'M', '累计进尺', 'i-solar:ruler-bold text-sky', 2]
 ]
@@ -101,7 +101,7 @@ const getTotal = useDebounceFn(async () => {
       ...res2,
       totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
       totalGasInjection: (res2.totalGasInjection || 0) / 10000,
-      totalFuelConsumption: (res2.totalFuelConsumption || 0) / 10000
+      totalFuelConsumption: res2.totalFuelConsumption || 0
     }
   } finally {
     totalLoading.value = false
@@ -139,7 +139,7 @@ const columns = (type: string) => {
       prop: 'cumulativePowerConsumption'
     },
     {
-      label: '累计油耗(升)',
+      label: '累计油耗(升)',
       prop: 'cumulativeFuelConsumption'
     },
     {
@@ -177,8 +177,8 @@ const getList = useDebounceFn(async () => {
         id: type === '2' ? projectDeptId : teamId,
         name: type === '2' ? projectDeptName : teamName,
         ...other,
-        cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(4),
-        cumulativeFuelConsumption: ((other.cumulativeFuelConsumption || 0) / 10000).toFixed(4)
+        cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(2),
+        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2)
       })
     )
   } finally {

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

@@ -49,17 +49,17 @@ const totalWorkKeys: [string, string, string, string, number][] = [
   ['notReported', '个', '未填报', 'i-material-symbols:cancel-outline-rounded text-rose', 0],
   [
     'totalFuelConsumption',
-    '升',
+    '升',
     '累计油耗',
     'i-material-symbols:directions-car-outline-rounded text-sky',
-    4
+    2
   ],
   [
     'totalPowerConsumption',
     'MWh',
     '累计用电量',
     'i-material-symbols:electric-bolt-outline-rounded text-sky',
-    4
+    2
   ],
   ['constructionWells', '个', '累计施工井数', 'i-mdi:progress-wrench text-sky', 0],
   ['completedWells', '个', '累计完工井数', 'i-mdi:wrench-check-outline text-emerald', 0]
@@ -103,7 +103,7 @@ const getTotal = useDebounceFn(async () => {
       completedWells: 0,
       ...res2,
       totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
-      totalFuelConsumption: (res2.totalFuelConsumption || 0) / 10000
+      totalFuelConsumption: res2.totalFuelConsumption || 0
     }
   } finally {
     totalLoading.value = false
@@ -145,7 +145,7 @@ const columns = (type: string) => {
       prop: 'cumulativePowerConsumption'
     },
     {
-      label: '累计油耗(升)',
+      label: '累计油耗(升)',
       prop: 'cumulativeFuelConsumption'
     },
     {
@@ -183,8 +183,8 @@ const getList = useDebounceFn(async () => {
         id: type === '2' ? projectDeptId : teamId,
         name: type === '2' ? projectDeptName : teamName,
         ...other,
-        cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(4),
-        cumulativeFuelConsumption: ((other.cumulativeFuelConsumption || 0) / 10000).toFixed(4)
+        cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(2),
+        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2)
       })
     )
   } finally {

+ 7 - 7
src/views/report-statistics/ry-daily-report.vue

@@ -212,7 +212,7 @@ const columns = ref<Column[]>([
     label: '当日',
     children: [
       {
-        label: '用电量(kWh)',
+        label: '用电量(MWh)',
         prop: 'dailyPowerUsage',
         'min-width': '120px'
       },
@@ -648,12 +648,12 @@ const expandRowKeys = computed(() => {
                   >
                     <el-tag>累计进尺: {{ row.groupIdFootage }} </el-tag>
                     <el-tag>累计进尺工作时间: {{ row.groupIdFootageTime }} </el-tag>
-                    <el-tag>累计其它生产时间H(钻井) : {{ row.groupIdOtherProductTime }} </el-tag>
-                    <el-tag>累计非生产时间H(钻井) : {{ row.groupIdZjNoProductTime }} </el-tag>
-                    <el-tag>累计生产时间(修井) : {{ row.groupIdProductTime }} </el-tag>
-                    <el-tag>累计非生产时间H(修井) : {{ row.groupIdXjNoProductTime }} </el-tag>
-                    <el-tag>累计用电量kWh : {{ row.groupIdPower }} </el-tag>
-                    <el-tag>累计油耗 : {{ row.groupIdFuel }} </el-tag>
+                    <el-tag>累计其它生产时间H(钻井) : {{ row.groupIdOtherProductTime }} </el-tag>
+                    <el-tag>累计非生产时间H(钻井) : {{ row.groupIdZjNoProductTime }} </el-tag>
+                    <el-tag>累计生产时间(修井) : {{ row.groupIdProductTime }} </el-tag>
+                    <el-tag>累计非生产时间H(修井) : {{ row.groupIdXjNoProductTime }} </el-tag>
+                    <el-tag>累计用电量(MWh) : {{ row.groupIdPower }} </el-tag>
+                    <el-tag>累计油耗(吨) : {{ row.groupIdFuel }} </el-tag>
                     <el-tag>平均运行时效 : {{ row.groupIdTransitTime }} </el-tag>
                     <el-tag>累计施工井数 : {{ row.groupConstructionWells }} </el-tag>
                     <el-tag>累计完工井数 : {{ row.groupCompletedWells }} </el-tag>