report.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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="erBanNo" placeholder="请输入被举报的卿卿号"/>
  15. </li>
  16. <li>
  17. 举报的卿卿号:<input type="text" name="reportErBanNo" placeholder="请输入举报的卿卿号"/>
  18. </li>
  19. <li>
  20. 类型:<select name="type" th:with="type=${@dict.getType('users_room_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="reportType" th:with="type=${@dict.getType('report_type')}">
  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. 操作人:<input type="text" name="adminName" placeholder="请输入操作人"/>
  33. </li>
  34. <li class="select-time">
  35. <label>创建时间: </label>
  36. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
  37. <span>-</span>
  38. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
  39. </li>
  40. <li>
  41. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  42. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  43. </li>
  44. </ul>
  45. </div>
  46. </form>
  47. </div>
  48. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  49. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  50. </div>
  51. </div>
  52. </div>
  53. <th:block th:include="include :: footer" />
  54. <script th:inline="javascript">
  55. var bannedFlag = [[${@permission.hasPermi('review:report:banned:punish')}]];
  56. var blockFlag = [[${@permission.hasPermi('review:report:block:punish')}]];
  57. var ignoreFlag = [[${@permission.hasPermi('review:report:ignore')}]];
  58. var reportType = [[${@dict.getType('report_type')}]];
  59. var usersOrRoomType = [[${@dict.getType('users_room_type')}]];
  60. var reportStatus = [[${@dict.getType('report_status')}]];
  61. var prefix = ctx + "review/report";
  62. $(function() {
  63. var options = {
  64. url: prefix + "/list",
  65. modalName: "举报管理",
  66. height: $(window).height()-120,
  67. columns: [
  68. {
  69. field: 'id',
  70. title: 'ID'
  71. },
  72. {
  73. field: 'erBanNo',
  74. title: '被举报的卿卿号'
  75. },
  76. {
  77. field: 'nick',
  78. title: '被举报的用户昵称',
  79. align : 'center'
  80. },
  81. {
  82. field: 'reportErBanNo',
  83. title: '举报的卿卿号',
  84. align : 'center'
  85. },
  86. {
  87. field: 'reportNick',
  88. title: '举报的用户昵称',
  89. align : 'center'
  90. },
  91. {
  92. field: 'type',
  93. title: '类型',
  94. align : 'center',
  95. formatter: function(value, row, index) {
  96. return $.table.selectDictLabel(usersOrRoomType, value);
  97. }
  98. },
  99. {
  100. field: 'ip',
  101. title: 'IP',
  102. align : 'center'
  103. },
  104. {
  105. field: 'deviceId',
  106. title: '设备号',
  107. align : 'center'
  108. },
  109. {
  110. field: 'reportType',
  111. title: '举报类型',
  112. align : 'center',
  113. formatter: function(value, row, index) {
  114. return $.table.selectDictLabel(reportType, value);
  115. }
  116. },
  117. {
  118. field: 'status',
  119. title: '状态',
  120. align : 'center',
  121. formatter: function(value, row, index) {
  122. return $.table.selectDictLabel(reportStatus, value);
  123. }
  124. },
  125. {
  126. field: 'adminName',
  127. title: '操作人',
  128. align : 'center'
  129. },
  130. {
  131. field: 'createDate',
  132. title: '时间',
  133. align : 'center'
  134. },
  135. {
  136. title: '操作',
  137. align: 'center',
  138. formatter: function(value, row, index) {
  139. var actions = [];
  140. if(row.status == 2){
  141. actions.push('<a class="btn btn-success btn-xs ' + bannedFlag + '" href="javascript:void(0)" onclick="banned(\'' + row.id + '\',\'' + row.erBanNo + '\')"><i class="fa fa-ban"></i> 禁言处罚</a> ');
  142. actions.push('');
  143. actions.push('');
  144. actions.push('<a class="btn btn-primary btn-xs ' + blockFlag + '" href="javascript:void(0)" onclick="block(\'' + row.id + '\',\'' + row.erBanNo + '\')"><i class="fa fa-exclamation-circle"></i> 封禁处罚</a> ');
  145. actions.push('');
  146. actions.push('');
  147. actions.push('<a class="btn btn-success btn-xs ' + ignoreFlag + '" href="javascript:void(0)" onclick="ignore(\'' + row.id + '\')"><i class="fa fa-edit"></i> 忽略</a>');
  148. }
  149. return actions.join('');
  150. }
  151. }]
  152. };
  153. $.table.init(options);
  154. });
  155. function banned(id,erBanNo){
  156. var url = prefix + "/banned?id=" + id + "&erBanNo=" + erBanNo ;
  157. $.modal.open("禁言处罚",url,'800','400');
  158. }
  159. function block(id,erBanNo){
  160. var url = prefix + "/block?id=" + id + "&erBanNo=" + erBanNo ;
  161. $.modal.open("封禁处罚",url,'800','400');
  162. }
  163. function ignore(id) {
  164. $.modal.confirm("确认要忽略吗?", function () {
  165. $.operate.post(prefix + "/ignore?id=" + id);
  166. });
  167. }
  168. </script>
  169. </body>
  170. </html>