瀏覽代碼

Merge branch 'referMasterNew' into his/zjhHospital

liuqq 4 年之前
父節點
當前提交
e3c46c28b0
共有 7 個文件被更改,包括 124 次插入52 次删除
  1. 28 11
      src/css/information.less
  2. 39 14
      src/css/informationOut.less
  3. 1 0
      src/html/information.html
  4. 1 0
      src/html/informationOut.html
  5. 二進制
      src/images/link.png
  6. 13 2
      src/js/information.js
  7. 42 25
      src/js/informationOut.js

+ 28 - 11
src/css/information.less

@@ -24,9 +24,9 @@
   }
 
   h1 {
-    margin: 0 0px 25px 0px !important;
-    font-size: 22px !important;
-    line-height: 37px;
+    margin: 0 0px 5px 0px !important;
+    font-size: 18px !important;
+    /*line-height: 37px;*/
     padding: 0 0 0 40px;
   }
 
@@ -36,7 +36,7 @@
     background: #fff;
     padding-right: 6px;
     font-weight: bold;
-    line-height: 30px;
+    /*line-height: 30px;*/
   }
 
   .content {
@@ -46,7 +46,7 @@
   .infoBox {
     border-left: 1px solid #969C9F;
     padding: 0 0 0 33px;
-    margin: 0 0 20px 0;
+    margin: 0 0 4px 0;
   }
   .infoWrapper {
     padding: 0 0 0 40px;
@@ -55,7 +55,7 @@
     position: absolute;
     z-index: 10;
     background: #fff;
-    left: -40px;
+    left: -38px;
     height: 32px;
     top: -1px;
   }
@@ -84,7 +84,7 @@
     position: relative;
     line-height: 24px;
     
-    margin: 0 0 13px;
+    margin: 0 0 4px;
   }
 
   .line {
@@ -96,7 +96,7 @@
     overflow: hidden;
     background: #fff;
     margin: 0 auto;
-    padding: 40px 0 30px 0px;
+    padding: 8px 0 30px 0px;
     display: none;
     position: relative;
     left: 0;
@@ -208,7 +208,7 @@
   .tabBox{
     position: relative;
     background: #fff;
-    height: 60px;
+    height: 38px;
     border-bottom: 1px solid #E6E6E6;
     padding: 0 40px;
   }
@@ -218,7 +218,7 @@
   }
   .tab{
     display: inline-block;
-    padding: 7px 18px;
+    padding: 4px 18px 5px;
     margin-right: 5px;
     background: #EEEEEE;
     border-radius:6px 6px 0px 0px;
@@ -235,4 +235,21 @@
   }
   .ql-align-center{
     text-align: center;
-  }
+  }
+.open-win{
+  position: absolute;
+  right: 15px;
+  bottom: 8px;
+  cursor: pointer;
+  color: #3B9ED0;
+  font-size: 14px;
+  padding-left: 30px;
+  background: url("../images/link.png") 0 -2px no-repeat;
+  background-size: 25px 25px;
+  /*img{
+    width: 30px;
+    height: 30px;
+    vertical-align: middle;
+    margin-right: 10px;
+  }*/
+}

+ 39 - 14
src/css/informationOut.less

@@ -24,9 +24,9 @@
   }
 
   h1 {
-    margin: 0 0px 25px 0px !important;
-    font-size: 22px !important;
-    line-height: 37px;
+    margin: 0 0px 5px 0px !important;
+    font-size: 18px !important;
+    /*line-height: 37px;*/
     padding: 0 0 0 40px;
   }
 
@@ -35,8 +35,7 @@
     position: relative;
     background: #fff;
     padding-right: 6px;
-    font-weight: bold;
-    line-height: 30px;
+    /*line-height: 30px;*/
   }
 
   .content {
@@ -46,7 +45,7 @@
   .infoBox {
     border-left: 1px solid #969C9F;
     padding: 0 0 0 33px;
-    margin: 0 0 20px 0;
+    margin: 0 0 4px 0;
   }
   .infoWrapper {
     padding: 0 0 0 40px;
@@ -55,7 +54,7 @@
     position: absolute;
     z-index: 10;
     background: #fff;
-    left: -40px;
+    left: -38px;
     height: 32px;
     top: -1px;
   }
@@ -84,7 +83,7 @@
     position: relative;
     line-height: 24px;
     
-    margin: 0 0 13px;
+    margin: 0 0 4px;
   }
 
   .line {
@@ -96,7 +95,7 @@
     overflow: hidden;
     background: #fff;
     margin: 0 auto;
-    padding: 40px 0 0px 0px;
+    padding: 8px 0 0px 0px;
     display: none;
     position: relative;
     left: 0;
@@ -208,7 +207,7 @@
   .tabBox{
     position: relative;
     background: #fff;
-    height: 95px;
+    height: 38px;
     border-bottom: 1px solid #E6E6E6;
     padding: 0 40px;
   }
@@ -218,6 +217,7 @@
     padding-top: 16px;
     position: absolute;
     z-index: 20;
+    bottom: -6px;
     img {
       width: 8px;
       position: absolute;
@@ -225,10 +225,10 @@
       left: 76px;
     }
     .showWhichSelect {
-      border-radius: 4px;
+      border-radius: 4px 4px 0px 0px;;
       background: #E2F1F8;
-      height: 32px;
-      line-height: 32px;
+      height: 30px;
+      line-height: 30px;
       display: inline-block;
       width: 100%;
       padding-right: 20px;
@@ -264,10 +264,11 @@
   .tabList{
     position: absolute;
     bottom: 0;
+    left: 186px;
   }
   .tab{
     display: inline-block;
-    padding: 7px 18px;
+    padding: 4px 18px 5px;
     margin-right: 5px;
     background: #EEEEEE;
     border-radius:6px 6px 0px 0px;
@@ -290,4 +291,28 @@
   white-space: nowrap;/*强制在一行显示*/
   text-overflow:ellipsis;/*设置超出内容显示...*/
   overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
+}
+.empty{
+  text-align: center;
+  margin-top: 32vh;
+  img{
+    width: 140px;
+    height: 75px;
+  }
+  p{
+    margin-top: 10px;
+    font-size: 15px;
+    color: #aaa;
+  }
+}
+.open-win{
+  position: absolute;
+  right: 15px;
+  bottom: 8px;
+  cursor: pointer;
+  color: #3B9ED0;
+  font-size: 14px;
+  padding-left: 30px;
+  background: url("../images/link.png") 0 -2px no-repeat;
+  background-size: 25px 25px;
 }

+ 1 - 0
src/html/information.html

@@ -19,6 +19,7 @@
     <div class="tabList">
      
     </div>
+      <a id="openWin" class="open-win">网页查看</a>
   </div>
   
   <div class=" container disCopy staticKnowledge">

+ 1 - 0
src/html/informationOut.html

@@ -26,6 +26,7 @@
     <div class="tabList">
      
     </div>
+    <a id="openWin" class="open-win">网页查看</a>
   </div>
   
   <div class=" container disCopy staticKnowledge">

二進制
src/images/link.png


+ 13 - 2
src/js/information.js

@@ -12,7 +12,8 @@ const {
   throttle,
   imageUrlPrefix,
   config,
-  getUrlArgObject
+  getUrlArgObject,
+  openNewWin
 } = require('./promise.js');
 const $ = require("jquery");
 let showName,noticeName,clinicalPathwayName
@@ -153,10 +154,16 @@ function bindTabClick(){
       $(`.${moduleName} .infos`).scrollTop(0)
     }
   })
