feedback.html 5.7 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. 卿卿:<input type="text" name="erbanNo" placeholder=""/>
  15. </li>
  16. <li class="select-time">
  17. <label>创建时间: </label>
  18. <input type="text" class="time-input" id="beginDate" placeholder="开始时间" name="beginDate"/>
  19. <span>-</span>
  20. <input type="text" class="time-input" id="endDate" placeholder="结束时间" name="endDate"/>
  21. </li>
  22. <li>
  23. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
  24. class="fa fa-search"></i>&nbsp;搜索</a>
  25. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
  26. class="fa fa-refresh"></i>&nbsp;重置</a>
  27. </li>
  28. </ul>
  29. </div>
  30. </form>
  31. </div>
  32. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  33. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  34. </div>
  35. </div>
  36. </div>
  37. <th:block th:include="include :: footer"/>
  38. <script th:inline="javascript">
  39. var prefix = ctx + "system/feedback";
  40. $(function () {
  41. var today = new Date();
  42. today.setDate(today.getDate()-7)
  43. $("#beginDate").val(today.Format("yyyy-MM-dd"));
  44. $("#endDate").val(new Date().Format("yyyy-MM-dd"));
  45. var options = {
  46. url: prefix + "/list",
  47. modalName: "用户反馈",
  48. height: 600,
  49. columns: [
  50. {
  51. field: 'uid',
  52. title: '用户uid',
  53. align: 'center',
  54. },
  55. {
  56. field: 'erbanNo',
  57. title: '卿卿号'
  58. },
  59. {
  60. field: 'feedbackDesc',
  61. title: '反馈信息',
  62. align: 'center'
  63. },
  64. {
  65. field: 'imgUrl',
  66. title: '反馈截图',
  67. align : 'center',
  68. formatter:function (value,row,index) {
  69. if(typeof value == "undefined" || value == null || value == ""){
  70. return '-';
  71. }else{
  72. return "<img onclick='ShowFloatingImage(this, 400, 300);' src='" + value + "' width='70' height='60'>";
  73. }
  74. }
  75. },
  76. {
  77. field: 'contact',
  78. title: '摘要',
  79. align: 'center'
  80. },
  81. {
  82. field: 'createTime',
  83. title: '生成时间',
  84. align: 'center'
  85. }
  86. ]
  87. };
  88. $.table.init(options);
  89. });
  90. //3个参数 分别是图片对象,图片宽度,图片高度
  91. function ShowFloatingImage(image, width, height) {
  92. //这一部分是创建一个div,将图片放大成设定的width,height
  93. var id = "trailimageid";
  94. var newdiv = document.getElementById(id);
  95. if(newdiv == null) {
  96. newdiv = document.createElement('div');
  97. newdiv.setAttribute('id',id);
  98. //需要一个移出事件,将图片返回原来大小
  99. newdiv.setAttribute('onmouseout', "HideElement('"+id+"');");
  100. document.body.appendChild(newdiv);
  101. }
  102. newdiv.innerHTML = '<img src='+image.src+ ' width='+(image.width + width) + ' height=' + (image.height + height) + ' />';
  103. //获取图片位置,调整图片位置样式
  104. var absPos = GetAbsPosition(image);
  105. newdiv.style.position = "absolute";
  106. newdiv.style.left =absPos[0] - width/2+'px';
  107. newdiv.style.top = absPos[1] - height/2+'px';
  108. newdiv.style.display="block";
  109. }
  110. //获取图片在表格中位置
  111. function GetAbsPosition(obj) {
  112. var curleft = 0, curtop = 0;
  113. do {
  114. curleft += obj.offsetLeft;
  115. curtop += obj.offsetTop;
  116. } while (obj = obj.offsetParent);
  117. return [curleft,curtop];
  118. }
  119. //隐藏div
  120. function HideElement(id) {
  121. var elem = document.getElementById(id);
  122. elem.style.display="none";
  123. }
  124. Date.prototype.Format = function (fmt) { //author: meizz
  125. var o = {
  126. "M+": this.getMonth() + 1, //月份
  127. "d+": this.getDate(), //日
  128. "H+": this.getHours(), //小时
  129. "m+": this.getMinutes(), //分
  130. "s+": this.getSeconds(), //秒
  131. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  132. "S": this.getMilliseconds() //毫秒
  133. };
  134. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  135. for (var k in o)
  136. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  137. return fmt;
  138. };
  139. </script>
  140. </body>
  141. </html>