final_report_list.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
  4. layout:decorator="main">
  5. <head>
  6. <link rel="stylesheet" type="text/css" href="/static/css/main.css"/>
  7. <link rel="stylesheet" type="text/css" href="/static/css/app_info.css"/>
  8. <!-- dataTables -->
  9. <link rel="stylesheet" type="text/css"
  10. href="/static/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css"/>
  11. <!-- Select2 -->
  12. <link rel="stylesheet" type="text/css" href="/static/AdminLTE/bower_components/select2/dist/css/select2.min.css"/>
  13. </head>
  14. <body>
  15. <th:block layout:fragment="sidebar">
  16. <li class="treeview">
  17. <a href="#">
  18. <i class="fa fa-list"></i>
  19. <span>审核报告</span>
  20. <span class="pull-right-container">
  21. <i class="fa fa-angle-left pull-right"></i>
  22. </span>
  23. </a>
  24. <ul class="treeview-menu" style="display: block;">
  25. <li>
  26. <a th:href="'/task_detail?examId='+${examId}+'&amp;caseId='+${caseId}">
  27. <i class="fa fa-sticky-note text-success"></i>
  28. <span>默认视图</span>
  29. </a>
  30. </li>
  31. <li>
  32. <a th:href="'/agg_report_list?examId='+${examId}+'&amp;caseId='+${caseId}">
  33. <i class="fa fa-sitemap text-warning"></i>
  34. <span>聚合视图</span>
  35. </a>
  36. </li>
  37. </ul>
  38. </li>
  39. </th:block>
  40. <th:block layout:fragment="maincontent">
  41. <section class="content-header">
  42. <h1>预交付报告
  43. <small th:text="${task.name}"></small>
  44. </h1>
  45. <ol class="breadcrumb">
  46. <li>
  47. <a href="/home">
  48. <i class="fa fa-dashboard"></i>
  49. 全部任务
  50. </a>
  51. </li>
  52. <li class="active" th:text="|${task.name} 预交付报告|">
  53. </li>
  54. </ol>
  55. </section>
  56. <section class="content container-fluid">
  57. <!-- Report List Table -->
  58. <table id="report-list" class="table table-striped table-bordered" cellpadding="0" width="100%">
  59. <thead>
  60. <tr>
  61. <th>类别</th>
  62. <th>严重程度</th>
  63. <th>可复现程度</th>
  64. <th>描述</th>
  65. <th>来源</th>
  66. <th>创建人</th>
  67. <th>操作</th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. <th:block th:each="report : ${finalReports}">
  72. <tr th:class="|row-${report.id}|">
  73. <td>
  74. <!--<i class="fa fa-square" style="color: {{ report.print_bug_category_color }};"></i>-->
  75. <span th:text="${category2String.get(report.category)}"></span>
  76. </td>
  77. <td>
  78. <img th:alt="|${severity2String.get(report.severity)} Image|" height="14"
  79. th:src="'/static/images/icons/priorities/' + ${report.severity} + '.png'"/>
  80. <span th:text="${severity2String.get(report.severity)}"></span>
  81. </td>
  82. <td>
  83. <span th:text="${recurrent2String.get(report.recurrent)}"></span>
  84. </td>
  85. <td style="width: 300px;">
  86. <div th:id="'ab-content-' + ${report.id}" data-toggle="collapse" th:attr="data-target='#full-content-' + ${report.id}" class="trunc collapse in" th:text="${report.description}">
  87. </div>
  88. <div th:id="'full-content-' + ${report.id}" data-toggle="collapse" th:attr="data-target='#ab-content-' + ${report.id}" class="full-content collapse">
  89. <span th:text="${report.description}"></span>
  90. <br/>
  91. <img class="my-img-thumbnail pointer" th:src="${imgUrl}"
  92. th:each="imgUrl,iterStat : ${report.getImgUrls()}"
  93. onclick="showimage(event);"/>
  94. </div>
  95. </td>
  96. <td class="report-aggregator">
  97. <a th:href="'report?masterId='+${report.sourceId}+'&amp;examId='+${examId}+'&amp;caseId='+${caseId}"
  98. th:text="|ML-AG-${report.sourceId.substring(10)}|"></a>
  99. </td>
  100. <td class="report-assignee">
  101. 管理员
  102. </td>
  103. <td>
  104. <a th:href="'report?masterId='+${report.sourceId}+'&amp;examId='+${examId}+'&amp;caseId='+${caseId}+'&amp;finalReportId='+${report.id}">编辑</a>
  105. <a href="#" th:onclick="'deleteReport('+ ${report.id} +')'">删除</a>
  106. </td>
  107. </tr>
  108. </th:block>
  109. </tbody>
  110. </table>
  111. </section>
  112. </th:block>
  113. </body>
  114. </html>
  115. <div class="modal fade bs-example-modal-lg text-center" id="imgModal" tabindex="-1" role="dialog"
  116. aria-labelledby="myLargeModalLabel">
  117. <div class="modal-dialog modal-lg" style="display: inline-block; width: 300px;">
  118. <div class="modal-content">
  119. <img id="imgInModalID"
  120. class="carousel-inner img-responsive img-rounded"
  121. onclick="closeImageViewer()"
  122. onmouseover="this.style.cursor='pointer';this.style.cursor='hand'"
  123. onmouseout="this.style.cursor='default'"
  124. />
  125. </div>
  126. </div>
  127. </div>
  128. <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
  129. <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
  130. <script src="/static/AdminLTE/bower_components/select2/dist/js/select2.min.js"></script>
  131. <script src="/static/js/app_info.js"></script>
  132. <script type="text/javascript">
  133. function deleteReport(finalReportId) {
  134. $.ajax({
  135. url: '/final_report/' + finalReportId,
  136. type: 'DELETE',
  137. success: function (result) {
  138. // Do something with the result
  139. alert("删除成功");
  140. location.reload();
  141. }
  142. });
  143. }
  144. //显示大图
  145. function showimage(e) {
  146. $("#imgModal").find("#imgInModalID").attr("src", e.target.src);
  147. $("#imgModal").modal();
  148. e.stopPropagation()
  149. }
  150. //关闭
  151. function closeImageViewer() {
  152. $("#imgModal").modal('hide');
  153. }
  154. </script>