From be190e39359c6e5b1375ddedbc02d38c77991614 Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 28 Apr 2021 18:29:14 +0800 Subject: [PATCH] =?UTF-8?q?api=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LogController.cs | 5 + .../LR_SystemModule/Views/Log/ApiIndex.cshtml | 35 +++++++ .../LR_SystemModule/Views/Log/ApiIndex.js | 94 +++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + 4 files changed, 136 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs index e5d471f8a..1338f1914 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs @@ -28,6 +28,11 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers { return View(); } + [HttpGet] + public ActionResult ApiIndex() + { + return View(); + } /// /// 清空 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.cshtml new file mode 100644 index 000000000..83d6882e4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.cshtml @@ -0,0 +1,35 @@ +@{ + ViewBag.Title = "日志管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ +
+
+  导出 +
+
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_SystemModule/Views/Log/ApiIndex.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.js new file mode 100644 index 000000000..e62b82d8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/ApiIndex.js @@ -0,0 +1,94 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.03.22 + * 描 述:日志管理 + */ +var bootstrap = function ($, learun) { + "use strict"; + var categoryId = '999'; + var logbegin = ''; + var logend = ''; + + var refreshGirdData = function () { + page.search(); + } + + var page = { + init: function () { + page.initGrid(); + page.bind(); + }, + bind: function () { + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + logbegin = begin; + logend = end; + page.search(); + } + }); + }); + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + initGrid: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_SystemModule/Log/GetPageList', + headData: [ + { + label: "操作时间", name: "F_OperateTime",width: 135, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + } + }, + { label: "操作接口", name: "F_SourceObjectId",width: 140, align: "left" }, + { label: "执行结果描述", name: "F_SourceContentJson", width: 300, align: "left" } + + ], + mainId: 'F_LogId', + isPage: true, + sidx: 'F_OperateTime' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.CategoryId = categoryId; + param.StartTime = logbegin; + param.EndTime = logend; + + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index afe6c5175..c7792d809 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1338,6 +1338,7 @@ + @@ -7116,6 +7117,7 @@ +