Jelajahi Sumber

🦄 refactor: 气电比调整

Zimo 11 jam lalu
induk
melakukan
1b5fbf0f08

+ 1 - 6
src/views/pms/iotrhdailyreport/approval.vue

@@ -179,12 +179,7 @@ const columns = ref<Column[]>([
       {
         label: '气电比',
         prop: 'gasElectricityRatio',
-        'min-width': '120px',
-        formatter: (row: List) => {
-          const gasElectricityRatio = row?.gasElectricityRatio ?? 0
-
-          return (gasElectricityRatio * 100).toFixed(2) + '%'
-        }
+        'min-width': '120px'
       }
     ]
   },

+ 1 - 6
src/views/pms/iotrhdailyreport/fill.vue

@@ -179,12 +179,7 @@ const columns = ref<Column[]>([
       {
         label: '气电比',
         prop: 'gasElectricityRatio',
-        'min-width': '120px',
-        formatter: (row: List) => {
-          const gasElectricityRatio = row?.gasElectricityRatio ?? 0
-
-          return (gasElectricityRatio * 100).toFixed(2) + '%'
-        }
+        'min-width': '120px'
       }
     ]
   },

+ 0 - 7
src/views/pms/iotrhdailyreport/index.vue

@@ -270,7 +270,6 @@
                 label="气电比"
                 align="center"
                 prop="gasElectricityRatio"
-                :formatter="gasElectricityRatioFormatter"
                 :min-width="columnWidths.gasElectricityRatio.width"
                 resizable
               />
@@ -840,12 +839,6 @@ const nonProductionRateFormatter = (row: any) => {
   return (nonProductionRate * 100).toFixed(2) + '%'
 }
 
-const gasElectricityRatioFormatter = (row: any) => {
-  const gasElectricityRatio = row?.gasElectricityRatio ?? 0
-
-  return (gasElectricityRatio * 100).toFixed(2) + '%'
-}
-
 // 计算文本宽度
 const getTextWidth = (text: string, fontSize = 12) => {
   const span = document.createElement('span')