浏览代码

推送修改

zhangxc 4 年之前
父节点
当前提交
78279152ba
共有 4 个文件被更改,包括 124 次插入420 次删除
  1. 33 364
      src/css/cdss.less
  2. 41 37
      src/html/cdss.html
  3. 49 18
      src/js/cdss.js
  4. 1 1
      src/js/promise.js

+ 33 - 364
src/css/cdss.less

@@ -1,297 +1,23 @@
 @import './common.less';
-
-.iframeWrap {
-    margin: 10px auto 50px;
-    padding: 0 20px 20px 20px;
-    min-width: 340px;
-    overflow-y: auto;
-}
-
-.recommendInfoWrapper {
-    border: 1px solid #F2F2F2;
-    margin-bottom: 5px;
-
-    h4 {
-        color: #000;
-        // height: 24px;
-        line-height: 24px;
-        background-color: #FAEBEC;
-        font-size: 16px;
-        font-weight: bold;
-    }
-}
-
-.recommendInfoWrapper h4 i {
-    content: '';
-    width: 18px;
-    height: 18px;
-    float: left;
-    position: relative;
-    top: 3px;
-    margin: 0 12px;
-}
-
-.symptomRecommend,
-.physiExamRecommend,
-.labAndPacsRecommend {
-    h4 {
-        background-color: #ECF4FC;
-    }
-}
-
-.treatRecommend,.knowledgeInfo,.scaleInfo {
-    h4 {
-        background-color: #E3FEFE;
-    }
-}
-.tipsInfo {
-    h4 {
-        background-color: #E3FEFE;
-    }
-}
-
-
-.conditTips {
-    h4 {
-        background-color: #FDF4EE;
-    }
-}
-.warning{
-    background-color: #FF8D54;
-    font-size: 14px;
-    h4 {
-        background-color: #FF8D54;
-        font-size: 14px;
-        color: #fff;
-        line-height: 30px;
-        display: inline-block;
-        margin: 0 20px 0 0;
-        i{
-            margin: 0 12px 0 0;
-        }
-    }
-    .recommendInfoBox{
-        display: inline-block;
-    }
-    .recommendInfoItem{
-        display: inline-block;
-        float: none;
-        color: #fff;
-    }
-}
-
-.recommendInfoBox {
-    padding: 4px 17px;
-}
-
-.treatRecommend h4 i,.knowledgeInfo h4 i,.scaleInfo h4 i {
-    background: url(/images/zhiliao.png) center center no-repeat;
-}
-.tipsInfo h4 i {
-    background: url(/images/zhiliao.png) center center no-repeat;
-}
-
-.conditTips h4 i {
-    background: url(/images/tips.png) center center no-repeat;
-}
-
-.symptomRecommend h4 i {
-    background: url(/images/inquire.png) center center no-repeat;
-}
-
-.physiExamRecommend h4 i {
-    background: url(/images/tgjc.png) center center no-repeat;
-}
-
-.labAndPacsRecommend h4 i {
-    background: url(/images/inspect.png) center center no-repeat;
-}
-
-.warning h4 i {
-    background: url(/images/warings.png) center center no-repeat;
-}
-
-.diagRecommend h4 i {
-    background: url(/images/yszd.png) center center no-repeat;
-}
-
-.recommendInfoItem {
-    padding-right: 15px;
-    float: left;
-    line-height: 21px;
-    position: relative;
-}
-
-.infoMsg,
-.infoMsgOn {
-    position: absolute;
-    top: 4px;
-    right: 0;
-}
-
-.infoMsg,
-.infoMsgOn {
-    display: none;
-    cursor: pointer;
-}
-
-.recommendInfoItemHasInfo:hover,
-.diagNameBox:hover,
-.durgNameBox:hover {
-    color: #267FD7;
-
-    .infoMsg {
-        display: inline-block;
-        width: 14px;
-        height: 14px;
-        background: url(/images/msg1.png) center center no-repeat;
-    }
-
-    .infoMsg:hover {
-        background: url(/images/msg2.png) center center no-repeat;
-    }
-}
-
-// .diagNameBox:hover {
-//     color: #267FD7;
-//     .infoMsg {
-//         display: inline-block;
-//         width: 16px;
-//         height: 16px;
-//         background: url(/images/msg1.png) center center no-repeat;
-//     }
-//     .infoMsg:hover {
-//         background: url(/images/msg2.png) center center no-repeat;
-//     }
-// }
-.diagNameBox,
-.durgNameBox {
-    position: relative;
-    padding-right: 15px;
-    display: inline-block;
-    .infoMsg, .infoMsgOn {
-        top: 6px;
-    }
-}
-.durgName, .diagName{
-    border-bottom: 1px solid #1E1E1E;
-}
-.sriticalinfo {
-    height:30px;
-    background:#F5F5F5;
-    line-height: 30px;
-    margin: 10px 0;
-}
-.recommendInfoBox p {
-    line-height: 21px;
-}
-
-.commonTreatmentbox {
-    padding-bottom: 10px;
-    border-bottom: 1px solid #D1D1D1;
-}
-
-.drugTreatmentbox {
-    padding-top: 10px;
-}
-
-.illnessTable {
-    color: #267FD7;
-    line-height: 21px;
-    cursor: pointer;
-}
-
-.labAndPacsBox {
-    position: relative;
-    line-height: 21px;
-}
-
-.alertModal {
-    position: relative;
-
-    .mayResult {
-        color: #838383;
-        position: relative;
-    }
-
-    .mayResultSelect {
-        line-height: 21px;
-
-        .makesureResult {
-            cursor: pointer;
-            color: @colorBlue;
-        }
-
-        .sanjiao {
-            width: 18px;
-            height: 18px;
-            display: inline-block;
-            position: relative;
-            top: 3px;
-            background: url('../images/select.png') center center no-repeat;
-        }
-    }
-}
-
-.recommendInfoItemBox {
-    position: relative;
-}
-
-.recommendInfoItemBoxLimit {
-    height: 21px;
+body{
     overflow: hidden;
     position: relative;
 }
-
-.commonTreatmentInfoLimit {
-    height: 75px;
-    overflow: hidden;
-    position: relative;
+.bodyWrap{
+    position: fixed;
+    width: 100%;
+    height: 100%;
 }
-
-.slideDown {
-    background-color: #fff;
-    position: absolute;
-    bottom: 0px;
-    right: 0px;
-    color: @colorBlue;
-    height: 21px;
-    line-height: 21px;
-    box-shadow: -2px 0px 15px 0px #fff;
-    cursor: pointer;
-
-    i {
-        width: 10px;
-        height: 7px;
-        display: inline-block;
-        position: relative;
-        // top: -2px;
-        background: url('../images/down.png') center center no-repeat;
-    }
+.iframeWrap {
+    margin: 10px auto 50px;
+    padding: 0 20px 20px 20px;
+    min-width: 340px;
+    overflow-y: hidden;
 }
-
-.slideup {
-    background-color: #fff;
+.contentWrapper{
     position: relative;
-    float: right;
-    bottom: 0px;
-    right: 0px;
-    color: @colorBlue;
-    cursor: pointer;
-    height: 21px;
-    line-height: 21px;
-    box-shadow: -2px 0px 15px 0px #fff;
-
-    i {
-        width: 10px;
-        height: 7px;
-        display: inline-block;
-        position: relative;
-        // top: -2px;
-        background: url('../images/up.png') center center no-repeat;
-    }
+    overflow-y: auto;
 }
-
 .responsibility {
     text-align: center;
     font-size: 12px;
@@ -303,12 +29,12 @@
     background-color: #fff;
 }
 .disclaimer {
-    height: 26px;
+    height: 36px;
     width: 100%;
-    line-height: 26px;
+    line-height: 36px;
     position: fixed;
     bottom: 0;
-    background-color: #fff;
+    background-color: #EFF1F6;
     left: 0;
     z-index: 98;
     .version-tip{
@@ -328,27 +54,12 @@
     .disclaimerInfo {
         float: right;
         font-size: 12px;
-        margin-right: 15px;
+        margin-right: 20px;
     }
 }
 
-.labAndPacsTitle {
-    border-right: 2px solid #ADADAD;
-    padding-right:5px; 
-    margin-right: 5px;
-}
-.labAndPacsItem {
-    display: inline-block;
-    padding-right: 15px;
-}
 
-.recommendNull,.TipsInfoNull {
-    color: #ADADAD;
-}
-.treatItemTitle {
-    font-weight: bold;
-    padding-bottom: 5px;
-}
+
 .disclaimerInfo {
     cursor: pointer;
 }
@@ -364,36 +75,7 @@
     margin-left: 20px;
     cursor: pointer;
 }
-.durgNameBox {
-    .medicineWaring {
-        background-color: #f4c051;
-        color: #000;
-        font-size: 12px;
-        border-radius: 4px;
-        border: 1px solid #fff;
-        line-height: 18px;
-      }
-      .medicineWaringDisMsg {
-        background-color: #fff;
-        color: @grayColor;
-        font-size: 12px;
-        border-radius: 4px;
-        line-height: 18px;
-        border: 1px solid @grayColor;
-      }
-      .medicineWaringDisMsg {
-        color: @grayColor;
-      }
-}
-.medicineWaringDis {
-    color: @grayColor;
-    .durgName{
-        border-bottom: 1px solid @grayColor;
-    }
-  }
-.medicineWaringDis:hover {
-    color: @grayColor;
-}
+
 
 .staticWin {
     color: #040428;
@@ -405,34 +87,8 @@
     height: 1px;
     background: #D1D1D1;
 }
-.diagTitle {
-    color: #3b9ed0;
-    position: relative;
-    margin: 0 0 10px;
-    font-weight: 500;
-    i {
-        position: relative;
-        display: inline-block;
-        width: 4px;
-        height: 4px;
-        background: #3b9ed0;
-        border-radius: 50%;
-        top: -4px;
-        margin-right: 6px;
-    }
-}
-.diagDescription{
-    color: #333;
-    font-weight: 600;
-    margin: 5px 0 10px;
-}
-.treatItemTitle {
-    position: relative;
-    .slideDown {
-        font-weight: normal;
-        bottom: 5px;
-    }
-}
+
+
 .empty{
     position: relative;
     top: 200px;
@@ -652,4 +308,17 @@
 }
 .moduleWrapper{
     display: none;
+}
+.recommendWrap{
+    position: absolute;
+    width: 100%;
+    padding: 0 0 50px 0;
+}
+.staticSearchB ul{
+    position: absolute;
+    height: 480px;
+    width: 100%;
+    /* right: 30px; */
+    left: 0; 
+    overflow: auto;
 }

+ 41 - 37
src/html/cdss.html

@@ -29,48 +29,52 @@
         <div class="tabList">
 
         </div>
-        <div class="recommendWrap moduleWrapper">
-          <div class="empty">
-            <img class="emptyImg" src="./images/empty.png" alt="空">
-            <p class="emptyTxt">内容暂无推送信息~</p>
-          </div>
-          <div class="loading">
-            <div class="loadingMask"></div>
-            <img class="loadingImg" src="./images/loading.gif" alt="loading">
-            <!-- <p class="loadingTxt">loading~</p> -->
+        <div class="contentWrapper">
+          <div class="recommendWrap moduleWrapper">
+            <div class="empty">
+              <img class="emptyImg" src="./images/empty.png" alt="空">
+              <p class="emptyTxt">内容暂无推送信息~</p>
+            </div>
+            <div class="loading">
+              <div class="loadingMask"></div>
+              <img class="loadingImg" src="./images/loading.gif" alt="loading">
+              <!-- <p class="loadingTxt">loading~</p> -->
+            </div>
+            <p class="responsibility"></p>
+            <div class="disclaimer clearfix">
+              <span class="version-tip">版本说明</span>
+              <span class="logo">&copy 朗通医疗</span>
+              <span class="disclaimerInfo">免责声明</span>
+            </div>
           </div>
-          <p class="responsibility"></p>
-          <div class="disclaimer clearfix">
-            <span class="version-tip">版本说明</span>
-            <span class="logo">&copy 朗通医疗</span>
-            <span class="disclaimerInfo">免责声明</span>
+          <div class="qcWrap moduleWrapper">
+  
           </div>
-        </div>
-        <div class="qcWrap moduleWrapper">
-
-        </div>
-        <div class="medicalKonwledgeWrap moduleWrapper">
-          <div class="container">
-            <div class="searchKnowledge">
-                <div class="staticSearchT">
-                    <div class="ipt">
-                        <input type="text" value="" placeholder="医学知识搜索">
-                    </div>
-                    <i id="clearKnowledge"></i>
-                    <button >搜索</button>
-                </div>
-                <div class="searchTypeBox"></div>
-    
-                <div class="staticSearchB">
-                    <p class="tip">查询内容</p>
-                    <p class="empty">暂无搜索结果!</p>
-                    <ul>
-                        
-                    </ul>
-                </div>
+          <div class="medicalKonwledgeWrap moduleWrapper">
+            <div class="container">
+              <div class="searchKnowledge">
+                  <div class="staticSearchT">
+                      <div class="ipt">
+                          <input type="text" value="" placeholder="医学知识搜索">
+                      </div>
+                      <i id="clearKnowledge"></i>
+                      <button >搜索</button>
+                  </div>
+                  <div class="searchTypeBox"></div>
+      
+                  <div class="staticSearchB">
+                      <p class="tip">查询内容</p>
+                      <p class="empty">暂无搜索结果!</p>
+                      <ul>
+                          
+                      </ul>
+                  </div>
+              </div>
             </div>
           </div>
+
         </div>
+        
       </div>
     
   </div>

+ 49 - 18
src/js/cdss.js

@@ -23,24 +23,29 @@ const { data } = require('jquery');
 const { render } = require('less');
 
 
+
+
 let moduleConfig={
   auxiliary:"recommendWrap",
   qc:"qcWrap",
   medical:"medicalKonwledgeWrap"
 }
+let allInterface = 0
+let hasCompleteTnterface = 0
 let moduleNum = 0
 let mrId = getUrlArgObject('mrId') 
 const tipsMode = getUrlArgObject('tipsMode') || 1
+let planCode = getUrlArgObject('planCode') || 'all'
 let msg;
 
 function getMRInfo() {
    return post(config.getMr2,{mrId:mrId})
 }
-// $('.loading').css("display","block")
+$('.loading').css("display","block")
 $('.empty').css("display","none")
 getMRInfo().then(res =>{
     if(res.data.code == '0'){
-        msg = res.data.data
+        msg = res.data.data ||{}
         window.msg = msg
         getConf().then(res =>{
           if(res.data.code == '0'){
@@ -81,15 +86,15 @@ getMRInfo().then(res =>{
 // window.pushMessage = {}
 function getConf() {
   var msg = window.msg 
-  return post(config.getPushSet,{hospitalId: 1,planCode: "all"})
+  return post(config.getPushSet,{hospitalId: msg.hospitalId||1,planCode: planCode})
 }
 
 function getPushInfo() {
-  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',hospitalId:2,ruleType:config.ruleTypeMap['22']},msg))
+  return  post(config.pushInner,Object.assign(msg,{featureType: '1,4,5,6,7,22',hospitalId:2,ruleType:config.ruleTypeMap['22']}))
   
 }
 function getPusgWarning(){
-  return  post(config.indicationPush,Object.assign({ruleType: '1,2,3,4',hospitalId:2,ruleType:config.ruleTypeMap['22']},msg))
+  return  post(config.indicationPush,Object.assign(msg,{ruleType: '1,2,3,4',hospitalId:2,ruleType:config.ruleTypeMap['22']}))
 }
 
 
@@ -192,40 +197,53 @@ function getDisclaimer() {
 
 function renderPage(pageSet){
     renderTab(pageSet.sysSetInfo)
+    const iframeHei = $(".bodyWrap").height()
+    const tabHei = $(".tabList").height()
+    $(".contentWrapper").css("height",iframeHei-tabHei-10+'px')
     const hasAuxiliary = hasTab("辅助信息",pageSet.sysSetInfo)
     const hasMedical = hasTab("医学知识",pageSet.sysSetInfo)
+ 
     if(hasAuxiliary){
       renderModuleWrapper(hasAuxiliary.planDetails)
       let needPush = isNeedPush(hasAuxiliary.planDetails)
       let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
       if(needPush || needPushWarning){
         renderPushData()
+        allInterface++
       }
       if(needPushWarning){
         renderPushWarning()
+        allInterface++
       }
     }
 }
 
 function renderPushData(){
   return getPushInfo().then(res =>{
+    hasCompleteTnterface++
     if(res.data.code == "0"){
       const result = res.data.data
       let diagPush = result.dis 
     
-      // let lisPush = result.lis || []
-      // let pacsPush = result.pacs || []
+      let lisPush = result.lis || []
+      let pacsPush = result.pacs || []
       let symptomPush = result.symptom ||[]
-      // let checkupPush = result.vital ||[]
+      let checkupPush = result.vital ||[]
 
-      let lisPush =[{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
-      let pacsPush = [{name:"胸部x射线",hisNameList:null},{name:"心电图",hisNameList:null}]
-      let checkupPush = [{name:"神志表情",hisNameList:null},{name:"面部表情",hisNameList:null}]
+      // let lisPush =[{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
+      // let pacsPush = [{name:"胸部x射线",hisNameList:null},{name:"心电图",hisNameList:null}]
+      // let checkupPush = [{name:"神志表情",hisNameList:null},{name:"面部表情",hisNameList:null}]
       renderLis(lisPush,5,null,true)
       renderPacs(pacsPush,5,null,true)
       renderCheckup(checkupPush,5,null,false)
       renderSymptomPush(symptomPush,5,null,true)
       renderDiag(diagPush)
+      if(hasCompleteTnterface === allInterface){
+        $('.loading').css("display","none")
+        if(moduleNum === 0){
+          empty()
+        }
+      }
       bindOpenInfo()
       bindSlide()
     }
@@ -253,6 +271,7 @@ function isNeedPushWarning(list){
 
 function renderPushWarning(){
   return getPusgWarning().then(res =>{
+    hasCompleteTnterface++
     if(res.data.code == '0'){
       const result = res.data.data
       let billMsgList = result.billMsgList || []  //开单合理性提醒
@@ -262,7 +281,16 @@ function renderPushWarning(){
       let dubugStr = result.dubugStr || []  //注意调试信息
       $('.moduleItem.tips').append(titleStr('warning'))
       renderBillingPush(billMsgList,'开单合理性提醒')
+      renderBillingPush(highRiskList,'高风险提示')
       renderBillingPush(criticalValList,'危急值提醒')
+      renderBillingPush(noteList,'检查内容注意事项')
+      // renderBillingPush(dubugStr,'注意调试信息')
+      if(hasCompleteTnterface === allInterface){
+        $('.loading').css("display","none")
+        if(moduleNum === 0){
+          empty()
+        }
+      }
     }
     
   })
@@ -287,11 +315,11 @@ function renderBillingPush(list,name){
 
 function renderDiag(diagPush){
   let possibleDiagPush = diagPush["可能诊断"] || []
-  // let firstDiagPush = diagPush["初步诊断"] || []
-  // let identifyDiagPush = diagPush["鉴别诊断"] || []
+  let firstDiagPush = diagPush["初步诊断"] || []
+  let identifyDiagPush = diagPush["鉴别诊断"] || []
 
-  let firstDiagPush =  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
-  let identifyDiagPush = diagPush["鉴别诊断"] ||  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
+  // let firstDiagPush =  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
+  // let identifyDiagPush = diagPush["鉴别诊断"] ||  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
   $('.moduleItem.diag').append(titleStr("diagPush"))
   renderDiagItem(possibleDiagPush,"可能诊断")
   renderDiagItem(firstDiagPush,"初步诊断")
@@ -415,9 +443,9 @@ function bindSlide(){
 function renderModuleWrapper(moduleList){
   let moduleStr = ''
   for(let i = 0; i < moduleList.length; i++){
-    // if(moduleList[i].status !='0'){
-      moduleStr += `<div class="moduleItem ${moduleList[i].code}" style="display:block"></div>`
-    // }
+    if(moduleList[i].status !='0'){
+      moduleStr += `<div class="moduleItem ${moduleList[i].code}" style="display:none"></div>`
+    }
    
   }
   $(".recommendWrap").append(moduleStr)
@@ -468,6 +496,9 @@ function getModuleShow(moduleClassName){
   }
 }
 
+function empty(){
+  $('.empty').css("display","block")
+}
 
 
 

+ 1 - 1
src/js/promise.js

@@ -55,7 +55,7 @@ const config = {
   getMr: '/sys/mr/getMr', //页面推送患者信息
   getMr2: '/sys/mr/getMr', //icss推送患者信息
   getVersion: '/sys/versionInfo/getVersionInfoAlls',
-  getStaticKnowledge: '/demo/retrieval/index',
+  getStaticKnowledge: '/graph/conceptInfo/staticKnowledgeIndex',//静态知识检索
   getStaticScale: '/api/data/search/getScale',
   dictionaryInfo: '/sys/dictionaryInfo/getList', //字典信息
   getPushSet:'/sys/plan/getSysPlanInfoDatas', //获取推送配置