zhouna преди 4 години
родител
ревизия
9abc36c489
променени са 3 файла, в които са добавени 28 реда и са изтрити 28 реда
  1. 11 1
      src/css/cdssHorizontal.less
  2. 10 9
      src/js/cdssHorizontal.js
  3. 7 18
      src/js/smartAlert.js

+ 11 - 1
src/css/cdssHorizontal.less

@@ -185,8 +185,18 @@
     border-bottom: 1px solid #3B9ED0;
     cursor: pointer;
 }
-.tips{
+.tips-cont{
+    position: relative;
     background: #FFE8DD;
+    height: 81px;
+    overflow: hidden;
+    .moduleTitle{
+        position: absolute;
+        top:0;
+        font-size: 14px;
+        font-weight: 600;
+        color:#FF7836;
+    }
 }
 .moduleItem.crivalue,.moduleItem.rationali,.moduleItem.highrisk,.moduleItem.otherremind{
     max-height: 81px;

+ 10 - 9
src/js/cdssHorizontal.js

@@ -484,9 +484,6 @@ function renderwriteStandardPage(list){
     $(".moduleItem.casewriting").append(str)
     $('.moduleItem.casewriting').css("display","block")
   }
-}
-function computeTipsHeight(){
-
 }
 function renderPushWarning(){
   return getPusgWarning().then(res =>{
@@ -499,17 +496,20 @@ function renderPushWarning(){
       let noteList = result.noteList || []  //检查内容注意事项
       let dubugStr = result.dubugStr || []  //注意调试信息
       let otherList = result.otherList || []  //其他提醒
-      $('.moduleItem.rationali .moduleItemTitBox').append(titleStr('warning'))
       renderBillingPush(billMsgList,'开单合理性','rationali')
       renderBillingPush(highRiskList,'高风险提示','highrisk')
       renderBillingPush(criticalValList,'危急值提醒','crivalue')
       renderBillingPush(noteList,'检查注意事项')
       renderBillingPush(otherList,'其他提醒','otherremind')
+      const codes = ($(".rationali.tips").length?'rationali,':"")+($(".highrisk.tips").length?'highrisk,':"")+($(".crivalue.tips").length?'crivalue,':"")+($(".otherremind.tips").length?'otherremind':"");
+      $(".moduleItem.tips").wrapAll("<div class='tips-cont' codes="+codes+"></div>");
+      $('.tips-cont').append(titleStr('warning'))
       moreInfo()
-      if($(".moduleItem.tips")){
-        let tipsHei = $(".moduleItem.tips")[0].scrollHeight
+      const hasTipsNum = $(".moduleItem.tips").length;
+      if(hasTipsNum){
+        let tipsHei = $(".tips-cont")[0].scrollHeight;
         if(tipsHei > 81){
-          $(".tips").append(`<span class="showMoreNewPage">更多</span>`)
+          $(".tips-cont").append(`<span class="showMoreNewPage">更多</span>`)
           tipsMsg = result
           showMoreNewPage()
         }
@@ -541,7 +541,7 @@ function renderBillingPush(list,name,code){
         ${str}
       </div>`
   $("."+code).append(boxStr)
-  $('.moduleItem.'+code).addClass("tips").css("display","block")
+  $('.moduleItem.'+code).addClass("tips").attr("code",code).css("display","block")
 }
 function renderLongStr(name,longStr,location){
   if(!longStr){
@@ -614,9 +614,10 @@ function bindSlide(){
   addScrollEvent()
 }
 function showMoreNewPage(){
+    const codes = $(".tips-cont").attr("codes");
   $(".showMoreNewPage").on("click", function(){
     // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}&noteList=${encodeURIComponent(noteList)}`)
-    openNewWin(`smartAlert.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}`)
+    openNewWin(`smartAlert.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}&codes=`+codes);
   })
 }
 function showMoreCaseWrite(){

+ 7 - 18
src/js/smartAlert.js

@@ -1,7 +1,8 @@
 const $ = require("jquery");
 const { post,config,getUrlArgObject } = require('./promise.js');
-let mrId = getUrlArgObject('mrId') 
+let mrId = getUrlArgObject('mrId')
 let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
+const codes = getUrlArgObject('codes') || ''
 let msg
 $(function(){
   function getMRInfo() {
@@ -21,29 +22,17 @@ $(function(){
         let noteList = result.noteList || []  //检查内容注意事项
         let dubugStr = result.dubugStr || []  //注意调试信息
         let otherList = result.otherList || []  //其他提醒
-        renderBillingPush(billMsgList,'开单合理性')
-        renderBillingPush(highRiskList,'高风险提示')
-        renderBillingPush(criticalValList,'危急值提醒')
-        renderBillingPush(noteList,'检查注意事项')
-        renderBillingPush(otherList,'其他提醒')
+        codes.indexOf("rationali")>-1&&renderBillingPush(billMsgList,'开单合理性')
+        codes.indexOf("highrisk")>-1&&renderBillingPush(highRiskList,'高风险提示')
+        codes.indexOf("crivalue")>-1&&renderBillingPush(criticalValList,'危急值提醒')
+        //renderBillingPush(noteList,'检查注意事项')
+        codes.indexOf("otherremind")>-1&&renderBillingPush(otherList,'其他提醒')
         // renderBillingPush(dubugStr,'注意调试信息')
        
       }
 
     })
   })
-  // let tipsMsg = JSON.parse(getUrlArgObject("tipsMsg")) || {}
- 
-  // let billMsgList = tipsMsg.billMsgList || []
-  // let highRiskList = tipsMsg.highRiskList || []
-  // let criticalValList = tipsMsg.criticalValList || []
-  // let noteList = tipsMsg.noteList || []
-  // let otherList = tipsMsg.otherList || []  //其他提醒
-  // renderBillingPush(billMsgList,'开单合理性')
-  // renderBillingPush(highRiskList,'高风险提示')
-  // renderBillingPush(criticalValList,'危急值提醒')
-  // renderBillingPush(noteList,'检查注意事项')
-  // renderBillingPush(otherList,'其他提醒')
   function renderBillingPush(list,name){
     if(list.length === 0){
       return