feat: 重构UI界面,添加匹配条件配置、日志系统,优化匹配算法

This commit is contained in:
2026-04-29 19:11:46 +08:00
parent 876712fe7e
commit 304856429c
2 changed files with 530 additions and 569 deletions

View File

@@ -47,10 +47,10 @@ for i, name in enumerate(student_names):
else: else:
student[day] = '' student[day] = ''
history_count = min(5, i) history_count = random.randint(0, 3)
available_teachers = [t for t in teacher_names if t != name] available_teachers = [t for t in teacher_names if t != name]
if available_teachers: if available_teachers and history_count > 0:
history_teachers = random.sample(available_teachers, history_count) history_teachers = random.sample(available_teachers, min(history_count, len(available_teachers)))
student["历史匹配老师"] = ', '.join(history_teachers) student["历史匹配老师"] = ', '.join(history_teachers)
else: else:
student["历史匹配老师"] = "" student["历史匹配老师"] = ""

1055
main.py

File diff suppressed because it is too large Load Diff