ResourceLibController.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. using System.Threading.Tasks;
  2. using System.Web.Mvc;
  3. using Abp.Web.Mvc.Authorization;
  4. using Abp.Runtime.Caching;
  5. using WePlatform.BaseSystem.Query;
  6. namespace WePlatform.Controllers
  7. {
  8. [AbpMvcAuthorize]
  9. public class ResourceLibController : IwbControllerBase
  10. {
  11. public QueryAppService QueryApp { get;}
  12. public ResourceLibController( ICacheManager cacheManager, QueryAppService queryApp)
  13. {
  14. QueryApp = queryApp;
  15. CacheManager = cacheManager;
  16. }
  17. #region WELib
  18. [AbpMvcAuthorize]
  19. public async Task<ActionResult> SceneInfo()
  20. {
  21. ViewBag.Category = await QueryApp.GetCategorySelectStr();
  22. ViewBag.Behavior = await QueryApp.GetBehaviorSelectStr();
  23. ViewBag.Environment = await QueryApp.GetEnvironmentSelectStr();
  24. ViewBag.SceneType = await QueryApp.GetSceneTypeStr();
  25. ViewBag.BehaviorType = await QueryApp.GetBehaviorScoreTypeStr();
  26. ViewBag.BehaviorType2 = QueryApp.GetBehaviorNonEvolutionTypeStr();
  27. ViewBag.GuideType = await QueryApp.GetGuideTypeSelectStr();
  28. return View();
  29. }
  30. [AbpMvcAuthorize]
  31. public async Task<ActionResult> BehaviorInfo()
  32. {
  33. ViewBag.Category = await QueryApp.GetCategorySelectStr();
  34. ViewBag.Role = await QueryApp.GetBehaviorRoleSelectStr();
  35. ViewBag.Knowledge = await QueryApp.GetKnowledgeSelectStr();
  36. ViewBag.Environment = await QueryApp.GetEnvironmentSelectStr();
  37. return View();
  38. }
  39. [AbpMvcAuthorize]
  40. public ActionResult Plan()
  41. {
  42. return View();
  43. }
  44. [AbpMvcAuthorize]
  45. public async Task<ActionResult> Knowledge()
  46. {
  47. ViewBag.Plan = await QueryApp.GetPlanTreeSelectStr(); ;
  48. return View();
  49. }
  50. [AbpMvcAuthorize]
  51. public async Task<ActionResult> Prompt()
  52. {
  53. ViewBag.GuideType = await QueryApp.GetGuideTypeSelectStr();
  54. return View();
  55. }
  56. [AbpMvcAuthorize]
  57. public ActionResult Supply()
  58. {
  59. return View();
  60. }
  61. [AbpMvcAuthorize]
  62. public async Task<ActionResult> EnvironResourceInfo()
  63. {
  64. ViewBag.ResourceType = await QueryApp.GetResourceTypeStr();
  65. return View();
  66. }
  67. #endregion
  68. #region WEBASE
  69. [AbpMvcAuthorize]
  70. public ActionResult SceneCategory()
  71. {
  72. return View();
  73. }
  74. [AbpMvcAuthorize]
  75. public async Task<ActionResult> BehaviorRole()
  76. {
  77. ViewBag.Role = await QueryApp.GetBehaviorRoleSelectStr();
  78. ViewBag.Category = await QueryApp.GetCategorySelectStr();
  79. return View();
  80. }
  81. #endregion
  82. }
  83. }