Bladeren bron

his页切换量表名字没改变问题

wyq 3 jaren geleden
bovenliggende
commit
2f8c416dac
2 gewijzigde bestanden met toevoegingen van 34 en 35 verwijderingen
  1. 10 9
      src/css/informationOut.less
  2. 24 26
      src/js/informationOut.js

+ 10 - 9
src/css/informationOut.less

@@ -78,8 +78,8 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   .infos {
     height: 100%;
     overflow-y: auto;
-    /*padding: 0 60px 0 0;*/
-    width: calc(100% - 195px);
+    /*padding: 0 60px 0 0;
+    width: calc(100% - 195px);*/
   }
 
   .infos>div {
@@ -180,9 +180,9 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   z-index: 1;
 }
 .anchors .a-circle:last-child{
-  position: unset;
+  position: initial;
   margin-left: 25px;
-  margin-top: -16px;
+  margin-top: 0;
 }
 .anchors i {
   position: absolute;
@@ -220,13 +220,13 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
 .anchors .active i {
   width: 18px;
   height: 9px;
-  top: 6px;
+  top: 10px;
   left: -10px;
   border-radius: 0;
   border: none;
   background-color: #F5F6F7;
   background: url('../images/icon_current.png') center center no-repeat;
-  background-size: cover;
+  background-size: 18px 9px;
 }
   .disCopy {
     -webkit-touch-callout: none;
@@ -343,8 +343,8 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   color: #3B9ED0;
   font-size: 14px;
   padding-left: 30px;
-  background: url("../images/link.png") 0 -2px no-repeat;
-  background-size: 25px 25px;
+  background: url("../images/link.png") 4px 0 no-repeat;
+  background-size: 23px 23px;
 }
 .footer{
   width: 100%;
@@ -493,7 +493,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
     .result_title{
       max-width: 85%;
       display: inline-block;
-      margin-left: 65px;
+      margin-left: 70px;
     }
   }
   
@@ -557,6 +557,7 @@ 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;
     }

+ 24 - 26
src/js/informationOut.js

@@ -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;
       }
@@ -110,23 +110,24 @@ function showInfo(data) {
   //   "padding": "0px 60px 50px 0px"
   // });
   renderTab(detailList, scale)
-  staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
-  noticeInfo && renderContent(noticeInfo, 'notice')
-  clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
+  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])
-    renderTitleShow();
+    
     $('.content .infos').scrollTop(0)
     $(".showWhich ul").css("display", "none")
     $(".showWhichSelect").html(name).attr("title", name)
+    renderTitleShow();
   })
   $(".showWhichSelect").click(function (e) {
     e.stopPropagation()
@@ -136,9 +137,9 @@ function showInfoSelect() {
     $(".showWhich ul").css("display", "none")
   })
 }
-function renderTitleShow() {
+function renderTitleShow(name) {
   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('');
@@ -542,18 +543,18 @@ function renderTab(detailList, scale) {
   $(`.${defaultModuleName}`).css("display", "block")
   bindTabClick()
 }
-function bindTabClick() {
-  $(".tabList .tab").on("click", function () {
+function bindTabClick(){
+  $(".tabList .tab").on("click", function(){
     const moduleName = $(this).attr("data-module")
     //const display = $(`.${moduleName}`).css("display")
-    selectedTab = $('.tabList .tab').index(this);
-    $(".titleCont .title").html($(this).attr('data-title'));
+      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")
-    $(`.${moduleName} .infos`).scrollTop(0)
+      $(".activeTab").removeClass("activeTab")
+      $(this).addClass("activeTab")
+      $(".container").css("display","none")
+      $(`.${moduleName}`).css("display","block")
+      $(`.${moduleName} .infos`).scrollTop(0)
     //}
   })
   $("#openWin").on("click", function () {
@@ -566,6 +567,7 @@ function bindTabClick() {
   })
 }
 function adjustHeight() {
+  const extHt = window.opener?60:0;
   var ht = window.innerHeight || document.documentElement.clientHeight;
   $(".content").height(ht - 160 + "px");
   $(".content .infos").height(ht - 170 + "px");
@@ -576,11 +578,7 @@ function adjustWidth() {
   $(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
   $(".content .infos").width(wt - 243 + 'px');
 }
-$(window).on('resize', function () {
-  adjustHeight()
-  adjustWidth()
-})
-$(window).on('resize', function () {
+$(window).on('resize', function(){
   adjustHeight()
   adjustWidth()
 })