fix: 效能分析默认时间恢复今天,删除伪造1h兜底,轨迹流转X轴四行展示

This commit is contained in:
2026-09-03 16:27:10 +08:00
parent cd5a904a16
commit f65f6e12c6

View File

@ -418,7 +418,7 @@ export default function AnalyticsDashboard() {
});
// 1. 预计算每台设备的统计:累计投入、空闲时长、人员排序(按 isWorkday 选偏移/时长)
const deviceStats = chunkDevices.map((d, idx) => {
const deviceStats = chunkDevices.map((_, idx) => {
let totalInputHours = 0;
const personHours: Record<string, number> = {};
const intervals: [number, number][] = [];
@ -462,7 +462,8 @@ export default function AnalyticsDashboard() {
});
// 背景主干高度:所选模式下的总生命周期(严丝合缝,消除自然空闲断层)
const leadByMode = chunkDevices.map((d, idx) => {
// 🔧 不再伪造 1h设备该是多长就返回多长0 也是 0绝不显示虚假的 1h 兜底)
const leadByMode = chunkDevices.map((_, idx) => {
let maxEnd = 0;
chunkSeries.forEach((s) => s.data.forEach((t) => {
if (t[0] === idx) {
@ -470,7 +471,7 @@ export default function AnalyticsDashboard() {
if (e > maxEnd) maxEnd = e;
}
}));
return Math.max(maxEnd, 1);
return maxEnd;
});
return {