upvoteLog.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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="formId">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <p>弹框内容:</p>
  15. <input type="text" name="alertContent"/>
  16. </li>
  17. <li>
  18. <p>用户姓名:</p>
  19. <input type="text" name="userName"/>
  20. </li>
  21. <li>
  22. <p>用户账号:</p>
  23. <input type="text" name="loginName"/>
  24. </li>
  25. <li>
  26. <p>点赞状态:</p>
  27. <select name="status">
  28. <option value="">所有</option>
  29. <option value="0">无</option>
  30. <option value="1">赞</option>
  31. <option value="2">踩</option>
  32. </select>
  33. </li>
  34. <li class="select-time">
  35. <p>操作时间:</p>
  36. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="startTime"/>
  37. <span>——</span>
  38. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
  39. </li>
  40. <!-- <li class="select-time">-->
  41. <!-- <p>结束时间:</p>-->
  42. <!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>-->
  43. <!-- </li>-->
  44. <li>
  45. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  46. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  47. </li>
  48. </ul>
  49. </div>
  50. </form>
  51. </div>
  52. <div class="btn-group-sm" id="toolbar" role="group">
  53. <!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:log:add">-->
  54. <!-- <i class="fa fa-plus"></i> 添加-->
  55. <!-- </a>-->
  56. <!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:log:edit">-->
  57. <!-- <i class="fa fa-edit"></i> 修改-->
  58. <!-- </a>-->
  59. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:log:remove">
  60. <i class="fa fa-remove"></i> 删除
  61. </a>
  62. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:log:export">
  63. <i class="fa fa-download"></i> 导出
  64. </a>
  65. </div>
  66. <div class="col-sm-12 select-table table-striped">
  67. <table id="bootstrap-table"></table>
  68. </div>
  69. </div>
  70. </div>
  71. <th:block th:include="include :: footer" />
  72. <script th:inline="javascript">
  73. var editFlag = [[${@permission.hasPermi('system:log:edit')}]];
  74. var removeFlag = [[${@permission.hasPermi('system:log:remove')}]];
  75. var prefix = ctx + "system/upvoteLog";
  76. $(function() {
  77. var options = {
  78. url: prefix + "/list",
  79. createUrl: prefix + "/add",
  80. updateUrl: prefix + "/edit/{id}",
  81. removeUrl: prefix + "/remove",
  82. exportUrl: prefix + "/export",
  83. modalName: "弹框点赞日志",
  84. columns: [{
  85. checkbox: true
  86. },
  87. {
  88. field : 'alertUpvoteId',
  89. title : '日志编号',
  90. visible: false
  91. },
  92. {
  93. field : 'userId',
  94. title : '用户id',
  95. visible: false
  96. },
  97. {
  98. field : 'userName',
  99. title : '用户姓名',
  100. },
  101. {
  102. field : 'loginName',
  103. title : '用户账号',
  104. },
  105. {
  106. field : 'status',
  107. title : '点赞状态',
  108. formatter: function(value, row, index) {
  109. if (value == 0){
  110. return '无';
  111. }
  112. if (value == 1){
  113. return '赞';
  114. }
  115. if (value == 2){
  116. return '踩';
  117. }
  118. }
  119. },
  120. {
  121. field : 'alertId',
  122. title : '弹框配置id',
  123. visible: false
  124. },
  125. {
  126. field : 'alertContent',
  127. title : '弹框内容'
  128. },
  129. {
  130. field : 'photoUrl',
  131. title : '弹框图片',
  132. width : '100px',
  133. formatter: function(value, row, index) {
  134. if (value != null){
  135. // return $.table.imageView(value,600,300,"tableImage_s img-view");
  136. var valueStr = value + '';
  137. console.log('url1',value);
  138. console.log('url2',valueStr);
  139. return '<img width="24" height="22" src="' + value + '" onclick="imgPreview(\'' + valueStr + '\')"/>'
  140. }
  141. }
  142. },
  143. {
  144. field : 'isDelete',
  145. title : '是否删除',
  146. visible: false
  147. },
  148. {
  149. field : 'createTime',
  150. title : '操作时间'
  151. },
  152. {
  153. title: '操作',
  154. align: 'center',
  155. formatter: function(value, row, index) {
  156. var actions = [];
  157. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.alertUpvoteId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  158. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.alertUpvoteId + '\')"><i class="fa fa-remove"></i>删除</a>');
  159. return actions.join('');
  160. },
  161. visible: false
  162. }]
  163. };
  164. $.table.init(options);
  165. });
  166. $("#previewImage").on('click',function (event) {
  167. event.stopPropagation();
  168. })
  169. function closePreview() {
  170. $("#previewImg").hide();
  171. }
  172. function imgPreview(url) {
  173. $("#previewImage").attr('src',url);
  174. $("#previewImg").show();
  175. }
  176. </script>
  177. </body>
  178. </html>