日均消耗
- ¥{(totalCost / 7).toFixed(2)}
+ ¥{(totalCost / Math.max(usageTrend.length, 1)).toFixed(2)}
最高单日
- ¥{Math.max(...MOCK_USAGE_TREND.map(d => d.cost)).toFixed(2)}
+ ¥{usageTrend.length > 0 ? Math.max(...usageTrend.map(d => d.cost)).toFixed(2) : "0.00"}
最低单日
- ¥{Math.min(...MOCK_USAGE_TREND.map(d => d.cost)).toFixed(2)}
+ ¥{usageTrend.length > 0 ? Math.min(...usageTrend.filter(d => d.cost > 0).map(d => d.cost)).toFixed(2) : "0.00"}
@@ -412,7 +409,7 @@ export default function OpcCompute() {