Commit 7f40a18b authored by 黄奎's avatar 黄奎

页面修改

parent d950d570
......@@ -382,19 +382,27 @@ namespace Edu.Module.Course
case Common.Enum.Course.ClassStyleEnum.Month:
if (model.WeekDayList != null && model.WeekDayList.Count > 0)
{
foreach (var item in model.WeekDayList)
var srartDate = model.OpenTime;
for (var i = 0; i < 120; i++)
{
classPlanList.Add(new RB_Class_Plan_ViewModel()
var newDate = srartDate.AddDays(i);
foreach (var item in model.WeekDayList)
{
ClassDate = Convert.ToDateTime(item),
ClassId = model.ClassId,
ClassPlanId = 0,
ClassRoomId = model.ClassRoomId,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
PlanTimeList = defaultPlanTimeList,
TeacherId = model.Teacher_Id,
});
if (newDate.Day == Convert.ToInt32(item))
{
classPlanList.Add(new RB_Class_Plan_ViewModel()
{
ClassDate = newDate,
ClassId = model.ClassId,
ClassPlanId = 0,
ClassRoomId = model.ClassRoomId,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
PlanTimeList = defaultPlanTimeList,
TeacherId = model.Teacher_Id,
});
}
}
}
}
break;
......
......@@ -58,6 +58,7 @@ namespace Edu.WebApi.Controllers.Course
{
item.ClassId,
item.ClassName,
item.School_Id,
item.SchoolName,
item.CourseName,
item.Teacher_Id,
......@@ -171,7 +172,15 @@ namespace Edu.WebApi.Controllers.Course
break;
//按月排课
case ClassStyleEnum.Month:
if (!string.IsNullOrEmpty(WeekDayListStr))
{
extModel.WeekDayList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(WeekDayListStr);
extModel.DateJson = Common.Plugin.JsonHelper.Serialize(extModel.WeekDayList);
}
else
{
extModel.DateJson = "";
}
break;
//网约课
case ClassStyleEnum.OnLine:
......
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