重构作业结构:优化实体模型、DTO映射和前端界面
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 13s
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 13s
- 重构AppMainStruct、AssignmentQuestion、Question等实体模型 - 更新相关DTO以匹配新的数据结构 - 优化前端页面布局和组件 - 添加全局信息和笔记功能相关代码 - 更新数据库迁移和程序配置
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<MudPaper Class="ma-2 pa-2 rounded-xl d-flex flex-column flex-grow-1 overflow-auto" MaxHeight="100%">
|
||||
|
||||
<StudentSubmissionPreviewCard />
|
||||
@foreach (var submission in _studentSubmissions)
|
||||
{
|
||||
<StudentSubmissionPreviewCard StudentSubmission="@submission" />
|
||||
}
|
||||
|
||||
|
||||
</MudPaper>
|
||||
|
||||
@code {
|
||||
// 假设的学生提交数据模型
|
||||
public class StudentSubmission
|
||||
{
|
||||
public string StudentName { get; set; }
|
||||
public int TotalProblems { get; set; }
|
||||
public int ErrorCount { get; set; }
|
||||
public TimeSpan TimeSpent { get; set; }
|
||||
public int Score { get; set; }
|
||||
}
|
||||
|
||||
// 模拟数据列表
|
||||
private List<StudentSubmission> _studentSubmissions = new();
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
// 模拟获取或初始化数据,实际应用中可能来自数据库或API
|
||||
_studentSubmissions = new List<StudentSubmission>
|
||||
{
|
||||
new() { StudentName = "张三", TotalProblems = 10, ErrorCount = 2, TimeSpent = TimeSpan.FromMinutes(25), Score = 80 },
|
||||
new() { StudentName = "李四", TotalProblems = 10, ErrorCount = 1, TimeSpent = TimeSpan.FromMinutes(20), Score = 90 },
|
||||
new() { StudentName = "王五", TotalProblems = 10, ErrorCount = 5, TimeSpent = TimeSpan.FromMinutes(30), Score = 50 },
|
||||
new() { StudentName = "赵六", TotalProblems = 10, ErrorCount = 3, TimeSpent = TimeSpan.FromMinutes(28), Score = 70 },
|
||||
new() { StudentName = "钱七", TotalProblems = 10, ErrorCount = 0, TimeSpent = TimeSpan.FromMinutes(18), Score = 100 }
|
||||
// ... 可以添加更多模拟数据
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user