notice.html 4.3 KB

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