dllsList.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. var dlls = new Object();
  2. dlls.loadSearchModule = function(p) {
  3. var $div = $("#" + p.id);
  4. if ($div.length > 0) {
  5. $div.load('dllsSearchModule.htm', {
  6. from : p.from,
  7. callBackFunName : p.callBackFunName,
  8. 'dllsSearchGrid' : $("#dllsSearchGrid").val()
  9. }, function() {
  10. });
  11. }
  12. };
  13. /**
  14. * 加载登陆历史查询模块
  15. */
  16. dlls.loadSearchModule({
  17. id : 'dllsSearchModule',
  18. from : 'dlls',
  19. callBackFunName : 'searchDllsCallBack'
  20. });
  21. /**
  22. * 搜索条件回调函数
  23. *
  24. * @param {搜索条件对象}
  25. * data
  26. * @param {分隔符}
  27. * fgf
  28. */
  29. function searchDllsCallBack(data, fgf) {
  30. huimv.searchGrid("dllsGrid", {
  31. url : 'getDllsList.htm',
  32. params : [{
  33. name : 'param',
  34. value : data
  35. }, {
  36. name : 'fgf',
  37. value : fgf
  38. }]
  39. }, '<b>登陆历史搜索结果</b>');
  40. }
  41. /**
  42. * 加载登陆历史列表数据
  43. */
  44. function loadDllsGrid(dllsSearchGrid) {
  45. jQuery("#dllsGrid").flexigrid({
  46. url : 'getDllsList.htm',
  47. dataType : 'json',
  48. method : 'post',
  49. params : [{
  50. name : 'dllsSearchGrid',
  51. value : $('#dllsSearchGrid').val()
  52. }, {
  53. name : 'from',
  54. value : $("#from").val()
  55. }],
  56. title : '<b>登陆历史浏览</b>',
  57. usepager : true,
  58. useRp : true,
  59. rp : 10,
  60. singleSelect : true,
  61. hidehead : false,
  62. showInputPage : true,
  63. showSelectRp : false,
  64. showTableToggleBtn : false,
  65. width : '790',
  66. resizable : false,
  67. height : '335',
  68. cache : false,// 清除缓存
  69. colModel : [{
  70. display : '行号',
  71. name : 'hh',
  72. width : 25,
  73. sortable : false,
  74. align : 'center',
  75. process : function(col, record, d) {
  76. jQuery(col).html(d + 1);
  77. }
  78. }, {
  79. display : '姓名',
  80. name : 'yhxm',
  81. width : 80,
  82. sortable : false,
  83. align : 'center'
  84. }, {
  85. display : '登陆时间',
  86. name : 'fwsj',
  87. width : 120,
  88. sortable : true,
  89. align : 'center'
  90. }, {
  91. display : '退出时间',
  92. name : 'tcsj',
  93. width : 120,
  94. sortable : false,
  95. align : 'center'
  96. }, {
  97. display : '登陆地点',
  98. name : 'dldd',
  99. width : 120,
  100. sortable : false,
  101. align : 'center'
  102. }, {
  103. display : 'IP',
  104. name : 'ip',
  105. width : 90,
  106. sortable : false,
  107. align : 'center'
  108. }, {
  109. display : '登陆方式',
  110. name : 'dlfs',
  111. width : 70,
  112. sortable : false,
  113. align : 'center'
  114. }, {
  115. display : '设备类型',
  116. name : 'sblx',
  117. width : 70,
  118. sortable : false,
  119. align : 'center'
  120. }, {
  121. display : '访问方式',
  122. name : 'fwfs',
  123. width : 70,
  124. sortable : false,
  125. align : 'center'
  126. }, {
  127. display : '操作系统',
  128. name : 'czxt',
  129. width : 70,
  130. sortable : false,
  131. align : 'center'
  132. }, {
  133. display : '设备标识',
  134. name : 'sbbz',
  135. width : 200,
  136. sortable : false,
  137. align : 'center'
  138. }, {
  139. display : '访问历史',
  140. name : 'fwjl',
  141. width : 50,
  142. sortable : false,
  143. align : 'center',
  144. process : function(col, record, d) {
  145. jQuery(col).html('<a href="javascript:alert(\'' + record.fwjl +'\')">查看</a>');
  146. }
  147. }]
  148. });
  149. }
  150. loadDllsGrid($('#dllsSearchGrid'));