Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

163 řádky
4.8 KiB

  1. using Learun.Application.Extention.DisplayBoardManage;
  2. using Learun.Util;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Web.Mvc;
  6. namespace Learun.Application.Web.Areas.LR_DisplayBoard.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架
  10. /// Copyright (c) 2013-2018 上海力软信息技术有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2018-09-20 09:41
  13. /// 描 述:看板配置信息
  14. /// </summary>
  15. public class LR_KBConfigInfoController : MvcControllerBase
  16. {
  17. private LR_KBConfigInfoIBLL lR_KBConfigInfoIBLL = new LR_KBConfigInfoBLL();
  18. #region 视图功能
  19. /// <summary>
  20. /// 表格配置页面
  21. /// <summary>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult TableForm()
  25. {
  26. return View();
  27. }
  28. /// <summary>
  29. /// 统计指标新增编辑界面
  30. /// </summary>
  31. /// <returns></returns>
  32. [HttpGet]
  33. public ActionResult StatisticsForm()
  34. {
  35. return View();
  36. }
  37. /// <summary>
  38. /// 统计指标单个配置弹出界面
  39. /// </summary>
  40. /// <returns></returns>
  41. [HttpGet]
  42. public ActionResult ColStatisForm()
  43. {
  44. return View();
  45. }
  46. /// <summary>
  47. /// 饼图/柱状图/折线/仪表盘 模块配置界面
  48. /// </summary>
  49. /// <returns></returns>
  50. [HttpGet]
  51. public ActionResult ChartForm()
  52. {
  53. return View();
  54. }
  55. #endregion
  56. #region 获取数据
  57. /// <summary>
  58. /// 获取列表数据
  59. /// <summary>
  60. /// <returns></returns>
  61. [HttpGet]
  62. [AjaxOnly]
  63. public ActionResult GetList( string queryJson )
  64. {
  65. var data = lR_KBConfigInfoIBLL.GetList(queryJson);
  66. return Success(data);
  67. }
  68. /// <summary>
  69. /// 获取列表分页数据
  70. /// <param name="pagination">分页参数</param>
  71. /// <summary>
  72. /// <returns></returns>
  73. [HttpGet]
  74. [AjaxOnly]
  75. public ActionResult GetPageList(string pagination, string queryJson)
  76. {
  77. Pagination paginationobj = pagination.ToObject<Pagination>();
  78. var data = lR_KBConfigInfoIBLL.GetPageList(paginationobj, queryJson);
  79. var jsonData = new
  80. {
  81. rows = data,
  82. total = paginationobj.total,
  83. page = paginationobj.page,
  84. records = paginationobj.records
  85. };
  86. return Success(jsonData);
  87. }
  88. /// <summary>
  89. /// 获取表单数据
  90. /// <param name="keyValue">主键</param>
  91. /// <summary>
  92. /// <returns></returns>
  93. [HttpGet]
  94. [AjaxOnly]
  95. public ActionResult GetFormData(string keyValue)
  96. {
  97. var data = lR_KBConfigInfoIBLL.GetEntity(keyValue);
  98. return Success(data);
  99. }
  100. #endregion
  101. #region 提交数据
  102. /// <summary>
  103. /// 删除实体数据
  104. /// <param name="keyValue">主键</param>
  105. /// <summary>
  106. /// <returns></returns>
  107. [HttpPost]
  108. [AjaxOnly]
  109. public ActionResult DeleteForm(string keyValue)
  110. {
  111. lR_KBConfigInfoIBLL.DeleteEntity(keyValue);
  112. return Success("删除成功!");
  113. }
  114. /// <summary>
  115. /// 保存实体数据(新增、修改)
  116. /// <param name="keyValue">主键</param>
  117. /// <summary>
  118. /// <returns></returns>
  119. [HttpPost]
  120. [ValidateAntiForgeryToken]
  121. [AjaxOnly]
  122. public ActionResult SaveForm(string keyValue,LR_KBConfigInfoEntity entity)
  123. {
  124. lR_KBConfigInfoIBLL.SaveEntity(keyValue, entity);
  125. return Success("保存成功!");
  126. }
  127. #endregion
  128. #region 扩展方法
  129. /// <summary>
  130. /// 根据配置信息获取数据
  131. /// </summary>
  132. /// <param name="configuration">配置信息</param>
  133. /// <param name="type">类型statistics统计;2表格3图表</param>
  134. /// <returns></returns>
  135. [AjaxOnly]
  136. public ActionResult GetConfigData(string configInfoList)
  137. {
  138. List<ConfigInfoModel> list = configInfoList.ToObject<List<ConfigInfoModel>>();
  139. var data = lR_KBConfigInfoIBLL.GetConfigData(list);
  140. return Success(data);
  141. }
  142. /// <summary>
  143. /// 根据路径获取接口数据(仅限get方法)
  144. /// </summary>
  145. /// <param name="path">接口路径</param>
  146. /// <returns></returns>
  147. public ActionResult GetApiData(string path)
  148. {
  149. var data = lR_KBConfigInfoIBLL.GetApiData(path);
  150. return Success(data);
  151. }
  152. #endregion
  153. }
  154. }