Commit deb4ee2c authored by 黄奎's avatar 黄奎

页面修改

parent 9a65b332
......@@ -12,10 +12,26 @@ namespace Mall.Common.Enum.MarketingCenter
/// </summary>
[EnumField("用户信息")]
Base = 1,
/// <summary>
/// 问卷信息
/// </summary>
[EnumField("问卷信息")]
Survey = 2,
[EnumField("课程安排与设计")]
CourseArrangement = 3,
[EnumField("教师授课情形")]
TeachersSituation = 4,
[EnumField("助教老师")]
TeachingAssistant = 5,
[EnumField("学习环境")]
LearningEnvironment = 6,
[EnumField("意见及建议")]
Opinionandsuggestion = 7
}
}
......@@ -25,6 +25,7 @@ namespace Mall.Model.Entity.MarketingCenter
/// 活动id
/// </summary>
public int ActivitySurveyId { get; set; }
/// <summary>
///意见调查类型
/// </summary>
......
......@@ -35,6 +35,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
private Module.User.UserModule userModule = new Module.User.UserModule();
#region 问卷活动调查
/// <summary>
/// 获取基础信息列表
/// </summary>
......@@ -160,6 +161,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
}
#endregion
#region 问卷调查
/// <summary>
/// 获取基础信息列表
......@@ -174,7 +176,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
demodel.TenantId = UserInfo.TenantId;
demodel.MallBaseId = parms.MallBaseId;
var data = module.GetPageList(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
var list = data.Select(x => new { x.ID, x.SurveyType,x.IsRequired, x.FormType, x.Title, x.IsShow, x.Sort, SurveyTypeStr = EnumHelper.GetEnumName(x.SurveyType), FormTypeStr = EnumHelper.GetEnumName(x.FormType) }).ToList();
var list = data.Select(x => new { x.ID, x.SurveyType, x.IsRequired, x.FormType, x.Title, x.IsShow, x.Sort, SurveyTypeStr = EnumHelper.GetEnumName(x.SurveyType), FormTypeStr = EnumHelper.GetEnumName(x.FormType) }).ToList();
pagelist.count = int.Parse(count.ToString());
pagelist.pageData = list;
return ApiResult.Success("", pagelist);
......@@ -306,7 +308,8 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous] [RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
[AllowAnonymous]
[RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
public ApiResult GetGuestSurveyDetails()
{
var parms = RequestParm;
......@@ -372,7 +375,17 @@ namespace Mall.WebApi.Controllers.MarketingCenter
userModel.Photo,
CreateDateStr = model.CreateDate.HasValue ? model.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""
};
return ApiResult.Success("请求成功!", new { surverList= surverList.Where(x=>x.FormType==FormTypeEnum.Survey), baseList = surverList.Where(x => x.FormType == FormTypeEnum.Base), obj });
return ApiResult.Success("请求成功!", new
{
surverList = surverList.Where(x => x.FormType == FormTypeEnum.Survey),
baseList = surverList.Where(x => x.FormType == FormTypeEnum.Base),
courseArrangementList = surverList.Where(x => x.FormType == FormTypeEnum.CourseArrangement),
teachersSituationList = surverList.Where(x => x.FormType == FormTypeEnum.TeachersSituation),
teachingAssistantList = surverList.Where(x => x.FormType == FormTypeEnum.TeachingAssistant),
learningEnvironmentList = surverList.Where(x => x.FormType == FormTypeEnum.LearningEnvironment),
opinionandsuggestionList = surverList.Where(x => x.FormType == FormTypeEnum.Opinionandsuggestion),
obj
});
}
return ApiResult.Failed("未找到调查信息!");
}
......@@ -393,16 +406,11 @@ namespace Mall.WebApi.Controllers.MarketingCenter
demodel.TenantId = UserInfo.TenantId;
demodel.MallBaseId = parms.MallBaseId;
var data = module.GetResultPageList(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
var list = data.Select(x => new { x.ID, x.ActiveSurveyName, x.AliasName, CreateDateStr = x.CreateDate.HasValue ? x.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",x.Photo }).ToList();
var list = data.Select(x => new { x.ID, x.ActiveSurveyName, x.AliasName, CreateDateStr = x.CreateDate.HasValue ? x.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", x.Photo }).ToList();
pagelist.count = int.Parse(count.ToString());
pagelist.pageData = list;
return ApiResult.Success("", pagelist);
}
#endregion
}
}
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