Commit dbc12ecd authored by 黄奎's avatar 黄奎

页面修改

parent 2e02b015
...@@ -97,15 +97,20 @@ namespace EduSpider.Services ...@@ -97,15 +97,20 @@ namespace EduSpider.Services
{ {
foreach (var item in examList) foreach (var item in examList)
{ {
decimal score_p = 0;
if (item.ExamScore > 0)
{
score_p = Math.Round(item.TScore / item.ExamScore, 4);
}
dataList.Add(new ExamWorkResult() dataList.Add(new ExamWorkResult()
{ {
ResultType=2, ResultType = 2,
Title=item.ExamName, Title = item.ExamName,
CreateTime=item.ExamCreateTime, CreateTime = item.ExamCreateTime,
Score=item.TScore, Score = item.TScore,
//Score_p=0, Score_p = score_p,
ExamRank=item.Rank, ExamRank = item.Rank,
ExamRankRate=item.RankRate, ExamRankRate = item.RankRate,
}); });
} }
} }
...@@ -115,12 +120,12 @@ namespace EduSpider.Services ...@@ -115,12 +120,12 @@ namespace EduSpider.Services
dataList = dataList.OrderBy(qitem => qitem.CreateTime).ToList(); dataList = dataList.OrderBy(qitem => qitem.CreateTime).ToList();
foreach (var item in dataList) foreach (var item in dataList)
{ {
list.Add(new object obj = new();
//家庭作业
if (item.ResultType == 1)
{
obj = new
{ {
item.ResultType,
item.ResultTypeStr,
item.Title,
CreateTime = VTX.FW.Helper.ConvertHelper.FormatTime(item.CreateTime, 2),
item.Score, item.Score,
item.Score_p, item.Score_p,
item.ScoreType, item.ScoreType,
...@@ -128,7 +133,35 @@ namespace EduSpider.Services ...@@ -128,7 +133,35 @@ namespace EduSpider.Services
item.Score_Value, item.Score_Value,
item.HomeWorkStatus, item.HomeWorkStatus,
item.HomeWorkStatusStr, item.HomeWorkStatusStr,
item.Comment, };
}
//考试
if (item.ResultType == 2)
{
obj = new
{
item.Score,
item.Score_p,
item.ExamRank,
item.ExamRankRate,
};
}
//评语
if (item.ResultType == 3)
{
obj = new
{
item.Comment
};
}
list.Add(new
{
item.ResultType,
item.ResultTypeStr,
item.Title,
CreateTime = VTX.FW.Helper.ConvertHelper.FormatTime(item.CreateTime, 2),
DataObj = obj
}); });
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment