index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {% extends "base.html" %}
  2. {% block title %}
  3. {% endblock %}
  4. {% block head %}
  5. <script type="text/javascript">
  6. var grid;
  7. $(function() {
  8. grid = $('#grid').datagrid({
  9. title : '',
  10. url : sy.contextPath + '/base/syonline!grid.action',
  11. striped : true,
  12. rownumbers : true,
  13. pagination : true,
  14. singleSelect : true,
  15. idField : 'id',
  16. sortName : 'createdatetime',
  17. sortOrder : 'desc',
  18. pageSize : 100,
  19. pageList : [ 10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 1000 ],
  20. frozenColumns : [ [ {
  21. width : '100',
  22. title : '登录名',
  23. field : 'loginname',
  24. sortable : true
  25. }, {
  26. width : '300',
  27. title : 'IP地址',
  28. field : 'ip',
  29. sortable : true
  30. } ] ],
  31. columns : [ [ {
  32. width : '150',
  33. title : '创建时间',
  34. field : 'createdatetime',
  35. sortable : true
  36. }, {
  37. width : '100',
  38. title : '类别',
  39. field : 'type',
  40. sortable : true,
  41. formatter : function(value, row, index) {
  42. switch (value) {
  43. case '0':
  44. return '注销系统';
  45. case '1':
  46. return '登录系统';
  47. }
  48. }
  49. } ] ],
  50. toolbar : '#toolbar',
  51. onBeforeLoad : function(param) {
  52. parent.$.messager.progress({
  53. text : '数据加载中....'
  54. });
  55. },
  56. onLoadSuccess : function(data) {
  57. $('.iconImg').attr('src', sy.pixel_0);
  58. parent.$.messager.progress('close');
  59. }
  60. });
  61. });
  62. </script>
  63. {% endblock %}
  64. {% block body %}
  65. <body class="easyui-layout" data-options="fit:true,border:false">
  66. <div id="toolbar" style="display: none;">
  67. <table>
  68. <tr>
  69. <td>
  70. <form id="searchForm">
  71. <table>
  72. <tr>
  73. <td>登录名</td>
  74. <td><input name="QUERY_t#loginname_S_LK" style="width: 80px;" /></td>
  75. <td>IP地址</td>
  76. <td><input name="QUERY_t#ip_S_LK" style="width: 80px;" /></td>
  77. <td>类别</td>
  78. <td><select name="QUERY_t#type_S_EQ" class="easyui-combobox" data-options="panelHeight:'auto',editable:false"><option value="">请选择</option>
  79. <option value="1">登录系统</option>
  80. <option value="0">注销系统</option></select></td>
  81. <td>创建时间</td>
  82. <td><input name="QUERY_t#createdatetime_D_GE" class="Wdate" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" style="width: 120px;" />-<input name="QUERY_t#createdatetime_D_LE" class="Wdate" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" style="width: 120px;" /></td>
  83. <td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-zoom',plain:true" onclick="grid.datagrid('load',sy.serializeObject($('#searchForm')));">过滤</a><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-zoom_out',plain:true" onclick="$('#searchForm input').val('');grid.datagrid('load',{});">重置过滤</a></td>
  84. </tr>
  85. </table>
  86. </form>
  87. </td>
  88. </tr>
  89. <tr>
  90. <td>
  91. <table>
  92. <tr>
  93. <td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="">导出</a></td>
  94. </tr>
  95. </table>
  96. </td>
  97. </tr>
  98. </table>
  99. </div>
  100. <div data-options="region:'center',fit:true,border:false">
  101. <table id="grid" data-options="fit:true,border:false"></table>
  102. </div>
  103. </body>
  104. {% endblock %}