channel_review.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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="channel" th:with="type=${channelList}">
  15. <option value="">所有</option>
  16. <option th:each="dict : ${type}" th:text="${dict}"
  17. th:value="${dict}"></option>
  18. </select>
  19. </li>
  20. <li>
  21. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
  22. class="fa fa-search"></i>&nbsp;搜索</a>
  23. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
  24. class="fa fa-refresh"></i>&nbsp;重置</a>
  25. </li>
  26. </ul>
  27. </div>
  28. </form>
  29. </div>
  30. <div class="btn-group-sm" id="toolbar" role="group">
  31. <a class="btn btn-success" onclick="add()" shiro:hasPermission="operation:channel:review:add">
  32. <i class="fa fa-plus"></i> 新增
  33. </a>
  34. </div>
  35. <div class="col-sm-12 select-table table-striped">
  36. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  37. </div>
  38. </div>
  39. </div>
  40. <th:block th:include="include :: footer"/>
  41. <script th:inline="javascript">
  42. var editFlag = [[${@permission.hasPermi('operation:channel:review:edit')}]];
  43. var removeFlag = [[${@permission.hasPermi('operation:channel:review:del')}]];
  44. var addRoomsFlag = [[${@permission.hasPermi('operation:channel:review:room:add')}]];
  45. var addUsersFlag = [[${@permission.hasPermi('operation:channel:review:users:add')}]];
  46. var useType = [[${@dict.getType('is_use_type')}]];
  47. var prefix = ctx + "operation/channel/review";
  48. $(function () {
  49. var options = {
  50. url: prefix + "/list",
  51. createUrl: prefix + "/add",
  52. updateUrl: prefix + "/edit/{id}",
  53. removeUrl: prefix + "/remove",
  54. modalName: "审核配置",
  55. height: 600,
  56. columns: [
  57. {
  58. field: 'channel',
  59. title: '渠道号'
  60. },
  61. {
  62. field: 'auditOption',
  63. title: '投放审核',
  64. align: 'center',
  65. formatter: function (value, row, index) {
  66. return $.table.selectDictLabel(useType, value);
  67. }
  68. },
  69. {
  70. field: 'leftLevel',
  71. title: '投放审核等级'
  72. },
  73. {
  74. field: 'auditVersion',
  75. title: '投放审核版本'
  76. },
  77. {
  78. field: 'beginTime',
  79. title: '审核开始时间'
  80. },
  81. {
  82. field: 'endTime',
  83. title: '结束时间'
  84. },
  85. {
  86. field: 'createTime',
  87. title: '创建时间',
  88. },
  89. {
  90. title: '操作',
  91. align: 'center',
  92. formatter: function (value, row, index) {
  93. var actions = [];
  94. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  95. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i> 删除</a>');
  96. actions.push('<a class="btn btn-success btn-xs ' + addRoomsFlag + '" href="javascript:void(0)" onclick="addRooms(\'' + row.id + '\')"><i class="fa fa-plus"></i>添加房间</a> ');
  97. actions.push('<a class="btn btn-success btn-xs ' + addRoomsFlag + '" href="javascript:void(0)" onclick="listRooms(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看房间</a> ');
  98. actions.push('<a class="btn btn-success btn-xs ' + addUsersFlag + '" href="javascript:void(0)" onclick="addUsers(\'' + row.id + '\')"><i class="fa fa-plus"></i> 添加用户</a>');
  99. actions.push('<a class="btn btn-success btn-xs ' + addUsersFlag + '" href="javascript:void(0)" onclick="listUsers(\'' + row.id + '\')"><i class="fa fa-edit"></i> 查看用户</a>');
  100. return actions.join('');
  101. }
  102. }]
  103. };
  104. $.table.init(options);
  105. });
  106. function add() {
  107. var url = prefix + "/add";
  108. $.modal.open("新增渠道审核", url, '700', '650');
  109. }
  110. function edit(id) {
  111. var url = prefix + "/edit/" + id;
  112. $.modal.open("编辑审核配置", url, '700', '650');
  113. }
  114. function addRooms(id) {
  115. var url = prefix + "/addRooms/" + id;
  116. $.modal.open("新增房间", url, '700', '500');
  117. }
  118. function listRooms(id) {
  119. var url = prefix + "/listRoom/" + id;
  120. $.modal.open("查看房间", url, '700', '680');
  121. }
  122. function addUsers(id) {
  123. var url = prefix + "/addUser/" + id;
  124. $.modal.open("新增用户", url, '700', '500');
  125. }
  126. function listUsers(id) {
  127. var url = prefix + "/listUsers/" + id;
  128. $.modal.open("查看用户", url, '700', '680');
  129. }
  130. function remove(id) {
  131. $.modal.confirm("确认要删除该记录吗?", function () {
  132. $.operate.post(prefix + "/del?id=" + id);
  133. });
  134. }
  135. </script>
  136. </body>
  137. </html>