pageGo.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('跳转至指定页')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 select-table table-striped">
  10. <table id="bootstrap-table"></table>
  11. </div>
  12. </div>
  13. </div>
  14. <div th:include="include :: footer"></div>
  15. <script th:inline="javascript">
  16. var prefix = ctx + "demo/table";
  17. var datas = [[${@dict.getType('sys_normal_disable')}]];
  18. $(function() {
  19. var options = {
  20. url: prefix + "/list",
  21. showSearch: false,
  22. showRefresh: false,
  23. showToggle: false,
  24. showColumns: false,
  25. showPageGo: true,
  26. columns: [{
  27. checkbox: true
  28. },
  29. {
  30. field : 'userId',
  31. title : '用户ID'
  32. },
  33. {
  34. field : 'userCode',
  35. title : '用户编号'
  36. },
  37. {
  38. field : 'userName',
  39. title : '用户姓名'
  40. },
  41. {
  42. field : 'userPhone',
  43. title : '用户手机'
  44. },
  45. {
  46. field : 'userEmail',
  47. title : '用户邮箱'
  48. },
  49. {
  50. field : 'userBalance',
  51. title : '用户余额'
  52. },
  53. {
  54. field: 'status',
  55. title: '用户状态',
  56. align: 'center',
  57. formatter: function(value, row, index) {
  58. return $.table.selectDictLabel(datas, value);
  59. }
  60. },
  61. {
  62. title: '操作',
  63. align: 'center',
  64. formatter: function(value, row, index) {
  65. var actions = [];
  66. actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
  67. actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
  68. return actions.join('');
  69. }
  70. }]
  71. };
  72. $.table.init(options);
  73. });
  74. </script>
  75. </body>
  76. </html>