|
@@ -85,6 +85,8 @@ const { list, loading, total, pageNo, pageSize, showAction, isIndex } = toRefs(p
|
|
|
|
|
|
|
|
const { ZmTable, ZmTableColumn } = useTableComponents<ListItem>()
|
|
const { ZmTable, ZmTableColumn } = useTableComponents<ListItem>()
|
|
|
|
|
|
|
|
|
|
+const GAS_ELECTRICITY_RATIO_WARNING_THRESHOLD = 15
|
|
|
|
|
+
|
|
|
function percentageFormatter(row: ListItem) {
|
|
function percentageFormatter(row: ListItem) {
|
|
|
const capacity = Number(row?.capacity)
|
|
const capacity = Number(row?.capacity)
|
|
|
const dailyGasInjection = Number(row?.dailyGasInjection)
|
|
const dailyGasInjection = Number(row?.dailyGasInjection)
|
|
@@ -107,6 +109,12 @@ function unitformatter(
|
|
|
return (value / 10000).toFixed(4)
|
|
return (value / 10000).toFixed(4)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const isGasElectricityRatioWarning = (value: unknown) => {
|
|
|
|
|
+ const ratio = Number(value)
|
|
|
|
|
+
|
|
|
|
|
+ return Number.isFinite(ratio) && ratio > GAS_ELECTRICITY_RATIO_WARNING_THRESHOLD
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const cellStyle = ({ row, column }: { row: any; column: any }) => {
|
|
const cellStyle = ({ row, column }: { row: any; column: any }) => {
|
|
|
if (column.property === 'transitTime') {
|
|
if (column.property === 'transitTime') {
|
|
|
const capacity = Number(row?.capacity)
|
|
const capacity = Number(row?.capacity)
|
|
@@ -122,6 +130,17 @@ const cellStyle = ({ row, column }: { row: any; column: any }) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (
|
|
|
|
|
+ column.property === 'gasElectricityRatio' &&
|
|
|
|
|
+ isGasElectricityRatioWarning(row?.gasElectricityRatio)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ color: 'var(--el-color-warning)',
|
|
|
|
|
+ fontWeight: 'bold'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return {}
|
|
return {}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -146,22 +165,19 @@ function handleCurrentChange(val: number) {
|
|
|
:max-height="height"
|
|
:max-height="height"
|
|
|
:height="height"
|
|
:height="height"
|
|
|
show-border
|
|
show-border
|
|
|
- :cell-style="cellStyle"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ :cell-style="cellStyle">
|
|
|
<zm-table-column
|
|
<zm-table-column
|
|
|
v-if="isIndex"
|
|
v-if="isIndex"
|
|
|
type="index"
|
|
type="index"
|
|
|
:label="t('monitor.serial')"
|
|
:label="t('monitor.serial')"
|
|
|
:width="60"
|
|
:width="60"
|
|
|
- fixed="left"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ fixed="left" />
|
|
|
<zm-table-column
|
|
<zm-table-column
|
|
|
label="日期"
|
|
label="日期"
|
|
|
prop="createTime"
|
|
prop="createTime"
|
|
|
fixed="left"
|
|
fixed="left"
|
|
|
cover-formatter
|
|
cover-formatter
|
|
|
- :real-value="(row: ListItem) => dayjs(row.createTime).format('YYYY-MM-DD')"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :real-value="(row: ListItem) => dayjs(row.createTime).format('YYYY-MM-DD')" />
|
|
|
<zm-table-column label="施工队伍" prop="deptName" fixed="left" />
|
|
<zm-table-column label="施工队伍" prop="deptName" fixed="left" />
|
|
|
<zm-table-column label="任务" prop="taskName" fixed="left" />
|
|
<zm-table-column label="任务" prop="taskName" fixed="left" />
|
|
|
<zm-table-column
|
|
<zm-table-column
|
|
@@ -171,13 +187,11 @@ function handleCurrentChange(val: number) {
|
|
|
:real-value="
|
|
:real-value="
|
|
|
(row: ListItem) =>
|
|
(row: ListItem) =>
|
|
|
realValue(DICT_TYPE.PMS_PROJECT_TASK_SCHEDULE, row.constructionStatus ?? '')
|
|
realValue(DICT_TYPE.PMS_PROJECT_TASK_SCHEDULE, row.constructionStatus ?? '')
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<dict-tag
|
|
<dict-tag
|
|
|
:type="DICT_TYPE.PMS_PROJECT_TASK_SCHEDULE"
|
|
:type="DICT_TYPE.PMS_PROJECT_TASK_SCHEDULE"
|
|
|
- :value="scope.row.constructionStatus ?? ''"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :value="scope.row.constructionStatus ?? ''" />
|
|
|
</template>
|
|
</template>
|
|
|
</zm-table-column>
|
|
</zm-table-column>
|
|
|
<zm-table-column prop="auditStatus" label="审批状态" v-if="!isIndex">
|
|
<zm-table-column prop="auditStatus" label="审批状态" v-if="!isIndex">
|
|
@@ -204,15 +218,13 @@ function handleCurrentChange(val: number) {
|
|
|
label="运行时效"
|
|
label="运行时效"
|
|
|
prop="transitTime"
|
|
prop="transitTime"
|
|
|
cover-formatter
|
|
cover-formatter
|
|
|
- :real-value="percentageFormatter"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :real-value="percentageFormatter" />
|
|
|
<zm-table-column label="当日">
|
|
<zm-table-column label="当日">
|
|
|
<zm-table-column
|
|
<zm-table-column
|
|
|
label="注气量(万方)"
|
|
label="注气量(万方)"
|
|
|
prop="dailyGasInjection"
|
|
prop="dailyGasInjection"
|
|
|
cover-formatter
|
|
cover-formatter
|
|
|
- :real-value="unitformatter"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :real-value="unitformatter" />
|
|
|
<zm-table-column label="注水量(方)" prop="dailyWaterInjection" />
|
|
<zm-table-column label="注水量(方)" prop="dailyWaterInjection" />
|
|
|
<zm-table-column label="注气时间(H)" prop="dailyInjectGasTime" />
|
|
<zm-table-column label="注气时间(H)" prop="dailyInjectGasTime" />
|
|
|
<zm-table-column label="注水时间(H)" prop="dailyInjectWaterTime" />
|
|
<zm-table-column label="注水时间(H)" prop="dailyInjectWaterTime" />
|
|
@@ -224,8 +236,7 @@ function handleCurrentChange(val: number) {
|
|
|
prop="nonProductionRate"
|
|
prop="nonProductionRate"
|
|
|
label="非生产时效"
|
|
label="非生产时效"
|
|
|
cover-formatter
|
|
cover-formatter
|
|
|
- :real-value="(row) => (Number(row.nonProductionRate ?? 0) * 100).toFixed(2) + '%'"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :real-value="(row) => (Number(row.nonProductionRate ?? 0) * 100).toFixed(2) + '%'" />
|
|
|
<zm-table-column label="非生产时间">
|
|
<zm-table-column label="非生产时间">
|
|
|
<zm-table-column prop="accidentTime" label="工程质量" />
|
|
<zm-table-column prop="accidentTime" label="工程质量" />
|
|
|
<zm-table-column prop="repairTime" label="设备故障" />
|
|
<zm-table-column prop="repairTime" label="设备故障" />
|
|
@@ -265,8 +276,7 @@ function handleCurrentChange(val: number) {
|
|
|
label="产能(万方)"
|
|
label="产能(万方)"
|
|
|
cover-formatter
|
|
cover-formatter
|
|
|
:action="!showAction"
|
|
:action="!showAction"
|
|
|
- :real-value="unitformatter"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :real-value="unitformatter" />
|
|
|
|
|
|
|
|
<zm-table-column label="操作" :width="120" fixed="right" action v-if="showAction">
|
|
<zm-table-column label="操作" :width="120" fixed="right" action v-if="showAction">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
@@ -288,8 +298,7 @@ function handleCurrentChange(val: number) {
|
|
|
:total="total"
|
|
:total="total"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|