using Learun.Application.Extention.DisplayBoardManage; using Learun.Util; using System; using System.Collections.Generic; using System.Web.Mvc; namespace Learun.Application.Web.Areas.LR_DisplayBoard.Controllers { /// /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架 /// Copyright (c) 2013-2018 上海力软信息技术有限公司 /// 创 建:超级管理员 /// 日 期:2018-09-20 09:41 /// 描 述:看板配置信息 /// public class LR_KBConfigInfoController : MvcControllerBase { private LR_KBConfigInfoIBLL lR_KBConfigInfoIBLL = new LR_KBConfigInfoBLL(); #region 视图功能 /// /// 表格配置页面 /// /// [HttpGet] public ActionResult TableForm() { return View(); } /// /// 统计指标新增编辑界面 /// /// [HttpGet] public ActionResult StatisticsForm() { return View(); } /// /// 统计指标单个配置弹出界面 /// /// [HttpGet] public ActionResult ColStatisForm() { return View(); } /// /// 饼图/柱状图/折线/仪表盘 模块配置界面 /// /// [HttpGet] public ActionResult ChartForm() { return View(); } #endregion #region 获取数据 /// /// 获取列表数据 /// /// [HttpGet] [AjaxOnly] public ActionResult GetList( string queryJson ) { var data = lR_KBConfigInfoIBLL.GetList(queryJson); return Success(data); } /// /// 获取列表分页数据 /// 分页参数 /// /// [HttpGet] [AjaxOnly] public ActionResult GetPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); var data = lR_KBConfigInfoIBLL.GetPageList(paginationobj, queryJson); var jsonData = new { rows = data, total = paginationobj.total, page = paginationobj.page, records = paginationobj.records }; return Success(jsonData); } /// /// 获取表单数据 /// 主键 /// /// [HttpGet] [AjaxOnly] public ActionResult GetFormData(string keyValue) { var data = lR_KBConfigInfoIBLL.GetEntity(keyValue); return Success(data); } #endregion #region 提交数据 /// /// 删除实体数据 /// 主键 /// /// [HttpPost] [AjaxOnly] public ActionResult DeleteForm(string keyValue) { lR_KBConfigInfoIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } /// /// 保存实体数据(新增、修改) /// 主键 /// /// [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] public ActionResult SaveForm(string keyValue,LR_KBConfigInfoEntity entity) { lR_KBConfigInfoIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } #endregion #region 扩展方法 /// /// 根据配置信息获取数据 /// /// 配置信息 /// 类型statistics统计;2表格3图表 /// [AjaxOnly] public ActionResult GetConfigData(string configInfoList) { List list = configInfoList.ToObject>(); var data = lR_KBConfigInfoIBLL.GetConfigData(list); return Success(data); } /// /// 根据路径获取接口数据(仅限get方法) /// /// 接口路径 /// public ActionResult GetApiData(string path) { var data = lR_KBConfigInfoIBLL.GetApiData(path); return Success(data); } #endregion } }