yanghao hai 2 días
pai
achega
d422e32151

+ 29 - 39
src/views/pms/iotrddailyreport/index.vue

@@ -72,7 +72,6 @@
           </el-form-item>
         </el-form>
       </ContentWrap>
-
       <!-- 列表 -->
       <ContentWrap ref="tableContainerRef">
         <el-table
@@ -100,13 +99,7 @@
             :min-width="columnWidths.deptName.width"
             resizable
           />
-          <el-table-column
-            label="项目"
-            align="center"
-            prop="contractName"
-            :min-width="columnWidths.contractName.width"
-            resizable
-          />
+
           <el-table-column
             label="任务"
             align="center"
@@ -114,13 +107,7 @@
             :min-width="columnWidths.taskName.width"
             resizable
           />
-          <el-table-column
-            label="时间节点"
-            align="center"
-            prop="timeRange"
-            :min-width="columnWidths.timeRange.width"
-            resizable
-          />
+
           <el-table-column
             :label="t('project.status')"
             align="center"
@@ -132,20 +119,20 @@
               <dict-tag :type="DICT_TYPE.PMS_PROJECT_RD_STATUS" :value="scope.row.rdStatus" />
             </template>
           </el-table-column>
+
           <el-table-column
-            label="项目"
+            label="当日生产动态"
             align="center"
-            prop="contractName"
-            :width="columnWidths.contractName"
-            v-if="false"
+            prop="productionStatus"
+            :min-width="columnWidths.productionStatus.width"
+            resizable
           />
-
           <el-table-column
-            label="时间节点"
+            label="下步工作计划"
             align="center"
-            prop="timeRange"
-            :width="columnWidths.timeRange"
-            v-if="false"
+            prop="nextPlan"
+            :min-width="columnWidths.nextPlan.width"
+            fixed-width
           />
 
           <!--
@@ -220,20 +207,7 @@
             :min-width="columnWidths.dailyFuel.width"
             resizable
           />
-          <el-table-column
-            label="当日生产动态"
-            align="center"
-            prop="productionStatus"
-            :min-width="columnWidths.productionStatus.width"
-            resizable
-          />
-          <el-table-column
-            label="下步工作计划"
-            align="center"
-            prop="nextPlan"
-            :min-width="columnWidths.nextPlan.width"
-            fixed-width
-          />
+
           <el-table-column
             label="外租设备"
             align="center"
@@ -255,6 +229,20 @@
             :min-width="columnWidths.faultDowntime.width"
             resizable
           />
+          <el-table-column
+            label="项目"
+            align="center"
+            prop="contractName"
+            :min-width="columnWidths.contractName.width"
+            resizable
+          />
+          <el-table-column
+            label="时间节点"
+            align="center"
+            prop="timeRange"
+            :min-width="columnWidths.timeRange.width"
+            resizable
+          />
 
           <el-table-column label="操作" align="center" min-width="120px" fixed="right">
             <template #default="scope">
@@ -294,7 +282,7 @@
 </template>
 
 <script setup lang="ts">
-import { dateFormatter2 } from '@/utils/formatTime'
+import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
 import download from '@/utils/download'
 import { IotRdDailyReportApi, IotRdDailyReportVO } from '@/api/pms/iotrddailyreport'
 import IotRdDailyReportForm from './IotRdDailyReportForm.vue'
@@ -612,6 +600,8 @@ const calculateColumnWidths = useDebounceFn(() => {
         ]
       ) + 'px'
 
+    console.log('width :>> ', width)
+
     columnWidths.value[prop].width = width
   })
 }, 1000)

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

@@ -47,6 +47,13 @@ const totalWorkKeys: [string, string, string, string, number][] = [
     0
   ],
   ['notReported', '个', '未填报', 'i-material-symbols:cancel-outline-rounded text-rose', 0],
