channel.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. 渠道:<input type="text" name="channel" placeholder="请输入渠道"/>
  15. </li>
  16. <li>
  17. 上级渠道:<input type="text" name="superiorChannel" placeholder="请输入上级渠道"/>
  18. </li>
  19. <li>
  20. 组别:<select name="groupId" th:with="type=${homeChannelGroupList}">
  21. <option value="">所有</option>
  22. <option th:each="homeChannelGroup : ${type}" th:text="${homeChannelGroup.groupName}" th:value="${homeChannelGroup.groupId}"></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.add()" shiro:hasPermission="marketing:channel:add">
  35. <i class="fa fa-plus"></i> 新增
  36. </a>
  37. </div>
  38. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  39. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  40. </div>
  41. </div>
  42. </div>
  43. <th:block th:include="include :: footer" />
  44. <script th:inline="javascript">
  45. var editFlag = [[${@permission.hasPermi('marketing:channel:edit')}]];
  46. var removeFlag = [[${@permission.hasPermi('marketing:channel:del')}]];
  47. var isForeignType = [[${@dict.getType('is_foreign_type')}]];
  48. var isNewsType = [[${@dict.getType('is_news_type')}]];
  49. var prefix = ctx + "marketing/channel";
  50. $(function() {
  51. var options = {
  52. url: prefix + "/list",
  53. createUrl: prefix + "/add",
  54. updateUrl: prefix + "/edit/{id}",
  55. removeUrl: prefix + "/del",
  56. modalName: "渠道信息",
  57. height: $(window).height()-120,
  58. columns: [
  59. {
  60. field: 'id',
  61. title: '编号'
  62. },
  63. {
  64. field: 'channel',
  65. title: '渠道'
  66. },
  67. {
  68. field: 'channelName',
  69. title: '渠道别名',
  70. align : 'center'
  71. },
  72. {
  73. field: 'superiorChannel',
  74. title: '上级渠道',
  75. align : 'center'
  76. },
  77. {
  78. field: 'channelUrl',
  79. title: '渠道分享链接',
  80. align : 'center'
  81. },
  82. {
  83. field: 'homeDefault',
  84. title: '首页默认页面',
  85. align : 'center'
  86. },
  87. {
  88. field: 'outputLink',
  89. title: '媒介链接',
  90. align : 'center'
  91. },
  92. {
  93. field: 'isNews',
  94. title: '新老用户',
  95. align : 'center',
  96. formatter: function(value, row, index) {
  97. return $.table.selectDictLabel(isNewsType, value);
  98. }
  99. },
  100. {
  101. field: 'type',
  102. title: '是否对外',
  103. align: 'center',
  104. formatter: function(value, row, index) {
  105. return $.table.selectDictLabel(isForeignType, value);
  106. }
  107. },
  108. {
  109. field: 'groupId',
  110. title: '组别',
  111. align : 'center'
  112. },
  113. {
  114. field: 'createTime',
  115. title: '创建时间',
  116. align : 'center'
  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('</br>');
  125. actions.push('</br>');
  126. 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>');
  127. return actions.join('');
  128. }
  129. }]
  130. };
  131. $.table.init(options);
  132. });
  133. </script>
  134. </body>
  135. </html>