|
|
@@ -800,6 +800,19 @@ const cellStyle = ({
|
|
|
rowIndex: number
|
|
|
columnIndex: number
|
|
|
}) => {
|
|
|
+ // 当日油耗预警逻辑
|
|
|
+ if (column.property === 'dailyFuel') {
|
|
|
+ const dailyFuel = parseFloat(row.dailyFuel) || 0;
|
|
|
+ if (dailyFuel > 5) {
|
|
|
+ return {
|
|
|
+ backgroundColor: '#e6f8ff', // 浅黄色背景
|
|
|
+ color: '#0a35c4', // 橙色文字
|
|
|
+ fontWeight: 'bold',
|
|
|
+ border: '1px solid #ffd591' // 可选:添加边框突出显示
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 1. 检查三个时间字段:额定生产时间、生产时间、非生产时间
|
|
|
const timeFields = ['ratedProductionTime', 'productionTime', 'nonProductionTime']
|
|
|
if (timeFields.includes(column.property)) {
|
|
|
@@ -1118,6 +1131,11 @@ watch(
|
|
|
.color-indicator.orange {
|
|
|
background-color: orange;
|
|
|
}
|
|
|
+
|
|
|
+/* 在原有样式基础上添加黄色指示器 */
|
|
|
+.color-indicator.yellow {
|
|
|
+ background-color: #0a35c4; /* 黄色,与警告颜色一致 */
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<style>
|