重构作业结构:优化实体模型、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:
37
TechHelper.Client/Pages/Common/GlobalInfoCard.razor
Normal file
37
TechHelper.Client/Pages/Common/GlobalInfoCard.razor
Normal file
@@ -0,0 +1,37 @@
|
||||
@using Entities.DTO
|
||||
@using Entities.Contracts
|
||||
@using Helper
|
||||
|
||||
<MudPaper Elevation=5 Class="w-100 pa-5 rounded-xl" Height="@Height" Style="@Style">
|
||||
<MudTextField Value="@AssignmentDto.Title"></MudTextField>
|
||||
<MudTextField Value="@AssignmentDto.Score">SCORE</MudTextField>
|
||||
<MudTextField Value="@AssignmentDto.TotalQuestions">NUMQUESTION</MudTextField>
|
||||
<MudChipSet T="SubjectAreaEnum" SelectedValue="@AssignmentDto.SubjectArea" CheckMark SelectionMode="SelectionMode.SingleSelection" SelectedValueChanged="HandleQTSelectedValueChanged">
|
||||
|
||||
@foreach (SubjectAreaEnum item in Enum.GetValues(typeof(SubjectAreaEnum)))
|
||||
{
|
||||
var color = Helper.GetColorFromInt((int)item);
|
||||
<MudChip Color=@color
|
||||
Value="@item">
|
||||
</MudChip>
|
||||
}
|
||||
</MudChipSet>
|
||||
<MudText>DUETIME</MudText>
|
||||
<MudText>EXAMTYPE</MudText>
|
||||
</MudPaper>
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
|
||||
public AssignmentDto AssignmentDto { get; set; }
|
||||
[Parameter]
|
||||
public string Style { get; set; }
|
||||
[Parameter]
|
||||
public string Height { get; set; } = "auto";
|
||||
|
||||
public void HandleQTSelectedValueChanged(SubjectAreaEnum subject)
|
||||
{
|
||||
AssignmentDto.SubjectArea = subject;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user