瀏覽代碼

网页查看定位问题

wyq 3 年之前
父節點
當前提交
2728260233
共有 4 個文件被更改,包括 92 次插入42 次删除
  1. 32 25
      src/css/informationOut.less
  2. 0 5
      src/html/informationOut.html
  3. 30 8
      src/js/informationOut.js
  4. 30 4
      src/js/staticInfo.js

+ 32 - 25
src/css/informationOut.less

@@ -225,7 +225,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   border-radius: 0;
   border: none;
   background-color: #F5F6F7;
-  background: url('../images/icon_current.svg') center center no-repeat;
+  background: url('../images/icon_current.png') center center no-repeat;
   background-size: cover;
 }
   .disCopy {
@@ -440,10 +440,9 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   }
 }
 .scalebot{
-  display: flex;
-  align-items: center;
-  justify-content: flex-end;
   margin-bottom: 44px;
+  text-align: right;
+  overflow: hidden;
   .but{
     width: 94px;
     height: 34px;
@@ -454,6 +453,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
     font-weight: 400;
     color: #2A9BD5;
     margin-right: 9px;
+    float: right;
   }
   .score{
     font-size: 16px;
@@ -461,6 +461,8 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
     color: #333333;
     margin-right: 30px;
     display: none;
+    float: right;
+    line-height: 34px;
   }
 }
 .result{
@@ -473,45 +475,50 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   margin: 0 75px;
   text-align: center;
   .result_box{
-    display: flex;
-    justify-content: center;
     padding:25px 56px;
-    .hel{
-      width: 21px;
-      height: 21px;
-      background: #2C96E5;
-      border-radius: 50%;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      color: #fff;
-      margin-right: 9px;
-      font-size: 12px;
+    overflow: hidden;
+    position: relative;
+    .result_left{
+      display: inline-block;
+      position: absolute;
+      .hel{
+        background: #2C96E5;
+        border-radius: 50%;
+        color: #fff;
+        margin-right: 9px;
+        font-size: 12px;
+        vertical-align: middle;
+      }
+    }
+    .result_title{
+      max-width: 85%;
+      display: inline-block;
+      margin-left: 65px;
     }
   }
   
 }
-.result_title{
-  max-width: 85%;
-}
+
 .foot{
   margin-bottom: 20px;
   margin-top: 40px;
   display: none;
+  overflow: hidden;
   .foot_box{
-    display: flex;
-    justify-content: center;
+    width: 300px;
+    margin: auto;
     .printing{
-      display: flex;
-      align-items: center;
+      float: left;
       width: 94px;
       height: 32px;
       background: #FFFFFF;
       border-radius: 4px;
       border: 1px solid #333333;
       cursor: pointer;
+      line-height: 32px;
       & img{
         margin: 0 12px 0 14px;
+        vertical-align: middle;
       }
     }
     .printing:hover{
@@ -524,6 +531,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
       height: 32px;
       background: #FFFFFF;
       border-radius: 4px;
+      float: left;
       border: 1px solid #333333;
       text-align: center;
       line-height: 32px;
@@ -549,7 +557,6 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   .infos-box{
     border: 1px solid #E6E6E6;
     margin: 0 71px 20px 38px;
-    padding-top: 20px;
     .infoWrapper {
       padding: 0 75px;
     }

+ 0 - 5
src/html/informationOut.html

@@ -62,11 +62,6 @@
       <div class="infos" id="Print">
         <div class="infos-box"></div>
       </div>
-      <div class="anchors">
-        <div class="a-circle"></div>
-        <ul></ul>
-        <div class="a-circle"></div>
-      </div>
     </div>
   </div>
   <div class="footer">

+ 30 - 8
src/js/informationOut.js

@@ -1,6 +1,6 @@
-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
@@ -186,8 +186,6 @@ function renderContentscale(list, contentWrapClassName, name) {
   var textType = []
   for (var i = 0; i < list[0].detailList.length; i++) {
     var item = list[0].detailList[i];
-    console.log(item.resultType)
-    textType.push(item.textType)
     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 +
@@ -225,7 +223,7 @@ function renderContentscale(list, contentWrapClassName, name) {
             }
             str += its.content
             if (item.resultType == 1) {
-              str += '<span class="num">' + its.score + '</span>'
+              str += '<span class="num">(' + its.score + ')</span>'
             }
             str += '</label>'
             str += `${its.match == 1 ? `<img class="recommend" src="./../images/recommend.png" />` : ``}</div>`
@@ -234,6 +232,27 @@ function renderContentscale(list, contentWrapClassName, name) {
         }
       }
     }
+    if (item.textType == 12) {
+      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 +
+        '">'
+      str += item.content
+      str += '</h2></div>'
+      str = `<div class="infoWrapper">${str}</div>`
+      $(`.${contentWrapClassName} .infos .infos-box`).append(str);
+      for (var j = 0; j < item.subList.length; j++) {
+        var items = item.subList[j];
+        for (var k = 0; k < items.detailList.length; k++) {
+          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 += '<div class="item-content" data-id="' + it.id + '">'
+          str += '</div></div></div>'
+          $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
+        }
+      }
+    }
     if (item.textType == 13) {
       for (var m = 0; m < item.subList[0].detailList[0].subList[0].detailList.length; m++) {
         var itl = item.subList[0].detailList[0].subList[0].detailList[m]
@@ -513,7 +532,7 @@ function renderTab(detailList, scale) {
     //$(".tabBox .title").html(noticeName);
   }
   let defaultModuleName
-  if (getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) {
+  if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || getUrlArgObject('scale') == 'scale') {
     $(".tabList .tab").eq(1).addClass("activeTab")
     defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
   } else {
@@ -542,12 +561,15 @@ function bindTabClick() {
     const hospitalId = getUrlArgObject('hospitalId');
     const hisName = getUrlArgObject('hisName');
     const hisDetailName = getUrlArgObject('hisDetailName');
-    openNewWin("informationOut.html?hospitalId=" + encodeURIComponent(hospitalId) + "&hisName=" + encodeURIComponent(hisName) + "&hisDetailName=" + encodeURIComponent(hisDetailName || '') + "&type=" + encodeURIComponent(type) + "&d=" + selectedDrop + "&t=" + selectedTab & + "&gauge=gauge");
+    const scale = $('.activeTab').attr('data-module')
+    openNewWin("informationOut.html?hospitalId=" + encodeURIComponent(hospitalId) + "&hisName=" + encodeURIComponent(hisName) + "&hisDetailName=" + encodeURIComponent(hisDetailName || '') + "&type=" + encodeURIComponent(type) + "&d=" + selectedDrop + "&t=" + selectedTab + "&scale=" + scale);
   })
 }
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
-  $(".content,.content .infos").height(ht - 162 + "px");
+  $(".content").height(ht - 160 + "px");
+  $(".content .infos").height(ht - 170 + "px");
+  $(".content .anchors").height(ht - 217 + "px");
 }
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;

+ 30 - 4
src/js/staticInfo.js

@@ -126,8 +126,6 @@ function renderContentscale(list, contentWrapClassName, name) {
   var textType = []
   for (var i = 0; i < list[0].detailList.length; i++) {
     var item = list[0].detailList[i];
-    console.log(item.resultType)
-    textType.push(item.textType)
     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 +
@@ -165,7 +163,7 @@ function renderContentscale(list, contentWrapClassName, name) {
             }
             str += its.content
             if (item.resultType == 1) {
-              str += '<span class="num">' + its.score + '</span>'
+              str += '<span class="num">(' + its.score + ')</span>'
             }
             str += '</label>'
             str += `${its.match == 1 ? `<img class="recommend" src="./../images/recommend.png" />` : ``}</div>`
@@ -174,6 +172,27 @@ function renderContentscale(list, contentWrapClassName, name) {
         }
       }
     }
+    if (item.textType == 12) {
+      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 +
+        '">'
+      str += item.content
+      str += '</h2></div>'
+      str = `<div class="infoWrapper">${str}</div>`
+      $(`.${contentWrapClassName} .infos .infos-box`).append(str);
+      for (var j = 0; j < item.subList.length; j++) {
+        var items = item.subList[j];
+        for (var k = 0; k < items.detailList.length; k++) {
+          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 += '<div class="item-content" data-id="' + it.id + '">'
+          str += '</div></div></div>'
+          $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
+        }
+      }
+    }
     if (item.textType == 13) {
       for (var m = 0; m < item.subList[0].detailList[0].subList[0].detailList.length; m++) {
         var itl = item.subList[0].detailList[0].subList[0].detailList[m]
@@ -459,6 +478,11 @@ function renderTab(detailList, scale) {
     $(".tabList .tab").eq(0).addClass("activeTab")
     defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
   }
+  console.log(detailList['静态知识'])
+  if (!scale || detailList['静态知识'] == "undefined"){
+    console.log(1)
+    $(".tabList .tab").eq(0).removeClass("activeTab")
+  }
   $(`.${defaultModuleName}`).css("display", "block")
   bindTabClick()
 }
@@ -485,7 +509,9 @@ function bindTabClick() {
 }
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
-  $(".content,.content .infos").height(ht - 162 + "px");
+  $(".content").height(ht - 160 + "px");
+  $(".content .infos").height(ht - 170 + "px");
+  $(".content .anchors").height(ht - 217 + "px");
 }
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;