Commit 28b2ddb2 authored by 黄奎's avatar 黄奎

页面修改

parent daaade91
...@@ -31,14 +31,14 @@ namespace Edu.Model.ViewModel.Exam ...@@ -31,14 +31,14 @@ namespace Edu.Model.ViewModel.Exam
public DifficultyTypeEnum DifficultyType { get; set; } public DifficultyTypeEnum DifficultyType { get; set; }
/// <summary> /// <summary>
/// 创建时间 /// 创建
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public string CreateByName { get; set; }
/// <summary> /// <summary>
/// 创建 /// 创建时间
/// </summary> /// </summary>
public int CreateBy { get; set; } public string CreateTimeStr { get; set; }
/// <summary> /// <summary>
/// 发布次数 /// 发布次数
...@@ -65,6 +65,11 @@ namespace Edu.Model.ViewModel.Exam ...@@ -65,6 +65,11 @@ namespace Edu.Model.ViewModel.Exam
/// </summary> /// </summary>
public int ParentId { get; set; } public int ParentId { get; set; }
/// <summary>
/// 题目数量
/// </summary>
public int QuestionCount { get; set; }
/// <summary> /// <summary>
/// 下级节点 /// 下级节点
/// </summary> /// </summary>
......
...@@ -10,15 +10,7 @@ namespace Edu.Model.ViewModel.Exam ...@@ -10,15 +10,7 @@ namespace Edu.Model.ViewModel.Exam
/// </summary> /// </summary>
public class RB_Examination_Paper_ViewModel : RB_Examination_Paper public class RB_Examination_Paper_ViewModel : RB_Examination_Paper
{ {
/// <summary>
/// 创建人
/// </summary>
public string CreateByName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public string CreateTimeStr { get { return Common.ConvertHelper.FormatDate(this.CreateTime); } }
/// <summary> /// <summary>
/// 试卷题目分组列表 /// 试卷题目分组列表
......
...@@ -6,6 +6,7 @@ using System.Collections.Generic; ...@@ -6,6 +6,7 @@ using System.Collections.Generic;
using VT.FW.DB; using VT.FW.DB;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Edu.Cache.User;
namespace Edu.Module.Exam namespace Edu.Module.Exam
{ {
...@@ -57,13 +58,14 @@ namespace Edu.Module.Exam ...@@ -57,13 +58,14 @@ namespace Edu.Module.Exam
PaperName = item.PaperName, PaperName = item.PaperName,
QuestionBandIds = item.QuestionBandIds, QuestionBandIds = item.QuestionBandIds,
DifficultyType = item.DifficultyType, DifficultyType = item.DifficultyType,
CreateTime = item.CreateTime, CreateTimeStr = Common.ConvertHelper.FormatTime(item.CreateTime),
CreateBy = item.CreateBy, CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName??"",
PublishCount = item.PublishCount, PublishCount = item.PublishCount,
GenerateType = item.GenerateType, GenerateType = item.GenerateType,
CreateNum = item.CreateNum, CreateNum = item.CreateNum,
PaperType = item.PaperType, PaperType = item.PaperType,
ParentId = item.ParentId, ParentId = item.ParentId,
QuestionCount=0,
ChildList = new List<ExaminationPaperTreeModel>(), ChildList = new List<ExaminationPaperTreeModel>(),
}; };
model.ChildList = GetPaperChild(childList, item.PaperId); model.ChildList = GetPaperChild(childList, item.PaperId);
...@@ -95,13 +97,14 @@ namespace Edu.Module.Exam ...@@ -95,13 +97,14 @@ namespace Edu.Module.Exam
PaperName = childItem.PaperName, PaperName = childItem.PaperName,
QuestionBandIds = childItem.QuestionBandIds, QuestionBandIds = childItem.QuestionBandIds,
DifficultyType = childItem.DifficultyType, DifficultyType = childItem.DifficultyType,
CreateTime = childItem.CreateTime, CreateTimeStr = Common.ConvertHelper.FormatTime(childItem.CreateTime),
CreateBy = childItem.CreateBy, CreateByName = UserReidsCache.GetUserLoginInfo(childItem.CreateBy)?.AccountName ?? "",
PublishCount = childItem.PublishCount, PublishCount = childItem.PublishCount,
GenerateType = childItem.GenerateType, GenerateType = childItem.GenerateType,
CreateNum = childItem.CreateNum, CreateNum = childItem.CreateNum,
PaperType = childItem.PaperType, PaperType = childItem.PaperType,
ParentId = childItem.ParentId, ParentId = childItem.ParentId,
QuestionCount = 0,
ChildList = new List<ExaminationPaperTreeModel>(), ChildList = new List<ExaminationPaperTreeModel>(),
}; };
childModel.ChildList.AddRange(GetPaperChild(sourceList, childItem.PaperId)); childModel.ChildList.AddRange(GetPaperChild(sourceList, childItem.PaperId));
...@@ -111,8 +114,6 @@ namespace Edu.Module.Exam ...@@ -111,8 +114,6 @@ namespace Edu.Module.Exam
return resultList; return resultList;
} }
/// <summary> /// <summary>
/// 获取试卷题目列表 /// 获取试卷题目列表
/// </summary> /// </summary>
......
...@@ -51,11 +51,10 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -51,11 +51,10 @@ namespace Edu.WebApi.Controllers.Exam
{ {
item.PaperId, item.PaperId,
item.PaperName, item.PaperName,
CreateByName= UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "", item.CreateTimeStr,
CreateTimeStr=Common.ConvertHelper.FormatTimeStr(item.CreateTime), item.CreateByName,
DifficultyTypeName = item.DifficultyType.ToName(),
item.PublishCount, item.PublishCount,
QuestionCount=0, item.QuestionCount,
item.ParentId, item.ParentId,
item.PaperType, item.PaperType,
item.ChildList, item.ChildList,
......
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