ljm 修改备份

This commit is contained in:
李鹏宇
2024-12-26 17:37:11 +08:00
parent fadb875c04
commit 1fd655872b
@@ -188,15 +188,15 @@ patch(PlanningGanttRenderer.prototype, {
group.end_time = groupSlotTemplate?.end_time || 0;
group.end_time2 = groupSlotTemplate?.end_time2 || 0;
group.day2 = groupSlotTemplate?.day2 || '';
group.planning_name = groupSlotTemplate?.planning_name;
group.planning_name = groupSlotTemplate?.planning_name || '';
// 拼接显示信息
// 拼接显示信息,根据 day2 是否有值来决定显示内容
if (group.day2) {
// 如果 day2 有值,显示 day2 的时间
group.ganttLegend = `${groupSlotTemplate.planning_name} : ${floatToTime(group.start_time)} - ${groupSlotTemplate.day2} ${floatToTime(group.end_time2)}`;
group.ganttLegend = `${group.planning_name} : ${floatToTime(group.start_time)} - ${group.day2} ${floatToTime(group.end_time2)}`;
} else {
// 如果 day2 没有值,正常显示
group.ganttLegend = `${groupSlotTemplate.planning_name} : ${floatToTime(group.start_time)} - ${floatToTime(group.end_time)}`;
group.ganttLegend = `${group.planning_name} : ${floatToTime(group.start_time)} - ${floatToTime(group.end_time)}`;
}
});
},