+  [
+    'averageFuelConsumption',
+    '升',
+    '平均油耗',
+    'i-material-symbols:directions-car-outline-rounded text-sky',
+    2
+  ],
   [
     'totalFuelConsumption',
     '升',
@@ -70,7 +77,8 @@ const totalWork = ref({
   notReported: 0,
   totalFuelConsumption: 0,
   totalPowerConsumption: 0,
-  totalFootage: 0
+  totalFootage: 0,
+  averageFuelConsumption: 0
 })
 
 const totalLoading = ref(false)
@@ -101,7 +109,8 @@ const getTotal = useDebounceFn(async () => {
       ...res2,
       totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
       totalGasInjection: (res2.totalGasInjection || 0) / 10000,
-      totalFuelConsumption: res2.totalFuelConsumption || 0
+      totalFuelConsumption: res2.totalFuelConsumption || 0,
+      averageFuelConsumption: res2.averageFuelConsumption || 0
     }
   } finally {
     totalLoading.value = false
@@ -118,6 +127,7 @@ interface List {
   cumulativeFuelConsumption: number | null
   transitTime: number | null
   nonProductiveTime: number | null
+  averageFuelConsumption: number | null
 }
 
 const list = ref<List[]>([])
@@ -142,6 +152,10 @@ const columns = (type: string) => {
       label: '累计油耗(升)',
       prop: 'cumulativeFuelConsumption'
     },
+    {
+      label: '平均油耗(升)',
+      prop: 'averageFuelConsumption'
+    },
     {
       label: '平均时效(%)',
       prop: 'transitTime'
@@ -178,7 +192,8 @@ const getList = useDebounceFn(async () => {
         name: type === '2' ? projectDeptName : teamName,
         ...other,
         cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(2),
-        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2)
+        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2),
+        averageFuelConsumption: (other.averageFuelConsumption || 0).toFixed(2)
       })
     )
   } finally {
@@ -527,7 +542,7 @@ const tolist = (id: number, non: boolean = false) => {
           <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
         </el-form-item>
       </el-form>
-      <div class="grid grid-cols-6 gap-8">
+      <div class="grid grid-cols-7 gap-8">
         <div
           v-for="info in totalWorkKeys"
           :key="info[0]"

+ 19 - 4
src/views/pms/iotrydailyreport/xsummary.vue

@@ -54,6 +54,13 @@ const totalWorkKeys: [string, string, string, string, number][] = [
     'i-material-symbols:directions-car-outline-rounded text-sky',
     2
   ],
+  [
+    'averageFuelConsumption',
+    '升',
+    '平均油耗',
+    'i-material-symbols:directions-car-outline-rounded text-sky',
+    2
+  ],
   [
     'totalPowerConsumption',
     'MWh',
@@ -72,7 +79,8 @@ const totalWork = ref({
   totalFuelConsumption: 0,
   totalPowerConsumption: 0,
   constructionWells: 0,
-  completedWells: 0
+  completedWells: 0,
+  averageFuelConsumption: 0
 })
 
 const totalLoading = ref(false)
@@ -103,7 +111,8 @@ const getTotal = useDebounceFn(async () => {
       completedWells: 0,
       ...res2,
       totalPowerConsumption: (res2.totalPowerConsumption || 0) / 1000,
-      totalFuelConsumption: res2.totalFuelConsumption || 0
+      totalFuelConsumption: res2.totalFuelConsumption || 0,
+      averageFuelConsumption: res2.averageFuelConsumption || 0
     }
   } finally {
     totalLoading.value = false
@@ -120,6 +129,7 @@ interface List {
   cumulativeFuelConsumption: number | null
   transitTime: number | null
   nonProductiveTime: number | null
+  averageFuelConsumption: number | null
 }
 
 const list = ref<List[]>([])
@@ -148,6 +158,10 @@ const columns = (type: string) => {
       label: '累计油耗(升)',
       prop: 'cumulativeFuelConsumption'
     },
+    {
+      label: '平均油耗(升)',
+      prop: 'averageFuelConsumption'
+    },
     {
       label: '平均时效(%)',
       prop: 'transitTime'
@@ -184,7 +198,8 @@ const getList = useDebounceFn(async () => {
         name: type === '2' ? projectDeptName : teamName,
         ...other,
         cumulativePowerConsumption: ((other.cumulativePowerConsumption || 0) / 1000).toFixed(2),
-        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2)
+        cumulativeFuelConsumption: (other.cumulativeFuelConsumption || 0).toFixed(2),
+        averageFuelConsumption: (other.averageFuelConsumption || 0).toFixed(2)
       })
     )
   } finally {
@@ -525,7 +540,7 @@ const tolist = (id: number, non: boolean = false) => {
           <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
         </el-form-item>
       </el-form>
-      <div class="grid grid-cols-7 gap-8">
+      <div class="grid grid-cols-8 gap-8">
         <div
           v-for="info in totalWorkKeys"
           :key="info[0]"