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.

73 lines
2.2 KiB

1 year ago
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="action" placeholder="操作类型">
  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 = 20;
  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/log_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: 'uid',
  49. title: '操作人',
  50. formatter: function(value, row, index) {
  51. return value==1?'<font color="green">定时任务</font>':'<font color="blue">管理员</font>';
  52. }
  53. },
  54. {
  55. field: 'action',
  56. title: '操作类型'
  57. },
  58. {
  59. field: 'data',
  60. title: '操作详情',
  61. },
  62. {
  63. field: 'addtime',
  64. title: '操作时间'
  65. },
  66. ],
  67. })
  68. })
  69. </script>
  70. {/block}