Browse Source

Merge branch 'modeTree' of http://192.168.2.236:10080/zhouna/icssDService into modeTree

zhangxc 5 năm trước cách đây
mục cha
commit
426423600f
3 tập tin đã thay đổi với 105 bổ sung3 xóa
  1. 47 0
      src/css/icssIndex.less
  2. 10 1
      src/html/icssIndex.html
  3. 48 2
      src/js/icssIndex.js

+ 47 - 0
src/css/icssIndex.less

@@ -486,4 +486,51 @@
     left: 50%;
     top: 50%;
     margin: -20px 0 0 -20px;
+}
+.emergency {
+    position: fixed;
+    right: 20px;
+    top: 0;
+    .disPub {
+        width: 40px;
+        height: 40px;
+        line-height: 40px;
+        position: absolute;
+        left: 0;
+        text-align: center;
+        border-radius: 50%;
+        color: #fff;
+        background-color: #f93333;
+    }
+    .singleDis {
+        left: -25px;
+        display: none;
+    }
+    .allDis {
+        display: none;
+        z-index: 10;
+        moz-user-select: -moz-none;
+        -moz-user-select: none;
+        -o-user-select: none;
+        -webkit-user-select: none;
+        -ms-user-select: none;
+        user-select: none;
+        position: fixed;
+        top: 0;
+        right: 5px;
+        width: auto;
+        height: 40px;
+        line-height: 40px;
+        border-radius: 22px;
+        border: 2px solid #f93333;
+        background-color: #fff;
+        padding-left: 50px;
+        padding-right: 30px;
+        cursor: pointer;
+        .right {
+            position: absolute;
+            right: 5px;
+            top: 9px;
+        }
+    }
 }

+ 10 - 1
src/html/icssIndex.html

@@ -15,6 +15,16 @@
 
 <body>
   <div class="bodyWrap">
+      <div class="emergency">
+        <div class="singleDis disPub">急</div>
+        <div class="allDis">
+          <span class="disPub secDis">急</span>
+          <span class="allName">
+            <span class="disName">气胸</span>救治流程
+          </span>
+          <img src="../images/right.png" class="right" alt="">
+        </div>
+      </div>
       <div class="iframeWrap">
         <div class="recommendWrap">
           <div class="empty">
@@ -27,7 +37,6 @@
             <!-- <p class="loadingTxt">loading~</p> -->
           </div>
         </div>
-        
       </div>
       <p class="responsibility"></p>
       <div class="disclaimer clearfix">

+ 48 - 2
src/js/icssIndex.js

@@ -3,6 +3,7 @@ require('./../css/icssIndex.less');
 require('./../css/popup.css');
 require('./../images/empty.png')
 require('./../images/loading.gif')
+require('./../images/right.png')
 // require('./popupEdit.js');
 var Promise = require("bluebird");
 let diagFirstImg = require('./../images/yszd.png')
@@ -165,7 +166,8 @@ function getPageInfo(configArr) {
     medicalIndications = [],
     diagCommon = [],
     CaseStandard = [],
-    labAndPacsRecommend = []
+    labAndPacsRecommend = [],
+    disName=""
     const hasCaseStandard = confArr.findIndex(item => item.code == 'specification_show') > -1
     const hasCommon = confArr.findIndex(item => item.code == 'comsympto_show') > -1
    
@@ -237,6 +239,7 @@ function getPageInfo(configArr) {
     }else{
       if(hasCaseStandard){
         Promise.all([getAnalyse(),getPushInfo()]).then(([res1, res2]) =>{
+          getPushData(res2)
           diagWaring = res2&&res2.data&&res2.data.data&&res2.data.data.dis&&res2.data.data.dis['警惕'] || []
           diagFirst = res2&&res2.data&&res2.data.data&&res2.data.data.dis&&res2.data.data.dis['拟诊'] || []
           diagPossible = res2&&res2.data&&res2.data.data&&res2.data.data.dis&&res2.data.data.dis['可能诊断'] || []
@@ -346,7 +349,50 @@ function getPageInfo(configArr) {
   // })
 
 }
-
+function getPushData(res){
+  if(res&&res.data&&res.data.data&&res.data.data.dis&&res.data.data.dis){
+    let dis = res.data.data.dis;
+    //急诊显示规则,主诊断有急诊优先显示,没有则显示推送的,推送也没有就不显示
+    if(dis&&dis['页面急诊']&&(dis['页面急诊'].length>0)){
+      let name = dis['页面急诊'][0].name || ''
+      $(".allDis .disName").html(name)
+      disName = name
+      if(name){
+        $(".singleDis").css("display","block")
+      }
+    }else if(dis&&dis['急诊']&&dis['急诊'].length>0){
+      let name = dis['急诊'][0].name || ''
+      $(".allDis .disName").html(name)
+      disName = name
+      if(name){
+        $(".singleDis").css("display","block")
+      }
+    }
+  }
+}
+let disName=""
+function handleShow(){
+  const newinConf = {
+    width: '600',   //窗口的文档显示区的宽度。以像素计。
+    height: '826',  //窗口文档显示区的高度。以像素计。
+    left: '0',  //窗口的 x 坐标。以像素计。
+    top: '0',    //窗口的 y 坐标。以像素计。
+    openMode: "_blank"  //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
+  }
+  const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
+  window.open('./emergency.html?disName='+disName, newinConf.openMode, newWindowLocation)
+}
+$(document).on('click',".allDis .allName",function(){
+  handleShow()
+})
+$(document).on('click',".singleDis",function(){
+  $(this).next().css("display","block")
+  $(this).css("display","none")
+})
+$(document).on('click',".allDis .right,.allDis .secDis",function(){
+  $(".allDis").css("display","none")
+  $(".singleDis").css("display","block")
+})
 function renderPageData(confArr,diagWaring,diagFirst,diagPossible,diagIdentify,labAndPacsRecommend,physiExamRecommend,symptomRecommend,medicalIndications,diagCommon,CaseStandard){
     let renderNum = 0
     // renderWarning(5,'warning', '警惕', diagWaring, true,7,2)