瀏覽代碼

Merge remote-tracking branch 'origin/dynamicScale0609' into uiUptate0629

# Conflicts:
#	src/css/common.less
#	src/css/staticInfo.less
#	src/js/cdss.js
zhouna 3 年之前
父節點
當前提交
e7f22ad6bd

+ 7 - 6
src/css/common.less

@@ -32,10 +32,10 @@
   -ms-user-select: none;
   user-select: none;
 }
-.ellipsis {
-  white-space: nowrap; /*强制在一行显示*/
-  text-overflow: ellipsis; /*设置超出内容显示...*/
-  overflow: hidden; /*一定不能少 超出的内容进行隐藏*/
+.ellipsis{
+    white-space: nowrap;/*强制在一行显示*/
+	text-overflow:ellipsis;/*设置超出内容显示...*/
+	overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
 }
 .clearfix:after {
   content: "";
@@ -90,7 +90,8 @@
     width: 100%;
     height: 100%;
     background: #000;
-    opacity: 0.3;
+    opacity: .3;
+    filter:Alpha(opacity=30);
     z-index: 999;
   }
   .inner-box {
@@ -104,7 +105,7 @@
     border-radius: 4px;
   }
   .title {
-    border-bottom: 1px #ebebeb solid;
+    border-bottom: 1px #EBEBEB solid;
     height: 40px;
     line-height: 40px;
     span {

+ 101 - 0
src/css/informationOut.css

@@ -0,0 +1,101 @@
+
+@media print {
+  body{
+    background: #ffffff;
+    overflow-y: hidden;
+  }
+  #Print{
+    overflow-y: hidden;
+    background: #fff;
+  }
+
+  .scaletitle{
+    display: block;
+  }
+  .info_left{
+    width: 527px;
+    margin:30px auto;
+    display: block;
+    overflow: hidden;
+    border:1px solid #D8D8D8;
+  }
+  .contentList{
+    max-width: 100%;
+    border-bottom: 1PX solid #F3F3F3;
+    margin-bottom: 6px;
+  }
+  .item-list{
+    padding: 0 21px;
+  }
+  .item-title,.item-titles{
+    font-size: 14px;
+    font-weight: 400;
+    color: #333333;
+    line-height: 20px;
+    margin-top: 14px;
+  }
+  .item-content{
+    margin: 10px 0;
+    display: flex;
+    flex-flow: wrap;
+  }
+  .radio {
+    display: flex;
+    margin: 5px;
+    margin-right: 25px;
+  } 
+  label{
+    font-weight: 400;
+    color: #666666;
+    line-height: 20px;
+  }
+  label> input{
+    margin-right: 6px;
+  }
+  .num{
+    margin-left: 10px;
+  }
+  .recommend{
+    width: 18px;
+    height: 18px;
+  }
+  .result{
+    background: #EDFAFF;
+    border-radius: 10px;
+    font-size: 14px;
+    font-weight: 500;
+    color: #333333;
+    display: none;
+    margin: 0;
+    text-align: center;
+  }
+  .result_box{
+    margin:0;
+    display: inline-block;
+  }
+  .result_left{
+    display: flex;
+  }
+  .result_left>span{
+    display: block;
+    width: 250px;
+  }
+  .hel{
+    width: 21px;
+    height: 21px;
+    background: #2C96E5;
+    border-radius: 50%;
+    color: #fff;
+    font-size: 12px;
+    vertical-align: middle;
+    margin-right: 9px;
+    float: left;
+    display: none;
+  }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
+}

+ 67 - 32
src/css/informationOut.less

@@ -33,7 +33,6 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   .titleH2 {
     font-size: 18px;
     position: relative;
-    height: 18px;
     line-height: 17px;
     background: #fff;
     padding-right: 6px;
@@ -78,6 +77,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   .infos {
     height: 100%;
     overflow-y: auto;
+    overflow-x:hidden
     /*padding: 0 60px 0 0;
     width: calc(100% - 195px);*/
   }
@@ -169,32 +169,41 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
 }
 
 .anchors .a-circle{
-  border:2px #8DD1EE solid;
   width: 10px;
   height: 10px;
-  background: #fff;
-  border-radius: 16px;
   position: absolute;
   top: 28px;
-  left: 25px;
+  left: 27px;
   z-index: 1;
+  background: url('../images/icon-circular2.png');
+  background-repeat: no-repeat;
+  background-position-x: center;
+  background-position-y: center;
+  background-size: 10px 10px;
+  background: none\9;
+  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/icon-circular2.png',sizingMethod='scale');
+
 }
-.anchors .a-circle:last-child{
-  position: initial;
-  margin-left: 25px;
-  margin-top: 0;
+.anchors .a-circle-2{
+  position: relative;
+  margin-top: -16px;
+  top: 0;
 }
 .anchors i {
   position: absolute;
   display: inline-block;
   width: 10px;
   height: 10px;
-  border-radius: 5px;
-  border: 1px solid @staticMainColor;
-  background-color: @staticMainColor;
-  left: -7px;
+  left: -6px;
   top: 8px;
   z-index: 1;
+  background: url('../images/icon-circular.png');
+  background-repeat: no-repeat;
+  background-position-x: center;
+  background-position-y: center;
+  background-size: 10px 10px;
+  background: none\9;
+  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/icon-circular.png',sizingMethod='scale');
 }
 .anchors li:first-child i{
   top:29px;
@@ -221,12 +230,15 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   width: 18px;
   height: 9px;
   top: 10px;
-  left: -10px;
-  border-radius: 0;
+  left: -6px;
   border: none;
-  background-color: #F5F6F7;
-  background: url('../images/icon_current.png') center center no-repeat;
+  background: url('../images/icon_current.png');
+  background-repeat: no-repeat;
+  background-position-x: center;
+  background-position-y: center;
   background-size: 18px 9px;
+  background: none\9;
+  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/icon_current.png',sizingMethod='scale');
 }
   .disCopy {
     -webkit-touch-callout: none;
@@ -393,6 +405,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   line-height: 28px;
   margin: 30px 0 8px 0;
   text-align: center;
+  display: none;
 }
 .scaleBox{
   border-bottom: none;
@@ -403,6 +416,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   margin-bottom: 6px;
   .item-list{
     padding: 0 21px;
+    color: #666666;
     .item-title,.item-titles{
       font-size: 14px;
       font-weight: 400;
@@ -419,8 +433,6 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
         margin: 5px;
         margin-right: 25px;
         label{
-          display: flex;
-          align-items: center;
           font-weight: 400;
           color: #666666;
           line-height: 20px;
@@ -476,24 +488,25 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   text-align: center;
   .result_box{
     padding:25px 56px;
-    overflow: hidden;
-    position: relative;
+    display: inline-block;
     .result_left{
-      display: inline-block;
-      position: absolute;
+      display: flex;
+      & span{
+        display: block;
+        width: 42px;
+      }
       .hel{
+        width: 21px;
+        height: 21px;
         background: #2C96E5;
         border-radius: 50%;
         color: #fff;
-        margin-right: 9px;
         font-size: 12px;
         vertical-align: middle;
+        margin-right: 9px;
+        float: left;
       }
-    }
-    .result_title{
-      max-width: 85%;
-      display: inline-block;
-      margin-left: 70px;
+      
     }
   }
   
@@ -547,7 +560,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   
 }
 #inputs{
-  position: absolute;top: 0;left: 0;opacity: 0;z-index: -10;
+  position: absolute;top: 0;left: 0;opacity: 0;z-index: -10
 }
 #Print{
   width: 100%!important;
@@ -555,9 +568,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
 }
 .scale{
   .infos-box{
-    border: 1px solid #E6E6E6;
     margin: 0 71px 20px 38px;
-    padding-top: 20px;
     .infoWrapper {
       padding: 0 75px;
     }
@@ -568,4 +579,28 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
 }
 .chColor{
   color: red!important;
+}
+.info_left {
+  width: 527px;
+  margin:30px auto;
+  display: none;
+  overflow: hidden;
+  border:1px solid #D8D8D8;
+  li {
+    width: 50%;
+    height: 30px;
+    padding: 0 10px;
+    box-sizing: border-box;
+    border: 1px solid #bbbfc1;
+    border-right: none;
+    font-size: 14px;
+    float: left;
+    border-bottom: none;
+  }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
 }

+ 101 - 0
src/css/print.css

@@ -0,0 +1,101 @@
+
+@media print {
+  body{
+    background: #ffffff;
+    overflow-y: hidden;
+  }
+  #Print{
+    overflow-y: hidden;
+    background: #fff;
+  }
+
+  .scaletitle{
+    display: block;
+  }
+  .info_left{
+    width: 527px;
+    margin:30px auto;
+    display: block;
+    overflow: hidden;
+    border:1px solid #D8D8D8;
+  }
+  .contentList{
+    max-width: 100%;
+    border-bottom: 1PX solid #F3F3F3;
+    margin-bottom: 6px;
+  }
+  .item-list{
+    padding: 0 21px;
+  }
+  .item-title,.item-titles{
+    font-size: 14px;
+    font-weight: 400;
+    color: #333333;
+    line-height: 20px;
+    margin-top: 14px;
+  }
+  .item-content{
+    margin: 10px 0;
+    display: flex;
+    flex-flow: wrap;
+  }
+  .radio {
+    display: flex;
+    margin: 5px;
+    margin-right: 25px;
+  } 
+  label{
+    font-weight: 400;
+    color: #666666;
+    line-height: 20px;
+  }
+  label> input{
+    margin-right: 6px;
+  }
+  .num{
+    margin-left: 10px;
+  }
+  .recommend{
+    width: 18px;
+    height: 18px;
+  }
+  .result{
+    background: #EDFAFF;
+    border-radius: 10px;
+    font-size: 14px;
+    font-weight: 500;
+    color: #333333;
+    display: none;
+    margin: 0;
+    text-align: center;
+  }
+  .result_box{
+    margin:0;
+    display: inline-block;
+  }
+  .result_left{
+    display: flex;
+  }
+  .result_left>span{
+    display: block;
+    width: 250px;
+  }
+  .hel{
+    width: 21px;
+    height: 21px;
+    background: #2C96E5;
+    border-radius: 50%;
+    color: #fff;
+    font-size: 12px;
+    vertical-align: middle;
+    margin-right: 9px;
+    float: left;
+    display: none;
+  }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
+}

+ 51 - 27
src/css/staticInfo.less

@@ -92,8 +92,7 @@
   .infos {
     height: 100%;
     overflow-y: auto;
-    /*padding: 0 60px 0 0;*/
-    // width: calc(100% - 250px);
+    border-top: 1px solid #E6E6E6;
   }
 
   .infos>div {
@@ -179,18 +178,18 @@
   }
 
 .anchors .a-circle{
-  border:2px #8DD1EE solid;
   width: 16px;
   height: 16px;
-  background: #fff;
-  border-radius: 16px;
   position: absolute;
-  left: 41px;
+  left: 43px;
   z-index: 1;
+  background: url('../images/icon-circular2.png');
+  background-repeat: no-repeat;
+  background-position-x: center;
+  background-position-y: center;
 }
-.anchors .a-circle:last-child{
-  position: unset;
-  margin-left: 41px;
+.anchors .a-circle-2{
+  margin-left: 0;
   margin-top: -16px;
 }
   .anchors i {
@@ -198,12 +197,13 @@
     display: inline-block;
     width: 16px;
     height: 16px;
-    border-radius: 8px;
-    border: 1px solid @staticMainColor;
-    background-color: @staticMainColor;
-    left: -10px;
+    left: -9px;
     top: 5px;
     z-index: 1;
+    background: url('../images/icon-circular.png');
+    background-repeat: no-repeat;
+    background-position-x: center;
+    background-position-y: center;
   }
 .anchors li:first-child i{
   top:37px;
@@ -344,6 +344,7 @@
   line-height: 28px;
   margin: 30px 0 8px 0;
   text-align: center;
+  display: none;
 }
 .scaleBox{
   border-bottom: none;
@@ -354,6 +355,7 @@
   margin-bottom: 6px;
   .item-list{
     padding: 0 21px;
+    color: #666666;
     .item-title,.item-titles{
       font-size: 14px;
       font-weight: 400;
@@ -370,8 +372,6 @@
         margin: 5px;
         margin-right: 25px;
         label{
-          display: flex;
-          align-items: center;
           font-weight: 400;
           color: #666666;
           line-height: 20px;
@@ -427,24 +427,25 @@
   text-align: center;
   .result_box{
     padding:25px 56px;
-    overflow: hidden;
-    position: relative;
+    display: inline-block;
     .result_left{
-      display: inline-block;
-      position: absolute;
+      display: flex;
+      & span{
+        display: block;
+        width: 42px;
+      }
       .hel{
+        width: 21px;
+        height: 21px;
         background: #2C96E5;
         border-radius: 50%;
         color: #fff;
-        margin-right: 9px;
         font-size: 12px;
         vertical-align: middle;
+        margin-right: 9px;
+        float: left;
       }
-    }
-    .result_title{
-      max-width: 85%;
-      display: inline-block;
-      margin-left: 65px;
+      
     }
   }
   
@@ -498,7 +499,7 @@
   
 }
 #inputs{
-  position: absolute;top: 0;left: 0;opacity: 0;z-index: -10;
+  position: absolute;top: 0;left: 0;opacity: 0;z-index: -10
 }
 #Print{
   width: 100%!important;
@@ -506,7 +507,6 @@
 }
 .scale{
   .infos-box{
-    border: 1px solid #E6E6E6;
     margin: 0 71px 20px 38px;
     .infoWrapper {
       padding: 0 75px;
@@ -518,4 +518,28 @@
 }
 .chColor{
   color: red!important;
+}
+.info_left {
+  width: 527px;
+  margin:30px auto;
+  display: none;
+  overflow: hidden;
+  border:1px solid #D8D8D8;
+  li {
+    width: 50%;
+    height: 30px;
+    padding: 0 10px;
+    box-sizing: border-box;
+    border: 1px solid #bbbfc1;
+    border-right: none;
+    font-size: 14px;
+    float: left;
+    border-bottom: none;
+  }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
 }

+ 30 - 3
src/html/informationOut.html

@@ -33,7 +33,7 @@
       <div class="anchors">
         <div class="a-circle"></div>
         <ul></ul>
-        <div class="a-circle"></div>
+        <div class="a-circle a-circle-2"></div>
       </div>
     </div>
   </div>
@@ -43,7 +43,7 @@
       <div class="anchors">
         <div class="a-circle"></div>
         <ul></ul>
-        <div class="a-circle"></div>
+        <div class="a-circle a-circle-2"></div>
       </div>
     </div>
   </div>
@@ -53,13 +53,40 @@
       <div class="anchors">
         <div class="a-circle"></div>
         <ul></ul>
-        <div class="a-circle"></div>
+        <div class="a-circle a-circle-2"></div>
       </div>
     </div>
   </div>
   <div class=" container disCopy scale">
     <div class="content">
       <div class="infos" id="Print">
+        <ul class="info_left">
+          <li class="name">
+            <label>姓名:</label>
+          </li>
+          <li class="card">
+            <label>门诊号:</label>
+          </li>
+          <li class="age">
+            <label>年龄:</label>
+          </li>
+          <li>
+            <label>医生:</label>
+          </li>
+          <li class="sex">
+            <label>性别:</label>
+          </li>
+          <li>
+            <label>科室:</label>
+          </li>
+          <li class="cards">
+            <label>卡号:</label>
+          </li>
+          <li>
+            <label>就诊时间:</label>
+          </li>
+        </ul>
+        <p class="scaletitle"></p>
         <div class="infos-box"></div>
       </div>
     </div>

+ 34 - 4
src/html/staticInfo.html

@@ -3,6 +3,7 @@
 
 <head>
   <meta charset="utf-8">
+  <!-- <link href="../css/print.css" media="print" rel="stylesheet" /> -->
   <style>
 
   </style>
@@ -31,7 +32,7 @@
       <div class="anchors">
         <div class="a-circle"></div>
         <ul></ul>
-        <div class="a-circle"></div>
+        <div class="a-circle a-circle-2"></div>
       </div>
     </div>
   </div>
@@ -41,7 +42,7 @@
       <div class="anchors">
         <div class="a-circle"></div>
         <ul></ul>
-        <div class="a-circle"></div>
+        <div class="a-circle a-circle-2"></div>
       </div>
     </div>
   </div>
@@ -52,21 +53,50 @@
       <div class="anchors">
         <div class="a-circle"></div>
         <ul></ul>
-        <div class="a-circle"></div>
+        <div class="a-circle a-circle-2"></div>
       </div>
     </div>
   </div>
   <div class=" container disCopy scale">
     <div class="content">
+
       <div class="infos" id="Print">
+        <ul class="info_left">
+          <li class="name">
+            <label>姓名:</label>
+          </li>
+          <li class="card">
+            <label>门诊号:</label>
+          </li>
+          <li class="age">
+            <label>年龄:</label>
+          </li>
+          <li>
+            <label>医生:</label>
+          </li>
+          <li class="sex">
+            <label>性别:</label>
+          </li>
+          <li>
+            <label>科室:</label>
+          </li>
+          <li class="cards">
+            <label>卡号:</label>
+          </li>
+          <li>
+            <label>就诊时间:</label>
+          </li>
+        </ul>
+        <p class="scaletitle"></p>
         <div class="infos-box"></div>
       </div>
+
     </div>
   </div>
   <!--<div class="btmFix"></div>-->
 </body>
 
- 
+
 
 
 </html>

二進制
src/images/icon-circular.png


二進制
src/images/icon-circular2.png


+ 14 - 8
src/js/cdss.js

@@ -365,6 +365,7 @@ function renderPushWarning(){
       $(titleStr('warning')).insertBefore('.tips-cont .moduleItem:first-child')
       popNum = billMsgList.length+highRiskList.length+criticalValList.length+otherList.length;
       // renderBillingPush(dubugStr,'注意调试信息')
+     
     }
     if(hasCompleteTnterface === allInterface){
       $('.loading').css("display","none")
@@ -507,9 +508,10 @@ function renderScale(list,showNum,type,hasInfo){
     $('.moduleItem.evaluation').append(titleStr("scalePush"))
     let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
     $('.moduleItem.evaluation').append(shortStr).append(longStr)
-    $('.moduleItem.evaluation').css("display","block")
-    $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
-    $('.moduleItem.evaluation').children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    $('.moduleItem.evaluation').css("display", "block")
+    // $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    // $('.moduleItem.evaluation').children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+
   }
 }
 
@@ -561,8 +563,8 @@ function rendergeneraTreatPush(list){
     $(".moduleItem.general").css("display","block")
     let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
     if(generaTreatHei > 50){
-      $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat"><img class="iconArrowImg more" src="${iconArrowDown}"></span>`)
-      $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat"><img class="iconArrowImg" src="${iconArrowUp}"></span>`)
+      $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多<img class="iconArrowImg more" src="${iconArrowDown}"></span>`)
+      $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
       bindGeneralSlide()
     }
   }
@@ -618,8 +620,12 @@ function renderItemWrapper(list, showNum, type, hasInfo) {
   }
 }
 
-function renderPushItem(item,type){
-    str= `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${type==8?('【'+item.name+'】'):item.name}</span>${item.hasInfo=="1"?`<img class="infoImg" src="${infoImg}">`:""}</span>`
+function renderPushItem(item, type) {
+
+  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${type}">`
+  str += `${item.hasScale == "0" ? `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
+  str += `${ item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : "" }`
+  str += '</span >'
   return str
 }
 
@@ -680,7 +686,7 @@ function renderTab(tabList){
       if(tabList[i].status == '1'){
         tabStr += `<li class="tab" data-name="${tabList[i].code}" ><span>${tabList[i].name}</span></li>`
       }
-      
+
     }
     tabStr += `</ul><div class="numPop"></div>`;
     $(".tabList").append(tabStr)

+ 6 - 3
src/js/cdssHorizontal.js

@@ -351,8 +351,8 @@ function renderScale(list, showNum, type, hasInfo) {
     $('.moduleItem.evaluation').append(shortStr)
     $('.moduleItem.evaluation').append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
     $('.moduleItem.evaluation').css("display", "block")
-    $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
-    $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    // $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    // $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
   }
 }
 
@@ -594,7 +594,10 @@ function renderItemWrapper(list, showNum, type, hasInfo) {
   }
 }
 function renderPushItem(item, type) {
-  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}</span>`
+  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${type}">`
+  str += `${item.hasScale == "0" ? `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
+  str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
+  str += '</span >'
   return str
 }
 function bindOpenInfo() {

+ 127 - 85
src/js/informationOut.js

@@ -1,12 +1,13 @@
-if(!Promise){
+if (!Promise) {
   var Promise = require("bluebird");
-// Configure
+  // Configure
   Promise.config({
     longStackTraces: true,
     warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
   })
 }
 require('../css/informationOut.less')
+require('../css/informationOut.css')
 const {
   post,
   throttle,
@@ -17,12 +18,11 @@ const {
   Toast
 } = require('./promise.js');
 const $ = require("jquery");
-require("./jquery-migrate");
-const jqprint = require("../js/jquery.PrintArea")
+const print = require("../js/jQuery.print")
 let printing = require('./../images/printing.png');
 let printing2 = require('./../images/printing2.png');
 let hel = require('./../images/icon-hel.png');
-let showName, noticeName, clinicalPathwayName, showLis = [], selectedDrop = 0, selectedTab = 0, isclick
+let showName, noticeName, clinicalPathwayName, showLis = [], selectedDrop = 0, selectedTab = 0, isclick, num, top = 0
 
 //如果是子窗口,隐藏网页查看按钮
 function myBrowser() {
@@ -50,7 +50,7 @@ function getInfomation() {
     "hospitalId": getUrlArgObject('hospitalId'),
     "hisName": getUrlArgObject('hisName'),
     "hisDetailName": getUrlArgObject('hisDetailName'),
-    "contentTypes":[1,2,3]
+    "contentTypes": [1, 2, 3]
   };
   //showName = param.hisName;
   // if (param.type == 5 || param.type == 51) {
@@ -59,12 +59,12 @@ function getInfomation() {
   // }
 
   post(config.getStaticKnowledgeForHIS, param).then((res) => {
-    if(res.data.code==='0'){
+    if (res.data.code === '0') {
       const data = res.data.data
       var str = '';
       var anchors = '';
-      let sName ='';
-      if (!data||data.length===0) {
+      let sName = '';
+      if (!data || data.length === 0) {
         showEmpty();
         return;
       }
@@ -78,7 +78,7 @@ function getInfomation() {
       $(".showWhichSelect").html(sName).attr("title", sName)
       showName = data[selectedDrop].name + "(" + data[selectedDrop].hisName + ")";
       showInfoSelect()
-      showInfo(data[selectedDrop],1)
+      showInfo(data[selectedDrop], 1)
       renderTitleShow();
       $('.content img').bind('contextmenu', function () {
         return false
@@ -94,7 +94,7 @@ function showEmpty() {
   $(".tabBox").html(str).css("border-bottom", "none");
   $("body").css('background', '#fff');
 }
-function showInfo(data,type) {
+function showInfo(data, type) {
   var detailList = data.details
   var scale = data.scale
   var staticKnowList = detailList['静态知识']
@@ -109,22 +109,22 @@ function showInfo(data,type) {
   //   "borderBottom": "4px solid  #E9E9E9",
   //   "padding": "0px 60px 50px 0px"
   // });
-  if(type == 1){
-    renderTab(detailList, scale)
-  }
-  staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
-  noticeInfo&&renderContent(noticeInfo,'notice')
-  clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
+  renderTab(detailList, scale)
+  staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
+  noticeInfo && renderContent(noticeInfo, 'notice')
+  clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
   scaleInfo && renderContentscale(scaleInfo, 'scale', name)
 }
-function showInfoSelect(){
-  $('.showWhich li').click(function(){
+function showInfoSelect() {
+  $('.showWhich li').click(function () {
     let idx = $(this).attr('data-idx')
     let name = $(this).html(), str = ''
     selectedDrop = idx;
     selectedTab = 0;
     showName = showLis[idx].name + "(" + showLis[idx].hisName + ")";
-    showInfo(showLis[idx],2)
+    num = $(".activeTab").attr('data-num')
+    
+    showInfo(showLis[idx], 2)
     $('.content .infos').scrollTop(0)
     $(".showWhich ul").css("display", "none")
     $(".showWhichSelect").html(name).attr("title", name)
@@ -142,6 +142,8 @@ function renderTitleShow() {
   document.title = showName;
   // $(".titleCont .title").html($(".tabList .tab:eq(" + selectedTab + ")").attr("data-title"));
   $(".titleCont .title").html($(".showWhich .showWhichSelect").attr("title"));
+  
+
 }
 function renderContent(list, contentWrapClassName) {
   $(`.${contentWrapClassName} .infos`).html('');
@@ -186,10 +188,17 @@ function renderContent(list, contentWrapClassName) {
 
 function renderContentscale(list, contentWrapClassName, name) {
   $(`.${contentWrapClassName} .infos .infos-box`).html('');
+  $(`.${contentWrapClassName} .anchors ul`).html('');
   var pushInfo = []
   var textType = []
+  var constant = 0
+  $('.scaletitle').html(name);
   for (var i = 0; i < list[0].detailList.length; i++) {
     var item = list[0].detailList[i];
+    textType.push(item.textType)
+    if (item.resultType == 1) {
+      constant += parseFloat(item.constant)
+    }
     if (item.textType == 11) {
       item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
       str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
@@ -217,15 +226,15 @@ function renderContentscale(list, contentWrapClassName, name) {
             its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
             str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
             if (it.selectType == 21 && item.resultType == 1) {
-              str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
+              str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '" resultType="' + item.resultType + '"/>'
             } else if (it.selectType == 22 && item.resultType == 1) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '" resultType="' + item.resultType + '"/>'
             } else if (it.selectType == 21 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
             } else if (it.selectType == 22 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
             }
-            str += its.content
+            str += '<span class="inp">' + its.content + '</span>'
             if (item.resultType == 1) {
               str += '<span class="num">(' + its.score + ')</span>'
             }
@@ -250,7 +259,7 @@ function renderContentscale(list, contentWrapClassName, name) {
           var it = items.detailList[k];
           it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
           str = '<div class="contentList" data-id="' + it.parentId + '-' + it.groupNum + '"><div class="item-list">';
-          str += '<p class="item-title">' + it.content + '</p>'
+          str += it.content
           str += '<div class="item-content" data-id="' + it.id + '">'
           str += '</div></div></div>'
           $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
@@ -272,11 +281,9 @@ function renderContentscale(list, contentWrapClassName, name) {
   str = '<div class="scalebot">'
   str += '<button class="but">结果</button><p class="score"></p>'
   str += '</div>'
-  str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><span>结果:</span></div><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>`
+  str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><p id="result_title" class="result_title"></p></div><textarea id="inputs"></textarea></div></div>`
   str += `<div class="foot"><div class="foot_box"><div class="printing"><img src="./../images/printing.png" class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
   $(`.${contentWrapClassName} .infos .infos-box`).append(str);
-  // str = `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
-  // $(`.${contentWrapClassName} .infos`).after(str);
   function addScrollEvent() {
     var scrollTop = $(`.${contentWrapClassName} .infos .infos-box`).scrollTop()
     var divHeight = 0;
@@ -290,34 +297,24 @@ function renderContentscale(list, contentWrapClassName, name) {
     }
   }
   $(`.${contentWrapClassName} .infos .infos-box`).scroll(throttle(addScrollEvent, 200));
-  var mb = myBrowser();
-  if ("IE" == mb) {
-    $('.result_left').css({
-      'position': 'relative', //高度自动
-    })
-    $('.result_title').css({
-      'margin-left': '0', //高度自动
-    })
-  }
   addLinkClickEvent(contentWrapClassName);
   adjustHeight();
   adjustWidth()
   getcheck()
-  getResult(pushInfo, textType)
+  getResult(pushInfo, textType, constant)
   copy(name)
   getprinting()
 
 }
-
 function getprinting() {
   $('.printing').click(function () {
     $('.foot').hide()
-    // $('.hel').hide()
+    $('.scalebot').hide()
     $('#Print').css({
       'height': 'auto', //高度自动
-    }).jqprint();
+    }).print();
     $('.foot').show()
-    // $('.hel').show()
+    $('.scalebot').show()
     $('#Print').css({
       'height': '100%', //高度自动
     });
@@ -332,7 +329,8 @@ function getcheck() {
     if ($radio.data('waschecked') == true) {
       $radio.prop('checked', false);
       $("input:radio[name='" + domName + "']").data('waschecked', false);
-      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
       if (isclick) {
         getchecks()
         $(".score").html('');
@@ -345,6 +343,8 @@ function getcheck() {
       $("input:radio[name='" + domName + "']").data('waschecked', false);
       $radio.data('waschecked', true);
       $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#C7C7C7");
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#C7C7C7");
       if (isclick) {
         getchecks()
         $(".score").html('');
@@ -361,6 +361,8 @@ function getcheck() {
     $radio.parents('.contentList').each(function (i) {
       if ($(this).find('input[type="checkbox"]:checked').val() == undefined) {
         $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
         if (isclick) {
           getchecks()
           $(".score").html('');
@@ -370,6 +372,8 @@ function getcheck() {
         }
       } else {
         $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#C7C7C7");
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#C7C7C7");
         if (isclick) {
           getchecks()
           $(".score").html('');
@@ -386,12 +390,11 @@ function copy(name) {
   $(".copy").click(function () {
     var texts = document.getElementById("result_title").innerText;
     if (texts == '') {
-      Toast('结果为空,无法复制', 500, 'warn')
+      Toast('温馨提示:结果为空,无法复制', 500, 'warn')
       return
     }
     var inputs = document.getElementById("inputs");
-    inputs.value = name + '结果为:' + texts; // 修改文本框的内容(赋值内容)
-    console.log(inputs.value)
+    inputs.value = name + '结果为:' + texts.substring(3); // 修改文本框的内容(赋值内容)
     inputs.select(); // 选中文本
     document.execCommand("copy"); // 执行浏览器复制命令
     Toast('复制成功', 500, 'success')
@@ -412,7 +415,10 @@ function getchecks() {
     }
   });
 }
-function getResult(pushInfo, textType) {
+$('#Print').on('scroll', function () {
+  top = $('#Print').scrollTop()
+})
+function getResult(pushInfo, textType, constant) {
   $(".but").click(function () {
     let arr = [];
     let multarr = []
@@ -422,7 +428,15 @@ function getResult(pushInfo, textType) {
     let key = false
     let proposal = ''
     let proposals = []
+    let scrollTop = []
+    let v
+    let numType = false
     isclick = true
+    for (var i = 0; i < textType.length; i++) {
+      if (textType[i] == 13) {
+        numType = true
+      }
+    }
     $(".contentList").each(function (i) {
       if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
         $(this).find(".item-title").addClass('chColor');
@@ -434,10 +448,21 @@ function getResult(pushInfo, textType) {
       } else {
         $(this).find(".item-titles").removeClass('chColor');
       }
+      scrollTop.push($(this).eq(0).find(".chColor").offset())
     });
+
+    for (var i = 0; i < scrollTop.length; i++) {
+      if (scrollTop[i] != undefined) {
+        v = scrollTop[i]
+        break
+      }
+    }
+    if (v) {
+      $(`.scale .infos`).scrollTop(v.top + top - 160)
+    }
     if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
       $('input[type="radio"]:checked').each(function () {
-        if (!isNaN($(this).val())) {
+        if ($(this).attr("resultType") == 1) {
           num += parseFloat($(this).val())
         } else {
           arr.push($(this).attr("data_obj"))
@@ -445,53 +470,62 @@ function getResult(pushInfo, textType) {
         }
       });
       $('input[type="checkbox"]:checkbox:checked').each(function () {
-        if (!isNaN($(this).val())) {
+        if ($(this).attr("resultType") == 1) {
           num += parseFloat($(this).val())
         } else {
           arr.push($(this).attr("data_obj"))
           proposals.push($(this).attr("proposal"))
         }
       });
+      num = num + constant
+      num = parseFloat(num).toFixed(2)
       tmp = arr.join(";");
       if (pushInfo.length > 0) {
         for (var i = 0; i < pushInfo.length; i++) {
           if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && !tmp) {
             result = pushInfo[i].result + '(' + num + '分' + ')'
-            proposal = pushInfo[i].pushInfo
+            if (proposals.join(";")) {
+              proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
+            } else {
+              proposal = pushInfo[i].pushInfo
+            }
             break
           } else if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && tmp) {
-            result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
-            proposal = pushInfo[i].pushInfo
+            result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
+            if (proposals.join(";")) {
+              proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
+            } else {
+              proposal = pushInfo[i].pushInfo
+            }
             break
           } else {
             result = tmp
+            proposal = proposals.join(";");
           }
         }
       } else {
         result = tmp
         proposal = proposals.join(";");
       }
-
-      if (result == undefined) {
-        if ($.inArray(13, textType) > 0) {
-          $(".score").html('总分:' + num + '分');
-        }
-        $(".score").css('display', 'block')
-        $(".copy").css('display', 'none')
-        $(".foot").css('display', 'block')
-      } else {
+      if (result) {
         $(".hel").attr({
           "title": proposal
         });
-
-        $(".result_title").html(result);
-        if ($.inArray(13, textType) > 0) {
+        $(".result_title").html('结果:' + result);
+        if (num >= 0 && numType) {
           $(".score").html('总分:' + num + '分');
         }
         $(".result").css('display', 'block')
         $(".score").css('display', 'block')
         $(".copy").css('display', 'block')
         $(".foot").css('display', 'block')
+      } else {
+        if (num >= 0 && numType) {
+          $(".score").html('总分:' + num + '分');
+        }
+        $(".score").css('display', 'block')
+        $(".copy").css('display', 'none')
+        $(".foot").css('display', 'block')
       }
     } else {
       Toast('温馨提示:必填选项不能为空~', 500, 'warn')
@@ -520,48 +554,55 @@ function addLinkClickEvent(contentWrapClassName) {
 }
 
 function renderTab(detailList, scale) {
+  $(".tabList").html('')
+  $(".container").css("display", "none")
   if (detailList['静态知识']) {
-    $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
+    $(".tabList").append(`<span class="tab" data-num="1" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
   }
   if (detailList['临床路径']) {
-    $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="` + clinicalPathwayName + `">临床路径</span>`)
+    $(".tabList").append(`<span class="tab" data-num="2" data-module="clinicalPathway" data-title="` + clinicalPathwayName + `">临床路径</span>`)
     //$(".tabBox .title").html(clinicalPathwayName);
   }
   if (detailList['注意事项']) {
-    $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
+    $(".tabList").append(`<span class="tab" data-num="2" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
-  if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
-    $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
+  if (!!scale && getUrlArgObject('type') == 8) {
+    $(".tabList").append(`<span class="tab" data-num="2" data-module="scale" data-title="` + showName + `">评估内容</span>`)
     //$(".tabBox .title").html(noticeName);
   }
   let defaultModuleName
-  if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || getUrlArgObject('scale') == 'scale') {
+  if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || (getUrlArgObject('scale') && getUrlArgObject('scale') != 'staticKnowledge' && detailList['静态知识']) || num == 2) {
+    console.log(1)
     $(".tabList .tab").eq(1).addClass("activeTab")
     defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
   } else {
     $(".tabList .tab").eq(0).addClass("activeTab")
     defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
   }
-  if (detailList['静态知识'] == undefined) {
-    $(".tabList .tab").eq(0).removeClass("activeTab")
+  if ($('.tabList').children('.tab').length == 1) {
+    $(".tabList .tab").eq(0).addClass("activeTab")
+    defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
   }
   $(`.${defaultModuleName}`).css("display", "block")
   bindTabClick()
 }
-function bindTabClick(){
-  $(".tabList .tab").on("click", function(){
+function bindTabClick() {
+  $(".tabList .tab").on("click", function () {
+    if ($('.tabList').children('.tab').length == 1) {
+      return
+    }
     const moduleName = $(this).attr("data-module")
-    //const display = $(`.${moduleName}`).css("display")
-      selectedTab=$('.tabList .tab').index(this);
-      $(".titleCont .title").html($(this).attr('data-title'));
-    //if(display == "none"){
+    const display = $(`.${moduleName}`).css("display")
+    selectedTab = $('.tabList .tab').index(this);
+    // $(".titleCont .title").html($(this).attr('data-title'));
+    if (display == "none") {
       $(".activeTab").removeClass("activeTab")
       $(this).addClass("activeTab")
-      $(".container").css("display","none")
-      $(`.${moduleName}`).css("display","block")
+      $(".container").css("display", "none")
+      $(`.${moduleName}`).css("display", "block")
       $(`.${moduleName} .infos`).scrollTop(0)
-    //}
+    }
   })
   $("#openWin").on("click", function () {
     const type = getUrlArgObject('type');
@@ -569,6 +610,7 @@ function bindTabClick(){
     const hisName = getUrlArgObject('hisName');
     const hisDetailName = getUrlArgObject('hisDetailName');
     const scale = $('.activeTab').attr('data-module')
+    console.log(scale)
     openNewWin("informationOut.html?hospitalId=" + encodeURIComponent(hospitalId) + "&hisName=" + encodeURIComponent(hisName) + "&hisDetailName=" + encodeURIComponent(hisDetailName || '') + "&type=" + encodeURIComponent(type) + "&d=" + selectedDrop + "&t=" + selectedTab + "&scale=" + scale);
   })
 }
@@ -581,10 +623,10 @@ function adjustHeight() {
 }
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;
-  $(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
-  $(".content .infos").width(wt - 243 + 'px');
+  // $(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
+  $(".content .infos").width(wt - 155 - 33 - 17 - 40 - 15 + 'px');
 }
-$(window).on('resize', function(){
+$(window).on('resize', function () {
   adjustHeight()
   adjustWidth()
 })

+ 237 - 0
src/js/jQuery.print.js

@@ -0,0 +1,237 @@
+/* @license 
+ * jQuery.print, version 1.3.2
+ *  (c) Sathvik Ponangi, Doers' Guild
+ * Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
+ *--------------------------------------------------------------------------*/
+const $ = require("jquery");
+(function ($) {
+    "use strict";
+    // A nice closure for our definitions
+    function getjQueryObject(string) {
+        // Make string a vaild jQuery thing
+        var jqObj = $("");
+        try {
+            jqObj = $(string)
+                .clone();
+        } catch (e) {
+            jqObj = $("<span />")
+                .html(string);
+        }
+        return jqObj;
+    }
+
+    function printFrame(frameWindow) {
+        // Print the selected window/iframe
+        var def = $.Deferred();
+        try {
+            setTimeout(function () {
+                // Fix for IE : Allow it to render the iframe
+                frameWindow.focus();
+                try {
+                    // Fix for IE11 - printng the whole page instead of the iframe content
+                    if (!frameWindow.document.execCommand('print', false, null)) {
+                        // document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
+                        frameWindow.print();
+                    }
+                } catch (e) {
+                    frameWindow.print();
+                }
+                frameWindow.close();
+                def.resolve();
+            }, 250);
+        } catch (err) {
+            def.reject(err);
+        }
+        return def;
+    }
+
+    function printContentInNewWindow(content) {
+        // Open a new window and print selected content
+        var w = window.open();
+        w.document.write(content);
+        w.document.close();
+        return printFrame(w);
+    }
+
+    function isNode(o) {
+        /* http://stackoverflow.com/a/384380/937891 */
+        return !!(typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
+    }
+    $.print = $.fn.print = function () {
+        // Print a given set of elements
+        var options, $this, self = this;
+        // console.log("Printing", this, arguments);
+        if (self instanceof $) {
+            // Get the node if it is a jQuery object
+            self = self.get(0);
+        }
+        if (isNode(self)) {
+            // If `this` is a HTML element, i.e. for
+            // $(selector).print()
+            $this = $(self);
+            if (arguments.length > 0) {
+                options = arguments[0];
+            }
+        } else {
+            if (arguments.length > 0) {
+                // $.print(selector,options)
+                $this = $(arguments[0]);
+                if (isNode($this[0])) {
+                    if (arguments.length > 1) {
+                        options = arguments[1];
+                    }
+                } else {
+                    // $.print(options)
+                    options = arguments[0];
+                    $this = $("html");
+                }
+            } else {
+                // $.print()
+                $this = $("html");
+            }
+        }
+        // Default options
+        var defaults = {
+            globalStyles: true,
+            mediaPrint: false,
+            stylesheet: null,
+            noPrintSelector: ".no-print",
+            iframe: true,
+            append: null,
+            prepend: null,
+            manuallyCopyFormValues: true,
+            deferred: $.Deferred()
+        };
+        // Merge with user-options
+        options = $.extend({}, defaults, (options || {}));
+        var $styles = $("");
+        if (options.globalStyles) {
+            // Apply the stlyes from the current sheet to the printed page
+            $styles = $("style, link, meta, title");
+        } else if (options.mediaPrint) {
+            // Apply the media-print stylesheet
+            $styles = $("link[media=print]");
+        }
+        if (options.stylesheet) {
+            // Add a custom stylesheet if given
+            $styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet + '">'));
+        }
+        // Create a copy of the element to print
+        var copy = $this.clone();
+        // Wrap it in a span to get the HTML markup string
+        copy = $("<span/>")
+            .append(copy);
+        // Remove unwanted elements
+        copy.find(options.noPrintSelector)
+            .remove();
+        // Add in the styles
+        copy.append($styles.clone());
+        // Appedned content
+        copy.append(getjQueryObject(options.append));
+        // Prepended content
+        copy.prepend(getjQueryObject(options.prepend));
+        if (options.manuallyCopyFormValues) {
+            // Manually copy form values into the HTML for printing user-modified input fields
+            // http://stackoverflow.com/a/26707753
+            copy.find("input")
+                .each(function () {
+                    var $field = $(this);
+                    if ($field.is("[type='radio']") || $field.is("[type='checkbox']")) {
+                        if ($field.prop("checked")) {
+                            $field.attr("checked", "checked");
+                        }
+                    } else {
+                        $field.attr("value", $field.val());
+                    }
+                });
+            copy.find("select").each(function () {
+                var $field = $(this);
+                $field.find(":selected").attr("selected", "selected");
+            });
+            copy.find("textarea").each(function () {
+                // Fix for https://github.com/DoersGuild/jQuery.print/issues/18#issuecomment-96451589
+                var $field = $(this);
+                $field.text($field.val());
+            });
+        }
+        // Get the HTML markup string
+        var content = copy.html();
+        // Notify with generated markup & cloned elements - useful for logging, etc
+        try {
+            options.deferred.notify('generated_markup', content, copy);
+        } catch (err) {
+            console.warn('Error notifying deferred', err);
+        }
+        // Destroy the copy
+        copy.remove();
+        if (options.iframe) {
+            // Use an iframe for printing
+            try {
+                var $iframe = $(options.iframe + "");
+                var iframeCount = $iframe.length;
+                if (iframeCount === 0) {
+                    // Create a new iFrame if none is given
+                    $iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>')
+                        .prependTo('body')
+                        .css({
+                            "position": "absolute",
+                            "top": -999,
+                            "left": -999
+                        });
+                }
+                var w, wdoc;
+                w = $iframe.get(0);
+                w = w.contentWindow || w.contentDocument || w;
+                wdoc = w.document || w.contentDocument || w;
+                wdoc.open();
+                wdoc.write(content);
+                wdoc.close();
+                printFrame(w)
+                    .done(function () {
+                        // Success
+                        setTimeout(function () {
+                            // Wait for IE
+                            if (iframeCount === 0) {
+                                // Destroy the iframe if created here
+                                $iframe.remove();
+                            }
+                        }, 100);
+                    })
+                    .fail(function (err) {
+                        // Use the pop-up method if iframe fails for some reason
+                        console.error("Failed to print from iframe", err);
+                        printContentInNewWindow(content);
+                    })
+                    .always(function () {
+                        try {
+                            options.deferred.resolve();
+                        } catch (err) {
+                            console.warn('Error notifying deferred', err);
+                        }
+                    });
+            } catch (e) {
+                // Use the pop-up method if iframe fails for some reason
+                console.error("Failed to print from iframe", e.stack, e.message);
+                printContentInNewWindow(content)
+                    .always(function () {
+                        try {
+                            options.deferred.resolve();
+                        } catch (err) {
+                            console.warn('Error notifying deferred', err);
+                        }
+                    });
+            }
+        } else {
+            // Use a new window for printing
+            printContentInNewWindow(content)
+                .always(function () {
+                    try {
+                        options.deferred.resolve();
+                    } catch (err) {
+                        console.warn('Error notifying deferred', err);
+                    }
+                });
+        }
+        return this;
+    };
+})($);

文件差異過大導致無法顯示
+ 0 - 5
src/js/jquery-migrate.js


+ 0 - 71
src/js/jquery.PrintArea.js

@@ -1,71 +0,0 @@
-// -----------------------------------------------------------------------
-// Eros Fratini - eros@recoding.it
-// jqprint 0.3
-//
-// - 19/06/2009 - some new implementations, added Opera support
-// - 11/05/2009 - first sketch
-//
-// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
-// requires jQuery 1.3.x
-//
-// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
-//------------------------------------------------------------------------
-const $ = require("jquery");
-(function ($) {
-  var opt;
-
-  $.fn.jqprint = function (options) {
-    opt = $.extend({}, $.fn.jqprint.defaults, options);
-
-    var $element = (this instanceof $) ? this : $(this);
-
-    if (opt.operaSupport && $.browser.opera) {
-      var tab = window.open("", "jqPrint-preview");
-
-      tab.document.open();
-
-      var doc = tab.document;
-    }
-    else {
-      var $iframe = $("<iframe  />");
-
-      if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
-
-      $iframe.appendTo("body");
-      var doc = $iframe[0].contentWindow.document;
-    }
-
-    if (opt.importCSS) {
-      if ($("link[media=print]").length > 0) {
-        $("link[media=print]").each(function () {
-          doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
-        });
-      }
-      else {
-        $("link").each(function () {
-          doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
-        });
-      }
-    }
-
-    if (opt.printContainer) { doc.write($element.outer()); }
-    else { $element.each(function () { doc.write($(this).html()); }); }
-
-    doc.close();
-
-    (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
-    setTimeout(function () { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
-  }
-
-  $.fn.jqprint.defaults = {
-    debug: false,
-    importCSS: true,
-    printContainer: true,
-    operaSupport: true
-  };
-
-  // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
-  $.fn.outer = function () {
-    return $($('<div></div>').html(this.clone())).html();
-  }
-})($);

+ 5 - 3
src/js/promise.js

@@ -153,7 +153,7 @@ const newinConf = {
 const newWindowLocationTcm = `width=800, height=600, left=${newinConf.left}, top=${newinConf.top},resizable=yes, scrollbars=yes`
 const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top},resizable=yes, scrollbars=yes`
 const openNewWin = function (url, isTcm) {
-    window.open(url, newinConf.openMode, isTcm ? newWindowLocationTcm : newWindowLocation)
+  window.open(url, newinConf.openMode, isTcm ? newWindowLocationTcm : newWindowLocation)
 }
 
 //判断浏览器是否为Ie8
@@ -348,11 +348,13 @@ const Toast = function (msg, duration,type) {
   var m = document.createElement('div');
   if(type == 'warn'){
     m.innerHTML = '<div style="margin:auto"><img class="warn" style="margin-right:14px;float:left" src="./../images/icon-warning.png" /><span>'+msg+'</span></div>'
+    m.style.cssText = "margin:auto;width:250px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
   }else if(type == 'success'){
-    m.innerHTML = '<div style="margin:auto"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg +'</span></div>'
+    m.innerHTML = '<div style="margin:auto;width:120px"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg +'</span></div>'
+    m.style.cssText = "margin:auto;width:120px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
   }
   
-  m.style.cssText = "display:flex;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #333;font-size: 16px;";
+  
   $('.warn').css('margin-top','10px')
   document.body.appendChild(m);
   setTimeout(function () {

+ 80 - 56
src/js/staticInfo.js

@@ -7,7 +7,7 @@ if (!Promise) {
   })
 }
 require('../css/staticInfo.less')
-
+require('../css/print.css')
 const {
   post,
   throttle,
@@ -18,15 +18,13 @@ const {
   Toast
 } = require('./promise.js');
 const $ = require("jquery");
-require("./jquery-migrate");
-
-const jqprint = require("../js/jquery.PrintArea")
+const print = require("../js/jQuery.print")
 let printing = require('./../images/printing.png');
 let printing2 = require('./../images/printing2.png');
 let recommend = require('./../images/recommend.png');
 let hel = require('./../images/icon-hel.png');
 
-let showName, noticeName, clinicalPathwayName, isclick
+let showName, noticeName, clinicalPathwayName, isclick,top = 0
 function myBrowser() {
   var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
   var isOpera = userAgent.indexOf("Opera") > -1;
@@ -124,8 +122,14 @@ function renderContent(list, contentWrapClassName) {
 function renderContentscale(list, contentWrapClassName, name) {
   var pushInfo = []
   var textType = []
+  var constant = 0
+  $('.scaletitle').html(name);
   for (var i = 0; i < list[0].detailList.length; i++) {
     var item = list[0].detailList[i];
+    textType.push(item.textType)
+    if (item.resultType == 1) {
+      constant += parseFloat(item.constant)
+    }
     if (item.textType == 11) {
       item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
       str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
@@ -153,15 +157,15 @@ function renderContentscale(list, contentWrapClassName, name) {
             its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
             str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
             if (it.selectType == 21 && item.resultType == 1) {
-              str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
+              str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor)) + '" resultType="' + item.resultType + '"/>'
             } else if (it.selectType == 22 && item.resultType == 1) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor)) + '" resultType="' + item.resultType + '"/>'
             } else if (it.selectType == 21 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
             } else if (it.selectType == 22 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '"/>'
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
             }
-            str += its.content
+            str += '<span class="inp">' + its.content + '</span>'
             if (item.resultType == 1) {
               str += '<span class="num">(' + its.score + ')</span>'
             }
@@ -186,7 +190,7 @@ function renderContentscale(list, contentWrapClassName, name) {
           var it = items.detailList[k];
           it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
           str = '<div class="contentList" data-id="' + it.parentId + '-' + it.groupNum + '"><div class="item-list">';
-          str += '<p class="item-title">' + it.content + '</p>'
+          str += it.content
           str += '<div class="item-content" data-id="' + it.id + '">'
           str += '</div></div></div>'
           $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
@@ -208,11 +212,9 @@ function renderContentscale(list, contentWrapClassName, name) {
   str = '<div class="scalebot">'
   str += '<button class="but">结果</button><p class="score"></p>'
   str += '</div>'
-  str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><span>结果:</span></div><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>`
+  str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><p id="result_title" class="result_title"></p></div><textarea id="inputs"></textarea></div></div>`
   str += `<div class="foot"><div class="foot_box"><div class="printing"><img src="./../images/printing.png" class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
   $(`.${contentWrapClassName} .infos .infos-box`).append(str);
-  // str = `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
-  // $(`.${contentWrapClassName} .infos`).after(str);
   function addScrollEvent() {
     var scrollTop = $(`.${contentWrapClassName} .infos .infos-box`).scrollTop()
     var divHeight = 0;
@@ -226,34 +228,23 @@ function renderContentscale(list, contentWrapClassName, name) {
     }
   }
   $(`.${contentWrapClassName} .infos .infos-box`).scroll(throttle(addScrollEvent, 200));
-  var mb = myBrowser();
-  if ("IE" == mb) {
-    $('.result_left').css({
-      'position': 'relative', //高度自动
-    })
-    $('.result_title').css({
-      'margin-left': '0', //高度自动
-    })
-  }
   addLinkClickEvent(contentWrapClassName);
   adjustHeight();
   adjustWidth()
   getcheck()
-  getResult(pushInfo, textType)
+  getResult(pushInfo, textType, constant)
   copy(name)
   getprinting()
-
 }
-
 function getprinting() {
   $('.printing').click(function () {
     $('.foot').hide()
-    // $('.hel').hide()
+    $('.scalebot').hide()
     $('#Print').css({
       'height': 'auto', //高度自动
-    }).jqprint();
+    }).print()
     $('.foot').show()
-    // $('.hel').show()
+    $('.scalebot').show()
     $('#Print').css({
       'height': '100%', //高度自动
     });
@@ -269,6 +260,8 @@ function getcheck() {
       $radio.prop('checked', false);
       $("input:radio[name='" + domName + "']").data('waschecked', false);
       $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
       if (isclick) {
         getchecks()
         $(".score").html('');
@@ -281,6 +274,8 @@ function getcheck() {
       $("input:radio[name='" + domName + "']").data('waschecked', false);
       $radio.data('waschecked', true);
       $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#C7C7C7");
+      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#C7C7C7");
       if (isclick) {
         getchecks()
         $(".score").html('');
@@ -297,6 +292,8 @@ function getcheck() {
     $radio.parents('.contentList').each(function (i) {
       if ($(this).find('input[type="checkbox"]:checked').val() == undefined) {
         $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
         if (isclick) {
           getchecks()
           $(".score").html('');
@@ -306,6 +303,8 @@ function getcheck() {
         }
       } else {
         $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#C7C7C7");
+        $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#C7C7C7");
         if (isclick) {
           getchecks()
           $(".score").html('');
@@ -317,17 +316,18 @@ function getcheck() {
     })
   });
 }
-
+$('#Print').on('scroll', function () {
+  top = $('#Print').scrollTop()
+})
 function copy(name) {
   $(".copy").click(function () {
     var texts = document.getElementById("result_title").innerText;
     if (texts == '') {
-      Toast('结果为空,无法复制', 500, 'warn')
+      Toast('温馨提示:结果为空,无法复制', 500, 'warn')
       return
     }
     var inputs = document.getElementById("inputs");
-    inputs.value = name + '结果为:' + texts; // 修改文本框的内容(赋值内容)
-    console.log(inputs.value)
+    inputs.value = name + '结果为:' + texts.substring(3); // 修改文本框的内容(赋值内容)
     inputs.select(); // 选中文本
     document.execCommand("copy"); // 执行浏览器复制命令
     Toast('复制成功', 500, 'success')
@@ -348,7 +348,7 @@ function getchecks() {
     }
   });
 }
-function getResult(pushInfo, textType) {
+function getResult(pushInfo, textType, constant) {
   $(".but").click(function () {
     let arr = [];
     let multarr = []
@@ -358,7 +358,15 @@ function getResult(pushInfo, textType) {
     let key = false
     let proposal = ''
     let proposals = []
+    let scrollTop = []
+    let v
+    let numType = false
     isclick = true
+    for (var i = 0; i < textType.length; i++) {
+      if (textType[i] == 13) {
+        numType = true
+      }
+    }
     $(".contentList").each(function (i) {
       if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
         $(this).find(".item-title").addClass('chColor');
@@ -370,10 +378,20 @@ function getResult(pushInfo, textType) {
       } else {
         $(this).find(".item-titles").removeClass('chColor');
       }
+      scrollTop.push($(this).eq(0).find(".chColor").offset())
     });
+    for (var i = 0; i < scrollTop.length; i++) {
+      if (scrollTop[i] != undefined) {
+        v = scrollTop[i]
+        break
+      }
+    }
+    if (v) {
+      $(`.scale .infos`).scrollTop(v.top + top-160)
+    }
     if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
       $('input[type="radio"]:checked').each(function () {
-        if (!isNaN($(this).val())) {
+        if ($(this).attr("resultType") == 1) {
           num += parseFloat($(this).val())
         } else {
           arr.push($(this).attr("data_obj"))
@@ -381,53 +399,62 @@ function getResult(pushInfo, textType) {
         }
       });
       $('input[type="checkbox"]:checkbox:checked').each(function () {
-        if (!isNaN($(this).val())) {
+        if ($(this).attr("resultType") == 1) {
           num += parseFloat($(this).val())
         } else {
           arr.push($(this).attr("data_obj"))
           proposals.push($(this).attr("proposal"))
         }
       });
+      num = num + constant
+      num = parseFloat(num).toFixed(2)
       tmp = arr.join(";");
       if (pushInfo.length > 0) {
         for (var i = 0; i < pushInfo.length; i++) {
           if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && !tmp) {
             result = pushInfo[i].result + '(' + num + '分' + ')'
-            proposal = pushInfo[i].pushInfo
+            if (proposals.join(";")) {
+              proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
+            } else {
+              proposal = pushInfo[i].pushInfo
+            }
             break
           } else if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && tmp) {
-            result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
-            proposal = pushInfo[i].pushInfo
+            result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
+            if (proposals.join(";")) {
+              proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
+            } else {
+              proposal = pushInfo[i].pushInfo
+            }
             break
           } else {
             result = tmp
+            proposal = proposals.join(";");
           }
         }
       } else {
         result = tmp
         proposal = proposals.join(";");
       }
-
-      if (result == undefined) {
-        if ($.inArray(13, textType) > 0) {
-          $(".score").html('总分:' + num + '分');
-        }
-        $(".score").css('display', 'block')
-        $(".copy").css('display', 'none')
-        $(".foot").css('display', 'block')
-      } else {
+      if (result) {
         $(".hel").attr({
           "title": proposal
         });
-
-        $(".result_title").html(result);
-        if ($.inArray(13, textType) > 0) {
+        $(".result_title").html('结果:' + result);
+        if (num >= 0 && numType) {
           $(".score").html('总分:' + num + '分');
         }
         $(".result").css('display', 'block')
         $(".score").css('display', 'block')
         $(".copy").css('display', 'block')
         $(".foot").css('display', 'block')
+      } else {
+        if (num >= 0 && numType) {
+          $(".score").html('总分:' + num + '分');
+        }
+        $(".score").css('display', 'block')
+        $(".copy").css('display', 'none')
+        $(".foot").css('display', 'block')
       }
     } else {
       Toast('温馨提示:必填选项不能为空~', 500, 'warn')
@@ -466,7 +493,7 @@ function renderTab(detailList, scale) {
     $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
-  if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
+  if (!!scale && getUrlArgObject('type') == 8) {
     $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
     //$(".tabBox .title").html(noticeName);
   }
@@ -478,9 +505,6 @@ function renderTab(detailList, scale) {
     $(".tabList .tab").eq(0).addClass("activeTab")
     defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
   }
-  if (detailList['静态知识'] == undefined){
-    $(".tabList .tab").eq(0).removeClass("activeTab")
-  }
   $(`.${defaultModuleName}`).css("display", "block")
   bindTabClick()
 }
@@ -514,7 +538,7 @@ function adjustHeight() {
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;
   $(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
-  $(".content .infos").width(wt - 243 + 'px');
+  $(".content .infos").width(wt - 210 - 33 - 17 - 40 - 15 + 'px');
 }
 $(window).on('resize', function () {
   adjustHeight()

+ 0 - 2
src/js/staticInfoOut.js

@@ -16,8 +16,6 @@ const {
   openNewWin
 } = require('./promise.js');
 const $ = require("jquery");
-require("./jquery-migrate");
-const jqprint = require("../js/jquery.PrintArea")
 let printing = require('./../images/printing.png');
 let printing2 = require('./../images/printing2.png');
 let showName,noticeName,clinicalPathwayName,showLis=[],selectedDrop=0,selectedTab=0