Bladeren bron

完善树状报告和聚合报告主页面

insomniaLee 6 jaren geleden
bovenliggende
commit
e6bd999f5f

+ 7 - 7
src/main/resources/templates/agg_report_new.html

@@ -49,7 +49,7 @@
         <h1 id="mainTitle">融合报告详情
             <small th:text="${aggReportId}"></small>
 
-            <button id="backButton" type="button" class="btn btn-default" onclick="showMainReport()"  style="display: none; " >返回</button>
+            <button id="backButton" type="button" class="btn btn-default" onclick="showAggMainReport()"  style="display: none; " >返回</button>
         </h1>
 
         <!-- <h1>Summary for report 0-5</h1> -->
@@ -211,7 +211,7 @@
                                                       style="color: #3c8dbc; margin-right: 5px;"></span>
                                                     <a th:href="'/report/'+${report.id}+'?examId=' + ${examId} + '&amp;caseId=' + ${caseId}" style="margin-right: 5px;" th:text="${report.id}"></a>
                                                     <!--查看树状报告-->
-                                                    <span th:if="${single2root.get(report.id)!=null}"  th:onclick="'changeToTree('+${single2root.get(report.id)}+')'"
+                                                    <span th:if="${single2root.get(report.id)!=null} and ${showReference}"  th:onclick="'changeToTree('+${single2root.get(report.id)}+')'"
                                                            class="glyphicon glyphicon-tree-conifer"
                                                            style="color: #07b309; margin-right: 5px;" >
                                                     </span>
@@ -248,7 +248,7 @@
                 </div>
             </div>
 
-            <div id="aggPart">
+            <div id="treePart">
 
             </div>
 
@@ -372,7 +372,7 @@
         <div style="overflow: auto;" class="row tree-container">
             <div class="col-md-8 tree-wrapper">
                 <div class="box box-info pull-left svg-div" style="background-color: rgb(247, 247, 247); ">
-                    <h4 style="padding-left: 10px;" class="pull-left">聚合图</h4>
+                    <h4 style="padding-left: 10px;" class="pull-left" id="showPicture">聚合图</h4>
                     <svg class="graph" id="tree" width="100%" height="420" viewBox="0 0 700 350">
                         <g transform="translate(10,20)" id="tree-g">
                             <g class="links"></g>
@@ -522,6 +522,7 @@
         //$('#new-report-create-block').load("/created_reports_form");
         $("#backButton").show();
         $('#treePart').show();
+        $('#showPicture').html("树状图")
         //initTree(treeId);
         initTreeReport(treeId);
     }
@@ -567,11 +568,12 @@
         return $img;
     }
 
-    showMainReport  = function () {
+    showAggMainReport  = function () {
         $('#summary').show();
         $('#treePart').hide();
         $('#backButton').hide();
         initMaster();
+        $('#showPicture').html("聚合图")
     }
 
     function showCreateButton() {
@@ -683,8 +685,6 @@
 
 
 
-
-
     function reviewConfirm() {
         $.ajax({
             url: '/bug_review?masterId='+masterId,

+ 6 - 4
src/main/resources/templates/tree_report_new.html

@@ -47,7 +47,7 @@
     <section class="content-header">
         <h1>树状报告详情
             <small th:text="${aggReportId}"></small>
-            <button id="backButton" type="button" class="btn btn-default" onclick="showMainReport()"  style="display: none; " >返回</button>
+            <button id="backButton" type="button" class="btn btn-default" onclick="showTreeMainReport()"  style="display: none; " >返回</button>
         </h1>
         <!-- <h1>Summary for report 0-5</h1> -->
         <!-- <small style="font-style: italic;">at 50% report-level and 25% supplementary level</small> -->
@@ -207,7 +207,7 @@
                                                       style="color: #3c8dbc; margin-right: 5px;"></span>
                                                     <a th:href="'/report/'+${supplement.id}+'?examId=' + ${examId} + '&amp;caseId=' + ${caseId}" style="margin-right: 5px;" th:text="${supplement.getId()}"></a>
                                                     <!--查看聚合报告-->
-                                                     <span th:if="${report2master.get(supplement.getId())!=null }"
+                                                     <span th:if="(${report2master.get(supplement.getId())!=null }) and ${showReference}"
                                                           class="fa fa-sitemap text-warning"
                                                            th:onclick="'changeToAgg('+${report2master.get(supplement.getId())}+')'"
                                                           style="color: #8a6d3b; margin-right: 5px;" >
@@ -366,7 +366,7 @@
         <div style="overflow: auto;" class="row tree-container">
             <div class="col-md-8 tree-wrapper">
                 <div class="box box-info pull-left svg-div" style="background-color: rgb(247, 247, 247); ">
-                    <h4 style="padding-left: 10px;" class="pull-left">树状图</h4>
+                    <h4 style="padding-left: 10px;" class="pull-left" id="showPicture">树状图</h4>
                     <svg class="graph" id="tree" width="100%" height="420" viewBox="0 0 700 350">
                         <g transform="translate(10,20)" id="tree-g">
                             <g class="links"></g>
@@ -637,6 +637,7 @@
         $("#aggPart").load("/report_part?masterId="+master_id+"&caseId="+ caseId +"&examId="+ examId);
         $("#backButton").show();
         $('#aggPart').show();
+        $('#showPicture').html("聚合图")
         //initTree(treeId);
         /*]]>*/
         initAggReport(master_id);
@@ -686,10 +687,11 @@
     }
     /*]]>*/
 
-    showMainReport  = function () {
+    showTreeMainReport  = function () {
         $('#summary').show();
         $('#aggPart').hide();
         $('#backButton').hide();
+        $('#showPicture').html("树状图")
         initTree(treeId);
     }