You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.9 KiB

1 year ago
  1. {extend name="admin/layout" /}
  2. {block name="title"}使用记录{/block}
  3. {block name="main"}
  4. <style>
  5. </style>
  6. <div class="container" style="padding-top:70px;">
  7. <div class="col-xs-12 col-md-10 center-block" style="float: none;">
  8. <div id="searchToolbar">
  9. <form onsubmit="return searchSubmit()" method="GET" class="form-inline">
  10. <div class="form-group">
  11. <label>搜索</label>
  12. <input type="text" class="form-control" name="ip" placeholder="服务器IP">
  13. </div>
  14. <div class="form-group">
  15. <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i>搜索</button>&nbsp;
  16. <a href="javascript:searchClear()" class="btn btn-default"><i class="fa fa-repeat"></i>重置</a>&nbsp;
  17. </div>
  18. </form>
  19. </div>
  20. <table id="listTable">
  21. </table>
  22. </div>
  23. </div>
  24. <script src="//cdn.staticfile.org/layer/3.5.1/layer.js"></script>
  25. <script src="//cdn.staticfile.org/bootstrap-table/1.20.2/bootstrap-table.min.js"></script>
  26. <script src="//cdn.staticfile.org/bootstrap-table/1.20.2/extensions/page-jump-to/bootstrap-table-page-jump-to.min.js"></script>
  27. <script src="/static/js/custom.js"></script>
  28. <script>
  29. $(document).ready(function(){
  30. updateToolbar();
  31. const defaultPageSize = 15;
  32. const pageNumber = typeof window.$_GET['pageNumber'] != 'undefined' ? parseInt(window.$_GET['pageNumber']) : 1;
  33. const pageSize = typeof window.$_GET['pageSize'] != 'undefined' ? parseInt(window.$_GET['pageSize']) : defaultPageSize;
  34. $("#listTable").bootstrapTable({
  35. url: '/admin/record_data',
  36. pageNumber: pageNumber,
  37. pageSize: pageSize,
  38. classes: 'table table-striped table-hover table-bottom-border',
  39. columns: [
  40. {
  41. field: 'id',
  42. title: 'ID',
  43. formatter: function(value, row, index) {
  44. return '<b>'+value+'</b>';
  45. }
  46. },
  47. {
  48. field: 'ip',
  49. title: '服务器IP'
  50. },
  51. {
  52. field: 'addtime',
  53. title: '首次安装时间',
  54. },
  55. {
  56. field: 'usetime',
  57. title: '最后使用时间'
  58. },
  59. ],
  60. })
  61. })
  62. </script>
  63. {/block}