Explorar o código

🐞 fix(日报汇总): 单位统一

Zimo hai 3 días
pai
achega
81562402ef

+ 19 - 16
src/views/pms/iotrhdailyreport/summary.vue

@@ -47,14 +47,14 @@ const totalWorkKeys: [string, string, string, string, number][] = [
   ['notReported', '个', '未填报', 'i-material-symbols:cancel-outline-rounded text-rose', 0],
   [
     'totalFuelConsumption',
-    'L',
+    '万升',
     '累计油耗',
     'i-material-symbols:directions-car-outline-rounded text-sky',
-    2
+    4
   ],
   [
     'totalPowerConsumption',
-    'MWH',
+    'MWh',
     '累计用电量',
     'i-material-symbols:electric-bolt-outline-rounded text-sky',
     4
@@ -103,11 +103,11 @@ const getTotal = useDebounceFn(async () => {
 
     totalWork.value = {
       ...totalWork.value,
-      totalFuelConsumption: 0,
       ...res2,
-      totalPowerConsumption: (res2.totalPowerConsumption || 0) / 10000,
+      totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
       totalWaterInjection: (res2.totalWaterInjection || 0) / 10000,
-      totalGasInjection: (res2.totalGasInjection || 0) / 10000
+      totalGasInjection: (res2.totalGasInjection || 0) / 10000,
+      totalFuelConsumption: (res2.totalFuelConsumption || 0) / 10000
     }
   } finally {
     totalLoading.value = false
@@ -153,15 +153,15 @@ const columns = (type: string) => {
       prop: 'cumulativeGasInjection'
     },
     {
-      label: '累计注水量(方)',
+      label: '累计注水量(方)',
       prop: 'cumulativeWaterInjection'
     },
     {
-      label: '累计用电量(KWH)',
+      label: '累计用电量(MWh)',
       prop: 'cumulativePowerConsumption'
     },
     {
-      label: '累计油耗(L)',
+      label: '累计油耗(万升)',
       prop: 'cumulativeFuelConsumption'
     },
     {
@@ -214,7 +214,10 @@ const getList = useDebounceFn(async () => {
           id: type === '2' ? projectDeptId : teamId,
           name: type === '2' ? projectDeptName : teamName,
           ...other,
-          cumulativeGasInjection: (other.cumulativeGasInjection || 0) / 10000
+          cumulativeGasInjection: (other.cumulativeGasInjection || 0) / 10000,
+          cumulativeWaterInjection: (other.cumulativeWaterInjection || 0) / 10000,
+          cumulativePowerConsumption: (other.cumulativePowerConsumption || 0) / 1000,
+          cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0) / 10000
         }
       }
     )
@@ -248,10 +251,10 @@ let chart: echarts.ECharts | null = null
 const xAxisData = ref<string[]>([])
 
 const legend = ref<string[][]>([
-  ['累计油耗 ()', 'cumulativeFuelConsumption'],
+  ['累计油耗 (万升)', 'cumulativeFuelConsumption'],
   ['累计注气量 (万方)', 'cumulativeGasInjection'],
-  ['累计用电量 (KWH)', 'cumulativePowerConsumption'],
-  ['累计注水量 (方)', 'cumulativeWaterInjection'],
+  ['累计用电量 (MWh)', 'cumulativePowerConsumption'],
+  ['累计注水量 (方)', 'cumulativeWaterInjection'],
   ['平均时效 (%)', 'transitTime']
 ])
 
@@ -272,10 +275,10 @@ const getChart = useDebounceFn(async () => {
     const res = await IotRhDailyReportApi.getIotRhDailyReportSummaryPolyline(query.value)
 
     chartData.value = {
-      cumulativeFuelConsumption: res.map((item) => item.cumulativeFuelConsumption || 0),
+      cumulativeFuelConsumption: res.map((item) => (item.cumulativeFuelConsumption || 0) / 10000),
       cumulativeGasInjection: res.map((item) => (item.cumulativeGasInjection || 0) / 10000),
-      cumulativePowerConsumption: res.map((item) => item.cumulativePowerConsumption || 0),
-      cumulativeWaterInjection: res.map((item) => item.cumulativeWaterInjection || 0),
+      cumulativePowerConsumption: res.map((item) => (item.cumulativePowerConsumption || 0) / 1000),
+      cumulativeWaterInjection: res.map((item) => (item.cumulativeWaterInjection || 0) / 10000),
       transitTime: res.map((item) => (item.transitTime || 0) * 100)
     }
 

+ 15 - 13
src/views/pms/iotrydailyreport/summary.vue

@@ -49,14 +49,14 @@ 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',
-    2
+    4
   ],
   [
     'totalPowerConsumption',
-    'MWH',
+    'MWh',
     '累计用电量',
     'i-material-symbols:electric-bolt-outline-rounded text-sky',
     4
@@ -97,11 +97,11 @@ const getTotal = useDebounceFn(async () => {
 
     totalWork.value = {
       ...totalWork.value,
-      totalFuelConsumption: 0,
       totalFootage: 0,
       ...res2,
-      totalPowerConsumption: (res2.totalPowerConsumption || 0) / 10000,
-      totalGasInjection: (res2.totalGasInjection || 0) / 10000
+      totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
+      totalGasInjection: (res2.totalGasInjection || 0) / 10000,
+      totalFuelConsumption: (res2.totalWaterInjection || 0) / 10000
     }
   } finally {
     totalLoading.value = false
@@ -134,11 +134,11 @@ const columns = (type: string) => {
       prop: 'cumulativeFootage'
     },
     {
-      label: '累计用电量(KWH)',
+      label: '累计用电量(MWh)',
       prop: 'cumulativePowerConsumption'
     },
     {
-      label: '累计油耗()',
+      label: '累计油耗(万升)',
       prop: 'cumulativeFuelConsumption'
     },
     {
@@ -169,7 +169,9 @@ const getList = useDebounceFn(async () => {
       ({ id, projectDeptId, projectDeptName, teamId, teamName, sort, taskId, type, ...other }) => ({
         id: type === '2' ? projectDeptId : teamId,
         name: type === '2' ? projectDeptName : teamName,
-        ...other
+        ...other,
+        cumulativePowerConsumption: (other.cumulativePowerConsumption || 0) / 1000,
+        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0) / 10000
       })
     )
   } finally {
@@ -202,9 +204,9 @@ let chart: echarts.ECharts | null = null
 const xAxisData = ref<string[]>([])
 
 const legend = ref<string[][]>([
-  ['累计油耗 ()', 'cumulativeFuelConsumption'],
+  ['累计油耗 (万升)', 'cumulativeFuelConsumption'],
   ['累计进尺 (M)', 'cumulativeFootage'],
-  ['累计用电量 (KWH)', 'cumulativePowerConsumption'],
+  ['累计用电量 (MWh)', 'cumulativePowerConsumption'],
   ['平均时效 (%)', 'transitTime']
 ])
 
@@ -235,9 +237,9 @@ const getChart = useDebounceFn(async () => {
     const res = await IotRyDailyReportApi.getIotRyDailyReportSummaryPolyline(query.value)
 
     chartData.value = {
-      cumulativeFuelConsumption: res.map((item) => item.cumulativeFuelConsumption || 0),
+      cumulativeFuelConsumption: res.map((item) => (item.cumulativeFuelConsumption || 0) / 10000),
       cumulativeFootage: res.map((item) => item.cumulativeFootage || 0),
-      cumulativePowerConsumption: res.map((item) => item.cumulativePowerConsumption || 0),
+      cumulativePowerConsumption: res.map((item) => (item.cumulativePowerConsumption || 0) / 1000),
       transitTime: res.map((item) => (item.transitTime || 0) * 100)
     }
 

+ 14 - 12
src/views/pms/iotrydailyreport/xsummary.vue

@@ -49,14 +49,14 @@ 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',
-    2
+    4
   ],
   [
     'totalPowerConsumption',
-    'MWH',
+    'MWh',
     '累计用电量',
     'i-material-symbols:electric-bolt-outline-rounded text-sky',
     4
@@ -99,11 +99,11 @@ const getTotal = useDebounceFn(async () => {
 
     totalWork.value = {
       ...totalWork.value,
-      totalFuelConsumption: 0,
       constructionWells: 0,
       completedWells: 0,
       ...res2,
-      totalPowerConsumption: (res2.totalPowerConsumption || 0) / 10000
+      totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
+      totalFuelConsumption: (res2.totalFuelConsumption || 0) / 10000
     }
   } finally {
     totalLoading.value = false
@@ -140,11 +140,11 @@ const columns = (type: string) => {
       prop: 'cumulativeCompletedWells'
     },
     {
-      label: '累计用电量(KWH)',
+      label: '累计用电量(MWh)',
       prop: 'cumulativePowerConsumption'
     },
     {
-      label: '累计油耗()',
+      label: '累计油耗(万升)',
       prop: 'cumulativeFuelConsumption'
     },
     {
@@ -175,7 +175,9 @@ const getList = useDebounceFn(async () => {
       ({ id, projectDeptId, projectDeptName, teamId, teamName, sort, taskId, type, ...other }) => ({
         id: type === '2' ? projectDeptId : teamId,
         name: type === '2' ? projectDeptName : teamName,
-        ...other
+        ...other,
+        cumulativePowerConsumption: (other.cumulativePowerConsumption || 0) / 1000,
+        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0) / 10000
       })
     )
   } finally {
@@ -210,8 +212,8 @@ const xAxisData = ref<string[]>([])
 const legend = ref<string[][]>([
   ['累计施工井数 (个)', 'cumulativeConstructWells'],
   ['累计完工井数 (个)', 'cumulativeCompletedWells'],
-  ['累计油耗 ()', 'cumulativeFuelConsumption'],
-  ['累计用电量 (KWH)', 'cumulativePowerConsumption'],
+  ['累计油耗 (万升)', 'cumulativeFuelConsumption'],
+  ['累计用电量 (MWh)', 'cumulativePowerConsumption'],
   ['平均时效 (%)', 'transitTime']
 ])
 
@@ -232,10 +234,10 @@ const getChart = useDebounceFn(async () => {
     const res = await IotRyDailyReportApi.getIotRyDailyReportSummaryPolyline(query.value)
 
     chartData.value = {
-      cumulativeFuelConsumption: res.map((item) => item.cumulativeFuelConsumption || 0),
+      cumulativeFuelConsumption: res.map((item) => (item.cumulativeFuelConsumption || 0) / 10000),
       cumulativeConstructWells: res.map((item) => item.cumulativeConstructWells || 0),
       cumulativeCompletedWells: res.map((item) => item.cumulativeCompletedWells || 0),
-      cumulativePowerConsumption: res.map((item) => item.cumulativePowerConsumption || 0),
+      cumulativePowerConsumption: res.map((item) => (item.cumulativePowerConsumption || 0) / 1000),
       transitTime: res.map((item) => (item.transitTime || 0) * 100)
     }