zhouna 5 gadi atpakaļ
vecāks
revīzija
dbea4f8061
3 mainītis faili ar 88 papildinājumiem un 2 dzēšanām
  1. 45 0
      src/css/qcScore.less
  2. 24 0
      src/html/qcScore.html
  3. 19 2
      src/js/qcScore.js

+ 45 - 0
src/css/qcScore.less

@@ -406,3 +406,48 @@
 .textL{
   text-align: left;
 }
+/********缺陷总览*********/
+.flaw-table{
+  height: 100%;
+  overflow-y: auto;
+  margin-right: 30px;
+  .slide-up{
+    cursor: pointer;
+    &:before{
+      content: "+";
+      font-size: 18px;
+      color: #5A8EEE;
+    }
+    &.down:before{
+      content: "-";
+    }
+  }
+  table{
+    width: 100%;
+    border:1px solid #E2E5EF;
+    border-collapse: collapse;/*关键代码*/
+    margin-bottom: 40px;
+    thead{
+      background: #EFF0F9;
+
+    }
+    tr[code]{
+      display: none;
+    }
+    th,td{
+      height: 40px;
+      box-sizing: border-box;
+      padding: 0 20px;
+      border:1px solid #E2E5EF;
+      border-collapse: collapse;/*关键代码*/
+    }
+    th{
+      font-size: 14px;
+      font-weight: 500;
+    }
+    td{
+      font-size: 14px;
+      font-weight: 400
+    }
+  }
+}

+ 24 - 0
src/html/qcScore.html

@@ -2523,6 +2523,29 @@
 
         </div>
     </script>
+    <script type="text/html" id="flawTotalList">
+        <table>
+            <thead>
+                <tr>
+                    <th width="250">来源</th>
+                    <th>缺陷内容</th>
+                    <th width="150">扣分</th>
+                </tr>
+            </thead>
+            <tbody>
+                {{each(i,val) data}}
+                <tr><td colspan="3" class="slide-up">${i}</td></tr>
+                {{each val}}
+                <tr code="${i}">
+                    <td>${modelName}</td>
+                    <td>${standardMsg}</td>
+                    <td>${score}</td>
+                </tr>
+                {{/each}}
+                {{/each}}
+            </tbody>
+        </table>
+    </script>
 </head>
 <body>
     <div class="patient-info" id="patientInfo"></div>
@@ -2532,6 +2555,7 @@
             <div class="copy-right">©杭州朗通信息技术有限公司</div>
         </div>
         <div class="tab-container clearfix">
+            <div class="flaw-table"></div>
             <div class="content-box fl" id="contentInfo"></div>
             <div class="operation fr" id="flaws">
                 <div class="flaw-title">

+ 19 - 2
src/js/qcScore.js

@@ -16,8 +16,9 @@ $(function(){
   //initScoreItem();
   getRecordDetail();
 function initMenu(data){
+  const menu=[{id:0,name:"缺陷总览",parentId: -1,sonMode: []},...(data||[])];
   //菜单数据填充
-  $("#subMenuTmpl").tmpl(data).appendTo("#subMenu");
+  $("#subMenuTmpl").tmpl(menu).appendTo("#subMenu");
   //菜单收起展开
   $(".list-1").on("click",function(){
     $(".list-1 .slide-up").removeClass('slide-up');
@@ -29,6 +30,12 @@ function initMenu(data){
   });
   //右侧内容切换
   $(".page").on("click",function(){
+    if($(this).attr("code")==="缺陷总览"){
+      $(".flaw-table").show();
+    }else{
+      $(".flaw-table").hide();
+    }
+
     //选中样式
     $(".sub-menu .active").removeClass('active');
     $(this).addClass("active");
@@ -52,8 +59,9 @@ function getRecordDetail(){
       initMenu(JSON.parse(result.menuData));
       $(".sub-menu>ul>li:first-child.page").addClass("active");
      global_activeTab=$(".sub-menu .page.active").attr("code");
-      initPatientInfo(info);console.log(21,global_activeTab)
+      initPatientInfo(info);
       initContent(result.pageData);
+      initList(msg);
       initScoreItem(msg);
       global_flawData=msg;
       let obj = JSON.parse(result.pageData)
@@ -144,6 +152,15 @@ function formatInfoData(k,data){
   return [obj1];
 }*/
 
+function initList(data){console.log(data)
+  $("#flawTotalList").tmpl({data:data}).appendTo(".flaw-table");
+  $(".slide-up").off("click").on("click",function(){
+    const name = $(this).text();
+    $("tr[code='"+name+"']").slideToggle();
+    $(this).toggleClass("down");
+  });
+}
+
 //评分项数据填充
 function initScoreItem(data){
   $("#flaws .flaw-box").html("");