No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

97 líneas
3.8 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-07-09 10:45
  5. * 描 述:统一认证访问日志
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. // 新增
  24. $('#lr_add').on('click', function () {
  25. learun.layerForm({
  26. id: 'form',
  27. title: '新增',
  28. url: top.$.rootUrl + '/Permission/Perm_FunctionVisit/Form',
  29. width: 600,
  30. height: 400,
  31. callBack: function (id) {
  32. return top[id].acceptClick(refreshGirdData);
  33. }
  34. });
  35. });
  36. // 编辑
  37. $('#lr_edit').on('click', function () {
  38. var keyValue = $('#gridtable').jfGridValue('PVId');
  39. if (learun.checkrow(keyValue)) {
  40. learun.layerForm({
  41. id: 'form',
  42. title: '编辑',
  43. url: top.$.rootUrl + '/Permission/Perm_FunctionVisit/Form?keyValue=' + keyValue,
  44. width: 600,
  45. height: 400,
  46. callBack: function (id) {
  47. return top[id].acceptClick(refreshGirdData);
  48. }
  49. });
  50. }
  51. });
  52. // 删除
  53. $('#lr_delete').on('click', function () {
  54. var keyValue = $('#gridtable').jfGridValue('PVId');
  55. if (learun.checkrow(keyValue)) {
  56. learun.layerConfirm('是否确认删除该项!', function (res) {
  57. if (res) {
  58. learun.deleteForm(top.$.rootUrl + '/Permission/Perm_FunctionVisit/DeleteForm', { keyValue: keyValue }, function () {
  59. refreshGirdData();
  60. });
  61. }
  62. });
  63. }
  64. });
  65. },
  66. // 初始化列表
  67. initGird: function () {
  68. $('#gridtable').lrAuthorizeJfGrid({
  69. url: top.$.rootUrl + '/Permission/Perm_FunctionVisit/GetPageList',
  70. headData: [
  71. { label: "系统名称", name: "FName", width: 200, align: "left" },
  72. { label: "访问日期", name: "PDate", width: 150, align: "left" },
  73. {
  74. label: "是否成功", name: "PIsLoginSuccess", width: 70, align: "center", formatter: function (cellvalue) {
  75. return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  76. }
  77. },
  78. { label: "用户名称", name: "PUName", width: 100, align: "left" },
  79. { label: "访问情况", name: "PContent", width: 200, align: "left" },
  80. ],
  81. mainId: 'PVId',
  82. isPage: true,
  83. rows: 100
  84. });
  85. page.search();
  86. },
  87. search: function (param) {
  88. param = param || {};
  89. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  90. }
  91. };
  92. refreshGirdData = function () {
  93. page.search();
  94. };
  95. page.init();
  96. }