notice.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 search-collapse">
  9. <form id="notice-form">
  10. <div class="select-list">
  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="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.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. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  27. </li>
  28. </ul>
  29. </div>
  30. </form>
  31. </div>
  32. <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
  33. <a class="btn btn-primary" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
  34. <i class="fa fa-plus"></i> 新增
  35. </a>
  36. <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
  37. <i class="fa fa-remove"></i> 删除
  38. </a>
  39. </div>
  40. <div class="col-sm-12 select-table table-striped">
  41. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  42. </div>
  43. </div>
  44. </div>
  45. <div th:include="include :: footer"></div>
  46. <script th:inline="javascript">
  47. var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
  48. var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];
  49. var types = [[${@dict.getType('sys_notice_type')}]];
  50. var datas = [[${@dict.getType('sys_notice_status')}]];
  51. var prefix = ctx + "system/notice"
  52. $(function() {
  53. var options = {
  54. url: prefix + "/list",
  55. createUrl: prefix + "/add",
  56. updateUrl: prefix + "/edit/{id}",
  57. removeUrl: prefix + "/remove",
  58. modalName: "公告",
  59. search: false,
  60. columns: [{
  61. checkbox: true
  62. },
  63. {
  64. field : 'noticeId',
  65. title : '序号'
  66. },
  67. {
  68. field : 'noticeTitle',
  69. title : '公告标题'
  70. },
  71. {
  72. field: 'noticeType',
  73. title: '公告类型',
  74. align: 'center',
  75. formatter: function(value, row, index) {
  76. return $.table.selectDictLabel(types, value);
  77. }
  78. },
  79. {
  80. field: 'status',
  81. title: '状态',
  82. align: 'center',
  83. formatter: function(value, row, index) {
  84. return $.table.selectDictLabel(datas, value);
  85. }
  86. },
  87. {
  88. field : 'createBy',
  89. title : '创建者'
  90. },
  91. {
  92. field: 'createTime',
  93. title: '创建时间',
  94. sortable: true
  95. },
  96. {
  97. title: '操作',
  98. align: 'center',
  99. formatter: function(value, row, index) {
  100. var actions = [];
  101. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.editFull(\'' + row.noticeId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  102. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.noticeId + '\')"><i class="fa fa-remove"></i>删除</a>');
  103. return actions.join('');
  104. }
  105. }]
  106. };
  107. $.table.init(options);
  108. });
  109. </script>
  110. </body>
  111. </html>