lantern.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <th:block th:include="include :: bootstrap-select-css" />
  6. </head>
  7. <body class="gray-bg">
  8. <div class="container-div">
  9. <div class="row">
  10. <div class="col-sm-12 search-collapse">
  11. <form id="formId">
  12. <div class="select-list">
  13. <ul>
  14. <li>
  15. <p>内容:</p>
  16. <input type="text" name="content"/>
  17. </li>
  18. <li class="select-time">
  19. <p>开始时间:</p>
  20. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="startTime"/>
  21. </li>
  22. <li class="select-time">
  23. <p>结束时间:</p>
  24. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
  25. </li>
  26. <li>
  27. <p>公告人员:</p>
  28. <select title="请选择" class="selectpicker" name="userType" th:with="type=${@dict.getType('sys_lantern_permission')}" multiple>
  29. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  30. </select>
  31. </li>
  32. <li>
  33. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  34. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  35. </li>
  36. </ul>
  37. </div>
  38. </form>
  39. </div>
  40. <div class="btn-group-sm" id="toolbar" role="group">
  41. <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:lantern:add">
  42. <i class="fa fa-plus"></i> 添加
  43. </a>
  44. <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:lantern:edit">
  45. <i class="fa fa-edit"></i> 修改
  46. </a>
  47. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:lantern:remove">
  48. <i class="fa fa-remove"></i> 删除
  49. </a>
  50. </div>
  51. <div class="col-sm-12 select-table table-striped">
  52. <table id="bootstrap-table"></table>
  53. </div>
  54. </div>
  55. </div>
  56. <th:block th:include="include :: footer" />
  57. <th:block th:include="include :: bootstrap-select-js" />
  58. <script th:inline="javascript">
  59. var editFlag = [[${@permission.hasPermi('system:lantern:edit')}]];
  60. var removeFlag = [[${@permission.hasPermi('system:lantern:remove')}]];
  61. var prefix = ctx + "system/lantern";
  62. $(function() {
  63. var options = {
  64. url: prefix + "/list",
  65. createUrl: prefix + "/add",
  66. updateUrl: prefix + "/edit/{id}",
  67. removeUrl: prefix + "/remove",
  68. exportUrl: prefix + "/export",
  69. modalName: "走马灯提示语",
  70. columns: [{
  71. checkbox: true
  72. },
  73. {
  74. field : 'id',
  75. title : 'null',
  76. visible: false
  77. },
  78. {
  79. field : 'content',
  80. title : '内容',
  81. width : '200',
  82. formatter: function(value, row, index) {
  83. return $.table.tooltip(value);
  84. }
  85. },
  86. {
  87. field : 'startTime',
  88. title : '开始时间'
  89. },
  90. {
  91. field : 'endTime',
  92. title : '结束时间'
  93. },
  94. {
  95. field : 'userType',
  96. title : '公告人员',
  97. formatter: function(value, row, index) {
  98. if (value == null){
  99. return '全部人员';
  100. } else {
  101. var userStr = '';
  102. if (value.indexOf('0') != -1){
  103. userStr += '立邦员工 ';
  104. }
  105. if (value.indexOf('1') != -1){
  106. userStr += '经销商 ';
  107. }
  108. if (value.indexOf('2') != -1){
  109. userStr += '服务商 ';
  110. }
  111. if (value.indexOf('3') != -1){
  112. userStr += '金牌店 ';
  113. }
  114. return userStr;
  115. }
  116. }
  117. },
  118. {
  119. title: '操作',
  120. align: 'center',
  121. formatter: function(value, row, index) {
  122. var actions = [];
  123. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  124. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
  125. return actions.join('');
  126. }
  127. }]
  128. };
  129. $.table.init(options);
  130. });
  131. </script>
  132. </body>
  133. </html>