+  $("#openWin").on("click",function(){
+    const type= getUrlArgObject('type');
+    const name= getUrlArgObject('name');
+    const position= getUrlArgObject('position');
+    openNewWin("information.html?name="+encodeURIComponent(name)+"&position="+encodeURIComponent(position)+"&type="+encodeURIComponent(type));
+  })
 }
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
-  $(".content").height(ht - 145 - 30 + "px");
+  $(".content").height(ht - 90 + "px");
 }
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;
@@ -168,3 +175,7 @@ $(window).on('resize', function(){
   adjustWidth()
 })
 
+//如果是子窗口,隐藏网页查看按钮
+if(window.opener){
+  $("#openWin").hide();
+}

+ 42 - 25
src/js/informationOut.js

@@ -12,7 +12,8 @@ const {
   throttle,
   imageUrlPrefix,
   config,
-  getUrlArgObject
+  getUrlArgObject,
+  openNewWin
 } = require('./promise.js');
 const $ = require("jquery");
 let showName,noticeName,clinicalPathwayName,showLis=[]
@@ -40,33 +41,38 @@ function getInfomation() {
   // }
 
   post(config.getStaticKnowledgeForHIS, param).then((res) => {
-    const data = res.data.data
-    var str = '';
-    var anchors = '';
-    if (!data||data.length==0) {
-      $("h1").html("暂时没有数据");
-      $(".anchors").css("display", "none");
-      return;
-    }
-    showLis=data
-    for(let i = 0;i < showLis.length;i++){
-      let tmp = showLis[i]
-      str+=`<li data-idx="${i}" title="${tmp.name}">${tmp.name}</li>`
+    if(res.data.code==='0'){
+      const data = res.data.data
+      var str = '';
+      var anchors = '';
+      if (!data||data.length===0) {
+        showEmpty();
+        return;
+      }
+      showLis=data
+      for(let i = 0;i < showLis.length;i++){
+        let tmp = showLis[i]
+        str+=`<li data-idx="${i}" title="${tmp.name}">${tmp.name}</li>`
+      }
+      $(".showWhich ul").html(str)
+      $(".showWhichSelect").html(showLis[0].name).attr("title",showLis[0].name)
+      showName = data[0].name
+      document.title = showName
+      showInfoSelect()
+      showInfo(data[0])
+      $('.content img').bind('contextmenu', function(){
+        return false
+      })
+    }else{
+      showEmpty();
     }
-    $(".showWhich ul").html(str)
-    $(".showWhichSelect").html(showLis[0].name).attr("title",showLis[0].name)
-    showName = data[0].name
-    document.title = showName
-    showInfoSelect()
-    showInfo(data[0])
-    $('.content img').bind('contextmenu', function(){
-      return false
-    })
-   
   })
 }
 getInfomation();
-
+function showEmpty(){
+  const str=`<div class="empty"><img src="../images/empty3.png" alt=""><p>暂无静态知识</p></div>`;
+  $(".tabBox").html(str).css("border-bottom","none");
+}
 function showInfo(data){
   var detailList = data.details
   var staticKnowList = detailList['静态知识']
@@ -191,10 +197,17 @@ function bindTabClick(){
       $(`.${moduleName} .infos`).scrollTop(0)
     }
   })
+  $("#openWin").on("click",function(){
+    const type= getUrlArgObject('type');
+    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));
+  })
 }
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
-  $(".content").height(ht - 145 - 60 + "px");
+  $(".content").height(ht - 90 + "px");
 }
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;
@@ -205,4 +218,8 @@ $(window).on('resize', function(){
   adjustHeight()
   adjustWidth()
 })
+//如果是子窗口,隐藏网页查看按钮
+if(window.opener){
+  $("#openWin").hide();
+}