wyq 3 роки тому
батько
коміт
3c54830cc9

+ 6 - 0
src/css/informationOut.less

@@ -607,4 +607,10 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   &:nth-child(odd) {
     border-left: none;
   }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
 }

+ 6 - 0
src/css/print.css

@@ -86,4 +86,10 @@
     margin-right: 9px;
     float: left;
   }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
 }

+ 6 - 0
src/css/staticInfo.less

@@ -544,4 +544,10 @@
   &:nth-child(odd) {
     border-left: none;
   }
+  .name,.card{
+    border-top: none;
+  }
+  .name,.age,.sex,.cards{
+    border-left: none;
+  }
 }

+ 27 - 0
src/html/informationOut.html

@@ -60,6 +60,33 @@
   <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>

+ 5 - 5
src/html/staticInfo.html

@@ -62,25 +62,25 @@
 
       <div class="infos" id="Print">
         <ul class="info_left">
-          <li>
+          <li class="name">
             <label>姓名:</label>
           </li>
-          <li>
+          <li class="card">
             <label>门诊号:</label>
           </li>
-          <li>
+          <li class="age">
             <label>年龄:</label>
           </li>
           <li>
             <label>医生:</label>
           </li>
-          <li>
+          <li class="sex">
             <label>性别:</label>
           </li>
           <li>
             <label>科室:</label>
           </li>
-          <li>
+          <li class="cards">
             <label>卡号:</label>
           </li>
           <li>

+ 29 - 14
src/js/informationOut.js

@@ -189,9 +189,15 @@ 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 +
@@ -294,7 +300,7 @@ function renderContentscale(list, contentWrapClassName, name) {
   adjustHeight();
   adjustWidth()
   getcheck()
-  getResult(pushInfo)
+  getResult(pushInfo, textType, constant)
   copy(name)
   getprinting()
 
@@ -408,7 +414,7 @@ function getchecks() {
     }
   });
 }
-function getResult(pushInfo) {
+function getResult(pushInfo, textType, constant) {
   $(".but").click(function () {
     let arr = [];
     let multarr = []
@@ -420,7 +426,13 @@ function getResult(pushInfo) {
     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,15 +446,15 @@ function getResult(pushInfo) {
       }
       scrollTop.push($(this).eq(0).find(".chColor").offset())
     });
+
     for (var i = 0; i < scrollTop.length; i++) {
       if (scrollTop[i] != undefined) {
         v = scrollTop[i]
         break
       }
     }
-    console.log(v)
     if (v) {
-      $(`.scale .infos`).scrollTop(v.top)
+      $(`.scale .infos`).scrollTop(v.top + 346)
     }
     if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
       $('input[type="radio"]:checked').each(function () {
@@ -489,25 +501,28 @@ function getResult(pushInfo) {
         result = tmp
         proposal = proposals.join(";");
       }
-      if (result == undefined) {
-        if (num > 0) {
-          $(".score").html('总分:' + num + '分');
-        }
-        $(".score").css('display', 'block')
-        $(".copy").css('display', 'none')
-        $(".foot").css('display', 'block')
-      } else {
+      console.log(constant)
+      // num = num+constant
+      console.log(num)
+      if (result) {
         $(".hel").attr({
           "title": proposal
         });
         $(".result_title").html('结果:' + result);
-        if (num > 0) {
+        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')
@@ -597,7 +612,7 @@ function bindTabClick() {
   })
 }
 function adjustHeight() {
-  const extHt = window.opener ? 60 : 0;
+  const extHt = window.opener?60:0;     //网页查看时隐藏页脚
   var ht = window.innerHeight || document.documentElement.clientHeight;
   $(".content").height(ht - 160 + "px");
   $(".content .infos").height(ht - 170 + "px");