activity.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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="role-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. 跳转类型:<select name="skipType" th:with="type=${@dict.getType('skip_type')}">
  15. <option value="">所有</option>
  16. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  17. </select>
  18. </li>
  19. <li>
  20. 状态:<select name="actStatus" th:with="type=${@dict.getType('activation_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. 弹窗位置 :<select name="alertWinLoc" th:with="type=${@dict.getType('banner_view_position')}">
  27. <option value="">所有</option>
  28. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  29. </select>
  30. </li>
  31. <li>
  32. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  33. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  34. </li>
  35. </ul>
  36. </div>
  37. </form>
  38. </div>
  39. <div class="btn-group-sm" id="toolbar" role="group">
  40. <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="operation:activity:add">
  41. <i class="fa fa-plus"></i> 新增
  42. </a>
  43. </div>
  44. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  45. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  46. </div>
  47. </div>
  48. </div>
  49. <th:block th:include="include :: footer" />
  50. <script th:inline="javascript">
  51. var editFlag = [[${@permission.hasPermi('operation:activity:edit')}]];
  52. var removeFlag = [[${@permission.hasPermi('operation:activity:del')}]];
  53. var skipTypes = [[${@dict.getType('skip_type')}]];
  54. var activationType = [[${@dict.getType('activation_type')}]];
  55. var alertWinLoc = [[${@dict.getType('alert_win_loc')}]];
  56. var alertWin = [[${@dict.getType('alert_win')}]];
  57. var prefix = ctx + "operation/activity";
  58. $(function() {
  59. var options = {
  60. url: prefix + "/list",
  61. createUrl: prefix + "/add",
  62. updateUrl: prefix + "/edit/{id}",
  63. removeUrl: prefix + "/remove",
  64. modalName: "活动信息",
  65. height: $(window).height()-120,
  66. columns: [
  67. {
  68. field: 'actId',
  69. title: 'ID'
  70. },
  71. {
  72. field: 'actName',
  73. title: '名称'
  74. },
  75. {
  76. field: 'alertWinPic',
  77. title: '图片',
  78. align : 'center',
  79. formatter:function (value,row,index) {
  80. return "<img src='" + value + "' width='70' height='60'>";
  81. }
  82. },
  83. {
  84. field: 'actStatus',
  85. title: '状态',
  86. align : 'center',
  87. formatter: function(value, row, index) {
  88. return $.table.selectDictLabel(activationType, value);
  89. }
  90. },
  91. {
  92. field: 'actAlertVersion',
  93. title: '版本'
  94. },
  95. {
  96. field: 'alertWin',
  97. title: '是否弹窗',
  98. align : 'center',
  99. formatter: function(value, row, index) {
  100. return $.table.selectDictLabel(alertWin, value);
  101. }
  102. },
  103. {
  104. field: 'alertWinLoc',
  105. title: '弹窗位置',
  106. align : 'center',
  107. formatter: function(value, row, index) {
  108. return $.table.selectDictLabel(alertWinLoc, value);
  109. }
  110. },
  111. {
  112. field: 'skipType',
  113. title: '跳转类型',
  114. align : 'center',
  115. formatter: function(value, row, index) {
  116. return $.table.selectDictLabel(skipTypes, value);
  117. }
  118. },
  119. {
  120. field: 'createTime',
  121. title: '创建时间',
  122. align : 'center'
  123. },
  124. {
  125. title: '操作',
  126. align: 'center',
  127. formatter: function(value, row, index) {
  128. var actions = [];
  129. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.actId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  130. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.actId + '\')"><i class="fa fa-remove"></i> 删除</a>');
  131. return actions.join('');
  132. }
  133. }]
  134. };
  135. $.table.init(options);
  136. });
  137. </script>
  138. </body>
  139. </html>