
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 30s
- 添加学生提交管理服务 (StudentSubmissionService, StudentSubmissionDetailService) - 新增学生提交相关控制器 (StudentSubmissionController, StudentSubmissionDetailController) - 添加学生提交数据传输对象 (StudentSubmissionDetailDto, StudentSubmissionSummaryDto) - 新增学生提交相关页面组件 (StudentExamView, ExamDetailView, StudentCard等) - 添加学生提交信息卡片组件 (SubmissionInfoCard, TeacherSubmissionInfoCard) - 更新数据库迁移文件以支持提交系统
65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
@using Entities.DTO
|
|
@using Microsoft.AspNetCore.Authorization
|
|
@using TechHelper.Client.Exam
|
|
@using TechHelper.Client.Pages.Common.Exam
|
|
|
|
@page "/exam/manage"
|
|
@using Entities.DTO
|
|
@using TechHelper.Client.Services
|
|
@attribute [Authorize]
|
|
|
|
|
|
@if (isloding)
|
|
{
|
|
<MudText> 正在加载 </MudText>
|
|
}
|
|
else
|
|
{
|
|
|
|
}
|
|
|
|
<MudPaper Class="d-flex flex-wrap flex-grow-0 gap-4" Height="100%" Width="100%">
|
|
@foreach (var item in examDtos)
|
|
{
|
|
}
|
|
</MudPaper>
|
|
|
|
@code {
|
|
[Inject]
|
|
public IExamService ExamService { get; set; }
|
|
|
|
[Inject]
|
|
public ISnackbar Snackbar { get; set; }
|
|
|
|
[CascadingParameter]
|
|
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
|
|
|
private List<AssignmentDto> examDtos = new List<AssignmentDto>();
|
|
|
|
private bool isloding = true;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
GetExam();
|
|
}
|
|
|
|
|
|
private async void GetExam()
|
|
{
|
|
isloding = true;
|
|
Snackbar.Add("正在加载", Severity.Info);
|
|
var result = await ExamService.GetAllExam();
|
|
if (result.Status)
|
|
{
|
|
examDtos = result.Result as List<AssignmentDto> ?? new List<AssignmentDto>();
|
|
Snackbar.Add("加载成功", Severity.Info);
|
|
}
|
|
else
|
|
{
|
|
Snackbar.Add($"加载失败 {result.Message}", Severity.Error);
|
|
}
|
|
isloding = false;
|
|
StateHasChanged();
|
|
}
|
|
}
|