From 209e28b23f02ea2fe33e88842007cf86a9ad9d3b Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 6 May 2021 17:14:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E4=BC=9A=E8=AF=9D=E7=9B=91?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LR_SystemModule/Views/Log/ApiIndex.js | 1 - .../Views/Log/OnlineUserIndex.cshtml | 2 +- .../Views/Log/OnlineUserIndex.js | 20 +++---- .../Perm_FunctionVisitController.cs | 6 +++ .../Perm_FunctionVisit/IndexForCount.cshtml | 23 ++++++++ .../Views/Perm_FunctionVisit/IndexForCount.js | 54 +++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + .../Perm_FunctionVisitService.cs | 5 ++ 8 files changed, 101 insertions(+), 12 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.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 index e62b82d8e..994025e9a 100644 --- 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 @@ -77,7 +77,6 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'F_OperateTime' }); - page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.cshtml index 373376657..0c2d00e1a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.cshtml @@ -14,7 +14,7 @@
-  在线会话监控 +  在线会话监控
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.js index 8250c4a8d..c21750b10 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/OnlineUserIndex.js @@ -20,16 +20,16 @@ var bootstrap = function ($, learun) { location.reload(); }); $('#lr_viewlog').on('click', function () { - learun.layerForm({ - id: 'form', - title: '清空', - url: top.$.rootUrl + '/LR_SystemModule/Log/Form?categoryId=' + categoryId, - height: 200, - width: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); + var keyValue = $('#gridtable').jfGridValue('F_OperateUserId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'online', + title: '访问监控', + url: top.$.rootUrl + '/Permission/Perm_FunctionVisit/IndexForCount?F_UserId='+keyValue, + height: 500, + width: 800 + }); + } }); }, initGrid: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/Perm_FunctionVisitController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/Perm_FunctionVisitController.cs index 0976f20ae..f78fa4972 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/Perm_FunctionVisitController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/Perm_FunctionVisitController.cs @@ -28,6 +28,12 @@ namespace Learun.Application.Web.Areas.Permission.Controllers { return View(); } + + [HttpGet] + public ActionResult IndexForCount() + { + return View(); + } /// /// 表单页 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.cshtml new file mode 100644 index 000000000..47b0af7d6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "统一认证访问日志"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.js new file mode 100644 index 000000000..8ff6a1a38 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/Perm_FunctionVisit/IndexForCount.js @@ -0,0 +1,54 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-07-09 10:45 + * 描 述:统一认证访问日志 + */ +var refreshGirdData; +var F_UserId = request("F_UserId"); +var bootstrap = function ($, learun) { + + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/Permission/Perm_FunctionVisit/GetPageList', + headData: [ + { label: "系统名称", name: "FName", width: 200, align: "left" }, + { label: "访问日期", name: "PDate", width: 150, align: "left" }, + { + label: "是否成功", name: "PIsLoginSuccess", width: 70, align: "center", formatter: function (cellvalue) { + return cellvalue == true ? "" : ""; + } + }, + { label: "用户名称", name: "PUName", width: 100, align: "left" }, + { label: "访问情况", name: "PContent", width: 200, align: "left" }, + ], + mainId: 'PVId', + isPage: true, + sidx:'PDate desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.F_UserId = F_UserId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + 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 29e7f4d12..9283681ee 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 @@ -1356,6 +1356,7 @@ + @@ -7120,6 +7121,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_FunctionVisit/Perm_FunctionVisitService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_FunctionVisit/Perm_FunctionVisitService.cs index 64ed1b0a2..1ca403760 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_FunctionVisit/Perm_FunctionVisitService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/Perm_FunctionVisit/Perm_FunctionVisitService.cs @@ -43,6 +43,11 @@ namespace Learun.Application.TwoDevelopment.Permission dp.Add("PUName", "%" + queryParam["PUName"].ToString() + "%", DbType.String); strSql.Append(" AND a.PUName Like @PUName "); } + if (!queryParam["F_UserId"].IsEmpty()) + { + dp.Add("F_UserId", "" + queryParam["F_UserId"].ToString() + "", DbType.String); + strSql.Append(" AND a.PUId = @F_UserId "); + } return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); } catch (Exception ex)