notice.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE HTML>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <meta charset="utf-8">
  4. <head th:include="include :: header"></head>
  5. <body class="gray-bg">
  6. <div class="container-div">
  7. <div class="row">
  8. <div class="col-sm-12 select-info">
  9. <form id="notice-form">
  10. <div class="select-list gd">
  11. <ul>
  12. <li>
  13. 公告标题:<input type="text" name="noticeTitle"/>
  14. </li>
  15. <li>
  16. 操作人员:<input type="text" name="createBy"/>
  17. </li>
  18. <li>
  19. 公告类型:<select name="noticeType" th:with="type=${@dict.getType('sys_notice_type')}">
  20. <option value="">所有</option>
  21. <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
  22. </select>
  23. </li>
  24. <li>
  25. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  26. </li>
  27. </ul>
  28. </div>
  29. </form>
  30. </div>
  31. <div class="btn-group hidden-xs" id="toolbar" role="group">
  32. <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
  33. <i class="fa fa-plus"></i> 新增
  34. </a>
  35. <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="system:notice:remove">
  36. <i class="fa fa-trash-o"></i> 删除
  37. </a>
  38. </div>
  39. <div class="col-sm-12 select-info table-striped">
  40. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  41. </div>
  42. </div>
  43. </div>
  44. <div th:include="include :: footer"></div>
  45. <script th:inline="javascript">
  46. var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
  47. var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];
  48. var types = [[${@dict.getType('sys_notice_type')}]];
  49. var datas = [[${@dict.getType('sys_notice_status')}]];
  50. var prefix = ctx + "system/notice"
  51. $(function() {
  52. var options = {
  53. url: prefix + "/list",
  54. createUrl: prefix + "/add",
  55. updateUrl: prefix + "/edit/{id}",
  56. removeUrl: prefix + "/remove",
  57. modalName: "公告",
  58. search: false,
  59. columns: [{
  60. checkbox: true
  61. },
  62. {
  63. field : 'noticeId',
  64. title : '序号'
  65. },
  66. {
  67. field : 'noticeTitle',
  68. title : '公告标题'
  69. },
  70. {
  71. field: 'noticeType',
  72. title: '公告类型',
  73. align: 'center',
  74. formatter: function(value, row, index) {
  75. return $.table.selectDictLabel(types, value);
  76. }
  77. },
  78. {
  79. field: 'status',
  80. title: '状态',
  81. align: 'center',
  82. formatter: function(value, row, index) {
  83. return $.table.selectDictLabel(datas, value);
  84. }
  85. },
  86. {
  87. field : 'createBy',
  88. title : '创建者'
  89. },
  90. {
  91. field: 'createTime',
  92. title: '创建时间',
  93. sortable: true
  94. },
  95. {
  96. title: '操作',
  97. align: 'center',
  98. formatter: function(value, row, index) {
  99. var actions = [];
  100. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.editFull(\'' + row.noticeId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  101. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.noticeId + '\')"><i class="fa fa-remove"></i>删除</a>');
  102. return actions.join('');
  103. }
  104. }]
  105. };
  106. $.table.init(options);
  107. });
  108. </script>
  109. </body>
  110. </html>