notice.html 4.3 KB

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