upvoteLog.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 upvoteShow =[[${@dict.getType('upvote_status_show')}]];
  76. var prefix = ctx + "system/upvoteLog";
  77. $(function() {
  78. var options = {
  79. url: prefix + "/list",
  80. createUrl: prefix + "/add",
  81. updateUrl: prefix + "/edit/{id}",
  82. removeUrl: prefix + "/remove",
  83. exportUrl: prefix + "/export",
  84. modalName: "弹框点赞日志",
  85. columns: [{
  86. checkbox: true
  87. },
  88. {
  89. field : 'alertUpvoteId',
  90. title : '日志编号',
  91. visible: false
  92. },
  93. {
  94. field : 'userId',
  95. title : '用户id',
  96. visible: false
  97. },
  98. {
  99. field : 'userName',
  100. title : '用户姓名',
  101. },
  102. {
  103. field : 'loginName',
  104. title : '用户账号',
  105. },
  106. {
  107. field : 'status',
  108. title : '点赞状态',
  109. formatter: function(value, row, index) {
  110. return $.table.selectDictLabel(upvoteShow, value);
  111. }
  112. },
  113. {
  114. field : 'alertId',
  115. title : '弹框配置id',
  116. visible: false
  117. },
  118. {
  119. field : 'alertContent',
  120. title : '弹框内容',
  121. formatter: function(value, row, index) {
  122. return $.table.tooltip(value); // 使用tooltip显示完整内容
  123. }
  124. },
  125. {
  126. field : 'photoUrl',
  127. title : '弹框图片',
  128. width : '100px',
  129. formatter: function(value, row, index) {
  130. if (value != null){
  131. // return $.table.imageView(value,600,300,"tableImage_s img-view");
  132. var valueStr = value + '';
  133. console.log('url1',value);
  134. console.log('url2',valueStr);
  135. return '<img width="24" height="22" src="' + value + '" onclick="imgPreview(\'' + valueStr + '\')"/>'
  136. }
  137. }
  138. },
  139. {
  140. field : 'isDelete',
  141. title : '是否删除',
  142. visible: false
  143. },
  144. {
  145. field : 'createTime',
  146. title : '操作时间'
  147. },
  148. {
  149. title: '操作',
  150. align: 'center',
  151. formatter: function(value, row, index) {
  152. var actions = [];
  153. 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> ');
  154. 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>');
  155. return actions.join('');
  156. },
  157. visible: false
  158. }]
  159. };
  160. $.table.init(options);
  161. });
  162. $("#previewImage").on('click',function (event) {
  163. event.stopPropagation();
  164. })
  165. function closePreview() {
  166. $("#previewImg").hide();
  167. }
  168. function imgPreview(url) {
  169. $("#previewImage").attr('src',url);
  170. $("#previewImg").show();
  171. }
  172. </script>
  173. </body>
  174. </html>