groupHeader.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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-bordered">
  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. columns : [
  26. [{
  27. title : '基本信息',
  28. align : 'center',
  29. colspan : 6
  30. }, {
  31. title : '其他信息',
  32. align : 'center',
  33. colspan : 3
  34. }
  35. ],
  36. [{
  37. checkbox : true
  38. }, {
  39. field : 'userId',
  40. title : '用户ID'
  41. }, {
  42. field : 'userCode',
  43. title : '用户编号'
  44. }, {
  45. field : 'userName',
  46. title : '用户姓名'
  47. }, {
  48. field : 'userPhone',
  49. title : '用户手机'
  50. }, {
  51. field : 'userEmail',
  52. title : '用户邮箱'
  53. }, {
  54. field : 'userBalance',
  55. title : '用户余额'
  56. }, {
  57. field : 'status',
  58. title : '用户状态',
  59. formatter : function (value, row, index) {
  60. return $.table.selectDictLabel(datas, value);
  61. }
  62. }, {
  63. title : '操作',
  64. align : 'center',
  65. formatter : function (value, row, index) {
  66. var actions = [];
  67. actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
  68. actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
  69. return actions.join('');
  70. }
  71. }
  72. ]
  73. ]
  74. };
  75. $.table.init(options);
  76. });
  77. </script>
  78. </body>
  79. </html>