|
@@ -266,6 +266,14 @@
|
|
|
:min-width="columnWidths.dailyOilUsage.width"
|
|
:min-width="columnWidths.dailyOilUsage.width"
|
|
|
resizable
|
|
resizable
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="气电比"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="gasElectricityRatio"
|
|
|
|
|
+ :formatter="gasElectricityRatioFormatter"
|
|
|
|
|
+ :min-width="columnWidths.gasElectricityRatio.width"
|
|
|
|
|
+ resizable
|
|
|
|
|
+ />
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="非生产时间" align="center">
|
|
<el-table-column label="非生产时间" align="center">
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -695,6 +703,11 @@ const columnWidths = ref<
|
|
|
prop: 'dailyOilUsage',
|
|
prop: 'dailyOilUsage',
|
|
|
width: '120px'
|
|
width: '120px'
|
|
|
},
|
|
},
|
|
|
|
|
+ gasElectricityRatio: {
|
|
|
|
|
+ label: '气电比',
|
|
|
|
|
+ prop: 'gasElectricityRatio',
|
|
|
|
|
+ width: '120px'
|
|
|
|
|
+ },
|
|
|
accidentTime: {
|
|
accidentTime: {
|
|
|
label: '工程质量',
|
|
label: '工程质量',
|
|
|
prop: 'accidentTime',
|
|
prop: 'accidentTime',
|
|
@@ -806,6 +819,12 @@ const columnWidths = ref<
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const gasElectricityRatioFormatter = (row: any) => {
|
|
|
|
|
+ const gasElectricityRatio = row?.gasElectricityRatio ?? 0
|
|
|
|
|
+
|
|
|
|
|
+ return (gasElectricityRatio * 100).toFixed(2) + '%'
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 计算文本宽度
|
|
// 计算文本宽度
|
|
|
const getTextWidth = (text: string, fontSize = 12) => {
|
|
const getTextWidth = (text: string, fontSize = 12) => {
|
|
|
const span = document.createElement('span')
|
|
const span = document.createElement('span')
|
|
@@ -836,7 +855,12 @@ const calculateColumnWidths = useDebounceFn(() => {
|
|
|
return getTextWidth(fn ? fn(v) : v[prop])
|
|
return getTextWidth(fn ? fn(v) : v[prop])
|
|
|
})
|
|
})
|
|
|
]
|
|
]
|
|
|
- ) + (label === '施工状态' || label === '非生产时间原因' ? 30 : 20),
|
|
|
|
|
|
|
+ ) +
|
|
|
|
|
+ (label === '施工状态' || label === '非生产时间原因'
|
|
|
|
|
+ ? 30
|
|
|
|
|
+ : label === '气电比'
|
|
|
|
|
+ ? 40
|
|
|
|
|
+ : 20),
|
|
|
200
|
|
200
|
|
|
]
|
|
]
|
|
|
) + 'px'
|
|
) + 'px'
|