重构项目结构,移除Assignment相关功能,优化Submission模块
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
public QuestionDto Question { get; set; } = new QuestionDto();
|
||||
|
||||
[Parameter]
|
||||
public AssignmentStructType Type { get; set; } = AssignmentStructType.Question;
|
||||
public ExamStructType Type { get; set; } = ExamStructType.Question;
|
||||
|
||||
[Parameter]
|
||||
public byte Index { get; set; } = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@using Entities.DTO
|
||||
@using Entities.Contracts
|
||||
@using Entities.Contracts
|
||||
@using Entities.DTO
|
||||
@using Newtonsoft.Json
|
||||
@using TechHelper.Client.Exam
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
@* <MudText>@Question.Id</MudText> *@
|
||||
<MudText Class="mt-3" Typo="Typo.button"><b>问题属性</b></MudText>
|
||||
|
||||
<MudChipSet T="string" SelectedValue="@Question.QType" CheckMark SelectionMode="SelectionMode.SingleSelection" SelectedValueChanged="HandleQTSelectedValueChanged">
|
||||
|
||||
@* <MudChipSet T="string" SelectedValue="@Question.QType" CheckMark SelectionMode="SelectionMode.SingleSelection" SelectedValueChanged="HandleQTSelectedValueChanged">
|
||||
@foreach (var item in QuestionTypes)
|
||||
{
|
||||
var qt = item;
|
||||
@* Style = "@($"background - color:{ item.Value.Color} ")"*@
|
||||
|
||||
<MudChip Style="@(qt.Key == Question.QType ?
|
||||
$"background-color:#ffffff; color:{item.Value.Color}" :
|
||||
$"background-color:{item.Value.Color}; color:#ffffff")"
|
||||
@@ -22,7 +19,9 @@
|
||||
@item.Value.DisplayName
|
||||
</MudChip>
|
||||
}
|
||||
</MudChipSet>
|
||||
</MudChipSet> *@
|
||||
|
||||
|
||||
<MudRating SelectedValue="@(diffi)" SelectedValueChanged="HandleSelected" Size="Size.Small" />
|
||||
<MudTextField @bind-Value="Question.Title" Label="Title" Variant="Variant.Text" Margin="Margin.Dense" AutoGrow="true" />
|
||||
<MudTextField @bind-Value="Question.Answer" Label="Answer" Variant="Variant.Text" Adornment="Adornment.End" AdornmentText="." Margin="Margin.Dense" AutoGrow="true" />
|
||||
@@ -35,7 +34,7 @@
|
||||
[Parameter]
|
||||
public QuestionDto Question { get; set; } = new QuestionDto();
|
||||
public int diffi = 0;
|
||||
Dictionary<string, QuestionDisplayTypeData> QuestionTypes = new Dictionary<string, QuestionDisplayTypeData>();
|
||||
// Dictionary<string, QuestionDisplayTypeData> QuestionTypes = new Dictionary<string, QuestionDisplayTypeData>();
|
||||
|
||||
[Inject]
|
||||
private ILocalStorageService LocalStorageService { get; set; }
|
||||
@@ -43,26 +42,23 @@
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
var cs = LocalStorageService.GetItem<string>("GlobalInfo");
|
||||
var GlobalInfo = JsonConvert.DeserializeObject<Dictionary<string, QuestionDisplayTypeData>>(cs);
|
||||
if (GlobalInfo != null)
|
||||
{
|
||||
QuestionTypes = GlobalInfo;
|
||||
}
|
||||
// var cs = LocalStorageService.GetItem<string>("GlobalInfo");
|
||||
// var GlobalInfo = JsonConvert.DeserializeObject<Dictionary<string, QuestionDisplayTypeData>>(cs);
|
||||
// if (GlobalInfo != null)
|
||||
// {
|
||||
// }
|
||||
}
|
||||
private void HandleSelectedValueChanged(QuestionType type)
|
||||
{
|
||||
Question.Type = type;
|
||||
}
|
||||
|
||||
private void HandleSelected(int num)
|
||||
{
|
||||
Question.DifficultyLevel = (DifficultyLevel)num;
|
||||
// Question.DifficultyLevel = (DifficultyLevel)num;
|
||||
}
|
||||
|
||||
private void HandleQTSelectedValueChanged(string type)
|
||||
{
|
||||
Question.QType = type;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user