zhangxc hace 4 años
padre
commit
7f54991fb9

+ 3 - 0
src/css/cdss.less

@@ -361,4 +361,7 @@ body{
 }
 .medicalKonwledgeWrap{
     padding: 0 30px;
+}
+.titleIcon{
+    width: 20px;
 }

+ 168 - 0
src/css/cdssHorizontal.less

@@ -18,6 +18,7 @@
     position: absolute;
     width: 100%;
     height: 160px;
+    cursor: pointer;
 }
 .versionBottom{
     position: absolute;
@@ -25,6 +26,7 @@
     height: 70px;
     bottom: 0;
     font-size: 12px;
+    cursor: pointer;
 }
 .pushDisclaimer{
     display: inline-block;
@@ -60,8 +62,174 @@
 }
 .tab {
     display: inline-block;
+    cursor: pointer;
+    width: 100%;
+}
+.tabName{
+    display:inline-block;
+    width: 16px;
+    position: relative;
+    left: 6px;
+    text-align: center;
+    top: 50%;
+ 
 }
 .activeTab{
     background: #3B9ED0;
     color:#fff;
+}
+.contentBox{
+    position: absolute;
+    height: 100%;
+}
+.moduleWrapper{
+    position: absolute;
+    width: 100%;
+    height: 100%;
+}
+.leftWrapper,.rightWrapper{
+    position: relative;
+    height: 100%;
+    display: inline-block;
+    box-sizing: border-box;
+}
+.leftWrapper{
+    width: 60%;
+    border-right: 1px solid #E6E6E6;
+    float: left;
+    padding: 0 20px 0 10px;
+    box-sizing: border-box;
+}
+.rightWrapper{
+    width: 40%;
+}
+.leftBox{
+    position: relative;
+}
+.moduleWrapper{
+    display:none;
+}
+.moduleItem {
+    padding: 0 0 0  110px;
+    box-sizing: border-box;
+    line-height: 27px;
+}
+.moduleItemTitBox{
+    display: inline-block;
+    width: 110px;
+    height: 27px;
+    box-sizing: border-box;
+    position: absolute;
+    left: 0;
+    
+}
+.titleIcon{
+    width: 20px;
+    margin: 0px 5px 0 5px;
+    position: relative;
+    top: 4px;
+}
+.infoImg{
+    width: 15px;
+}
+.moduleTitle{
+    font-size: 14px;
+    font-weight: 600;
+    color: #157FD5;
+}
+.diag .moduleTitle{
+    color: #FF656B;
+}
+.pushItemBox{
+    padding-right: 18px;
+    position: relative;
+}
+.infoImg{
+    width: 15px;
+    position: absolute;
+    top: 2px;
+    cursor: pointer;
+    display: none;
+    right: 2px;
+}
+.pushItemBox:hover{
+    .infoImg{
+        display: block;
+    }
+}
+.searchBox{
+    margin: 30px 0 0 30px;
+}
+.search{
+    color: #3B9ED0;
+    border-bottom: 1px solid #3B9ED0;
+    cursor: pointer;
+}
+.moduleItem.tips{
+    max-height: 81px;
+    overflow-y: hidden;
+    background: #FFE8DD;
+}
+.moduleItem.tips .moduleTitle{
+   color: #FF7836;
+} 
+.showMore,.showLess{
+    display: inline-block;
+    cursor: pointer;
+    float: right;
+    line-height: 27px;
+    color: #3B9ED0;
+}
+.longStrBox{
+    position: absolute;
+    width: 100%;
+    left: 0;
+    top: 5px;
+    background: #fff;
+    border: 1px solid #3B9ED0;
+    box-sizing: border-box;
+    border-radius: 1px;
+    padding: 0 0 0 80px;
+    display: none;
+}
+.longStrBoxTitle{
+    position: absolute;
+    left: 0;
+    display: inline-block;
+    width: 80px;
+    text-align: right;
+    font-weight: 600;
+}
+.tips .moduleBox{
+    padding: 0 0 0 80px;
+    position: relative;
+}
+.tips .moduleBoxName{
+    position: absolute;
+    left: 0;
+    font-size: 12px;
+    color:#FF7836;
+    display: inline-block;
+    border: 1px solid #FF7836;
+    line-height: 16px;
+    top: 5px;
+    padding: 0 7px;
+    border-radius: 9px;
+}
+.diag .moduleBox{
+    padding: 0 0 0 60px;
+    position: relative;
+}
+.diag .moduleBoxName{
+    position: absolute;
+    left: 0;
+    font-size: 12px;
+    color:#1E1E1E;
+    background: #E2EAF2;
+    border: 0px;
+    display: inline-block;
+    line-height: 16px;
+    border-radius: 2px;
+    top: 6px;
+    padding: 0 4px;
 }

+ 3 - 0
src/css/staticSearch.css

@@ -1,3 +1,6 @@
+html{
+    background: #fff;
+}
 .staticContainer {
     width: 80%;
     background: #fff;

+ 15 - 3
src/html/cdssHorizontal.html

@@ -30,9 +30,21 @@
 
       </div>
       <div class="contentBox">
-        <div class="recommendWrap">
-          <div class="leftWrapper"></div>
-          <div class="rightWrapper"></div>
+        <div class="recommendWrap moduleWrapper clearfix">
+          <div class="leftWrapper">
+            <div class="leftBox"></div>
+          </div>
+          <div class="rightWrapper">
+            <div class="rightBox"></div>
+          </div>
+        </div>
+        <div class="qcWrap moduleWrapper">
+        
+        </div>
+        <div class="medicalKonwledgeWrap moduleWrapper">
+         <div class="searchBox">
+           <span class="search">点击搜索医学知识</span>
+         </div>
         </div>
       </div>
   </div>

+ 3 - 3
src/js/cdss.js

@@ -228,11 +228,11 @@ function renderPushData(){
 
       renderLis(lisPush,lisNum,3,true)
       renderPacs(pacsPush,pacsNum,5,true)
-      renderCheckup(checkupPush,checkupNum,null,false)
-      renderSymptomPush(symptomPush,symptomNum,null,false)
+      renderCheckup(checkupPush,checkupNum,null,true)
+      renderSymptomPush(symptomPush,symptomNum,null,true)
       renderDiag(diagPush)
       renderMedicinesPush(medicinesPush,medicinesNum,2,true)
-      renderOperationPush(operationsPush,operationsNum,6,false)
+      renderOperationPush(operationsPush,operationsNum,6,true)
       if(hasCompleteTnterface === allInterface){
         $('.loading').css("display","none")
         if(moduleNum === 0){ 

+ 365 - 27
src/js/cdssHorizontal.js

@@ -14,8 +14,17 @@ require('./../css/staticSearch.css')
 require('./../js/staticSearch.js')
 require('./../images/empty2.png').replace(/^undefined/g, '')
 require('./../images/loading.gif').replace(/^undefined/g, '')
-const { post,config,getUrlArgObject,openNewWin,titleConfig } = require('./promise.js');
+const { post,config,getUrlArgObject,openNewWin,titleConfigH } = require('./promise.js');
+let infoImg = require('./../images/icon_info.png').replace(/^undefined/g, '')
+let infoImgOn = require('./../images/icon_info_on.png').replace(/^undefined/g, '')
+let iconArrowUp = require('./../images/icon_arrow_up.png').replace(/^undefined/g, '')
+let iconArrowDown = require('./../images/icon_arrow_down.png').replace(/^undefined/g, '')
+let showImg = require('./../images/show.png').replace(/^undefined/g, '')
+let collapseImg = require('./../images/collapse.png').replace(/^undefined/g, '')
 
+
+
+setWidth()
 let moduleConfig={
   auxiliary:"recommendWrap",
   qc:"qcWrap",
@@ -36,7 +45,14 @@ function getMRInfo() {
 function getConf() {
   var msg = window.msg 
   return post(config.getPushSet,{hospitalId:hospitalIdUrl||msg.hospitalId||1,planCode: planCode})
- }
+}
+function getPushInfo() {
+  return  post(config.pushInner,Object.assign({},msg,{featureType: '1,4,5,6,7,8,9',hospitalId:hospitalIdUrl||msg.hospitalId,ruleType:config.ruleTypeMap['22']}))
+  
+}
+function getPusgWarning(){
+  return  post(config.indicationPush,Object.assign({},msg,{ruleType: '1,2,3',hospitalId:hospitalIdUrl||msg.hospitalId}))
+}
 
 if(mrId){
   getMRInfo().then(res =>{
@@ -65,19 +81,19 @@ function renderPage(pageSet){
   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++
-  //   }
-  // }
+  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 renderTab(tabList){
   let tabStr = ''
@@ -85,17 +101,18 @@ function renderPage(pageSet){
   for(let i = 0; i < tabList.length; i++){
     if(tabList[i].status == '1'){
       TabNum++
-      tabStr += `<span class="tab" data-name="${tabList[i].code}" >${tabList[i].name}<span class="activeLine"></span></span>`
+      tabStr += `<span class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span><span class="activeLine"></span></span>`
     }
     
   }
   
   $(".tabList").append(tabStr)
   $(".tabList .tab").eq(0).addClass("activeTab")
-  $(".tabList .tab").css("height", 1/TabNum + '%')
+  $(".tabList .tab").css("height", 1/TabNum * 100 + '%')
   let showModuleName =  $(".tabList .tab").eq(0).attr("data-name")
-  // getModuleShow(moduleConfig[showModuleName])
-  // bindTabClick()
+  getModuleShow(moduleConfig[showModuleName])
+  bindTabClick()
+  setTabNameTop()
 }
 function hasTab(tabName,tabList){
   for(let i = 0; i < tabList.length; i++){
@@ -107,22 +124,23 @@ function hasTab(tabName,tabList){
 }
 
 function renderModuleWrapper(moduleList){
-  let moduleStr = ''
+  let moduleStr = '',treatStr=""
   for(let i = 0; i < moduleList.length; i++){
     if(moduleList[i].status !='0'){
       if(moduleList[i].code == 'treat'){
-        moduleStr += `<div class="moduleItem medicine"  data-num="${moduleList[i].number}" style="display:none"></div>`
-        moduleStr += `<div class="moduleItem operation"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        treatStr += `<div class="moduleItem medicine"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
+        treatStr += `<div class="moduleItem operation"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
       }else if(moduleList[i].code == 'tips'){
-        moduleStr += `<div class="moduleItem warning"  data-num="${moduleList[i].number}" style="display:none"></div>`
-        moduleStr += `<div class="moduleItem tips"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        moduleStr += `<div class="moduleItem warning"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
+        moduleStr += `<div class="moduleItem tips"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
       }else{
-        moduleStr += `<div class="moduleItem ${moduleList[i].code }"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        moduleStr += `<div class="moduleItem ${moduleList[i].code }"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
       }
     }
    
   }
-  $(".recommendWrap").append(moduleStr)
+  $(".recommendWrap .leftBox").append(moduleStr)
+  $(".recommendWrap .rightBox").append(treatStr)
 }
 function isNeedPush(list){
   let pushCode = ["diag","lis","pacs","symptom","vital"]
@@ -141,4 +159,324 @@ function isNeedPush(list){
     }
   }
   return false
- }
+ }
+ function bindTabClick(){
+  $(".tabList .tab").on("click", function(){
+    $(".activeTab").removeClass("activeTab")
+    $(this).addClass("activeTab")
+    const moduleName = $(this).attr("data-name")
+    getModuleShow(moduleConfig[moduleName])
+  })
+}
+ function getModuleShow(moduleClassName){
+   console.log("moduleClassName",moduleClassName)
+  if( $(`.${moduleClassName}`).css("display") =="none"){
+    $(".moduleWrapper").css("display","none")
+    $(`.${moduleClassName}`).css("display","block")
+  }
+}
+ function setTabNameTop(){
+   tabNameList = $(".tabList .tab .tabName")
+   for(let i = 0; i < tabNameList.length; i++){
+    let tabNameHei = $(".tabList .tab .tabName").eq(i).height()
+    console.log("tabNameHei",tabNameList)
+    $(".tabList .tab .tabName").eq(i).css("marginTop",-tabNameHei/2+"px")
+   }
+ }
+
+ 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 symptomPush = result.symptom ||[]
+      let checkupPush = result.vital ||[]
+      let medicinesPush = result.medicines || []
+      let operationsPush = result.operations ||[]
+      // 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 lisNum = $(".moduleItem.lis").attr("data-num") || 5
+      let pacsNum = $(".moduleItem.pacs").attr("data-num") || 5
+      let checkupNum = $(".moduleItem.vital").attr("data-num") || 5
+      let symptomNum = $(".moduleItem.symptom").attr("data-num") || 5
+      let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
+      let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
+
+      renderLis(lisPush,1,3,true)
+      renderPacs(pacsPush,pacsNum,5,true)
+      renderCheckup(checkupPush,checkupNum,null,true)
+      renderSymptomPush(symptomPush,symptomNum,null,true)
+      renderDiag(diagPush)
+      renderMedicinesPush(medicinesPush,medicinesNum,2,true)
+      renderOperationPush(operationsPush,operationsNum,6,true)
+      // if(hasCompleteTnterface === allInterface){
+      //   $('.loading').css("display","none")
+      //   if(moduleNum === 0){ 
+      //     empty()
+      //   }
+      // }
+      bindOpenInfo()
+      bindSlide()
+    }
+  })
+}
+
+function renderLis(list,showNum,type,hasInfo){
+  if(list.length > 0 &&  $(".moduleItem.lis").length > 0){
+    moduleNum++
+    $('.moduleItem.lis .moduleItemTitBox').append(titleStr("lisPush"))
+    console.log("")
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $('.moduleItem.lis').append(shortStr)
+    $('.moduleItem.lis').append(renderLongStr(titleConfigH["lisPush"].name,longStr))
+    $('.moduleItem.lis').css("display","block")
+  }
+ 
+}
+function renderPacs(list,showNum,type,hasInfo){
+  if(list.length > 0 &&  $(".moduleItem.pacs").length > 0){
+    moduleNum++
+    $('.moduleItem.pacs .moduleItemTitBox').append(titleStr("pacsPush"))
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $(".moduleItem.pacs").append(shortStr)
+    $(".moduleItem.pacs").append(renderLongStr(titleConfigH["pacsPush"].name,longStr))
+    $('.moduleItem.pacs').css("display","block")
+  }
+ 
+}
+function renderSymptomPush(list,showNum,type,hasInfo){
+  if(list.length > 0 &&  $(".moduleItem.symptom").length > 0){
+    moduleNum++
+    $('.moduleItem.symptom .moduleItemTitBox').append(titleStr("symptomPush"))
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $(".moduleItem.symptom").append(shortStr)
+    $(".moduleItem.symptom").append(renderLongStr(titleConfigH["symptomPush"].name,longStr))
+    $('.moduleItem.symptom').css("display","block")
+  }
+ 
+}
+function renderMedicinesPush(list,showNum,type,hasInfo){
+
+  if(list.length > 0 &&  $(".moduleItem.medicine").length > 0){
+    moduleNum++
+    $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $(".moduleItem.medicine").append(shortStr)
+    $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name,longStr))
+    $(".moduleItem.medicine").css("display","block")
+  }
+ 
+}
+function renderOperationPush(list,showNum,type,hasInfo){
+  if(list.length > 0 &&  $(".moduleItem.operation").length > 0){
+    moduleNum++
+    $('.moduleItem.operation .moduleItemTitBox').append(titleStr("operationPush"))
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $(".moduleItem.operation").append(shortStr)
+    $(".moduleItem.operation").append(renderLongStr(titleConfigH["operationPush"].name,longStr))
+    $(".moduleItem.operation").css("display","block")
+  }
+ 
+}
+function renderCheckup(list,showNum,type,hasInfo){
+  if(list.length > 0 &&  $(".moduleItem.vital").length > 0){
+    moduleNum++
+    $(".moduleItem.vital .moduleItemTitBox").append(titleStr("checkupPush"))
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $(".moduleItem.vital").append(shortStr)
+    $(".moduleItem.vital").append(renderLongStr(titleConfigH["checkupPush"].name,longStr))
+    $('.moduleItem.vital').css("display","block")
+  }
+}
+function renderDiag(diagPush){
+  let possibleDiagPush = diagPush["可能诊断"] || []
+  let firstDiagPush = diagPush["初步诊断"] || []
+  let identifyDiagPush = diagPush["鉴别诊断"] || []
+  // let warningDiagPush = diagPush["警惕"] || []
+  let number =  $('.moduleItem.diag').attr("data-num") || 5
+  let warnNumber =  $('.moduleItem.warning').attr("data-num") || 5
+  
+  $('.moduleItem.diag .moduleItemTitBox').append(titleStr("diagPush"))
+  let warningDiagPush = [{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}]
+  renderDiagItem(possibleDiagPush,"可能诊断",number)
+  renderDiagItem(firstDiagPush,"初步诊断",number)
+  renderDiagItem(identifyDiagPush,"鉴别诊断",number)
+  // renderWarningDiag(warningDiagPush,"警惕",warnNumber)
+  moreInfo()
+}
+function renderDiagItem(list,name,number){
+  if(list.length === 0){
+    return
+  }
+  let titleStr = `<span class="moduleBoxName">${name}</span>`
+  let {shortStr, longStr} = renderItemWrapper(list,1,1,true)
+  let boxStr = `<div class="moduleBox">
+        ${titleStr}
+        ${shortStr}
+      </div>`
+  $(".diag").append(boxStr)
+  $(".diag").append(renderLongStr(name,longStr))
+  $('.moduleItem.diag').css("display","block")
+}
+function renderWarningDiag(list,showNum,type,hasInfo){
+  if(list.length > 0 &&  $(".moduleItem.warning").length > 0){
+    moduleNum++
+    $('.moduleItem.warning .moduleItemTitBox').append(titleStr("vigilancePush"))
+    console.log("")
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    $('.moduleItem.warning').append(shortStr)
+    $('.moduleItem.warning').append(renderLongStr(titleConfigH["lisPush"].name,longStr))
+    $('.moduleItem.warning').css("display","block")
+  }
+}
+function renderPushWarning(){
+  return getPusgWarning().then(res =>{
+    hasCompleteTnterface++
+    if(res.data.code == '0'){
+      const result = res.data.data
+      let billMsgList = result.billMsgList || []  //开单合理性提醒
+      let highRiskList = result.highRiskList || []  //高危药品、手术
+      let criticalValList = result.criticalValList || []  //危急值提醒
+      let noteList = result.noteList || []  //检查内容注意事项
+      let dubugStr = result.dubugStr || []  //注意调试信息
+      $('.moduleItem.tips .moduleItemTitBox').append(titleStr('warning'))
+      renderBillingPush(billMsgList,'开单合理性')
+      renderBillingPush(highRiskList,'高风险提示')
+      renderBillingPush(criticalValList,'危急值提醒')
+      renderBillingPush(noteList,'检查注意事项')
+      moreInfo()
+      // renderBillingPush(dubugStr,'注意调试信息')
+     
+    }
+    if(hasCompleteTnterface === allInterface){
+      $('.loading').css("display","none")
+      if(moduleNum === 0){
+        empty()
+      }
+    }
+    
+  })
+}
+function renderBillingPush(list,name){
+  if(list.length === 0){
+    return
+  }
+  let str = ``
+  for(let i = 0; i < list.length; i++){
+    str += `<div class="billingPushItem">${list[i].msg}</div>`
+  }
+  let titleStr = `<span class="moduleBoxName">${name}</span>`
+  let boxStr = `<div class="moduleBox">
+        ${titleStr}
+        ${str}
+      </div>`
+  $(".tips").append(boxStr)
+  $('.moduleItem.tips').css("display","block")
+}
+function renderLongStr(name,longStr){
+  if(!longStr){
+    return
+  }
+  let str = `
+    <div class="longStrBox">
+      <span class="longStrBoxTitle">${name}:</span>
+      ${longStr}
+    </div>  
+  `
+  return str
+
+}
+
+
+function renderItemWrapper(list,showNum,type,hasInfo){
+  let showNum1 = showNum || 5
+  let shortStr = '', longStr = ''
+
+  for(let i = 0; i < list.length; i++){
+    if(i <= showNum1-1){
+      shortStr += renderPushItem(list[i],type)
+    }
+    longStr += renderPushItem(list[i],type)
+  }
+
+  if(showNum1 >= list.length){
+    return {
+      shortStr:`<div class="shortBox">${shortStr}</div>`,
+      longStr:''
+    }
+  }else{
+    shortStr += `<span class="showMore"> <img class="iconArrowImg" src="${showImg}"></span>`
+    longStr += `<span class="showLess"><img class="iconArrowImg"  src="${collapseImg}"></span>`
+    return {
+      shortStr:`<div class="shortBox clearfix">${shortStr}</div>`,
+      longStr:`<div class="longBox clearfix">${longStr}</div>`
+    }
+  }
+}
+function renderPushItem(item,type){
+  str= `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${item.name}</span>${item.hasInfo=="1"?`<img class="infoImg" src="${infoImg}">`:""}</span>`
+return str
+}
+function bindOpenInfo(){
+  $(".infoImg").on("mouseenter", function(){
+    $(this).attr("src", infoImgOn)
+  }).on("mouseleave", function(){
+    $(this).attr("src", infoImg)
+  })
+}
+
+
+function titleStr(type){
+  let titleStr = ''
+  titleStr += `<div class="moduleTitle"><img class="titleIcon" src=${titleConfigH[type].icon}>${titleConfigH[type].name}:</div>`
+  return titleStr
+}
+function bindSlide(){
+  $(".showMore").on("click", function(){
+    $(".longStrBox").css("display","none")
+    $(this).parents(".moduleItem ").find(".longStrBox").css("display","block")
+  })
+  $(".showLess").on("click", function(){
+    $(this).parent().parent().css("display","none")
+  })
+}
+
+function setWidth(){
+  let winWidth = $(".bodyWrap").css("width")
+  $(".contentBox").css("width",winWidth)
+}
+
+//医学知识搜索
+searchMedical()
+function searchMedical(){
+  $(".medicalKonwledgeWrap .search").on("click", function(){
+    openNewWin(`staticSearch.html?searchType=1`)
+  })
+}
+function moreInfo() {
+  $('.infoImg').off("click").click(function(){
+    const name = $(this).parent().attr('data-name')
+    const type = $(this).parent().attr('data-type')
+    openNewWin(`information.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
+  })
+}
+$(function(){
+  $(window).on("resize",function(){
+    setWidth()
+  })
+  $(".versionTop").on("click", function(){
+    openNewWin("disclaimer.html")
+  });
+  $(".versionBottom").on("click", function(){
+    // const ver = localStorage.getItem('versionTime');
+    // $(".version-tip").removeClass('new-icon');
+    // localStorage.setItem('versionTime',ver.replace("=new",""));
+    openNewWin("version.html");
+  });
+})

+ 59 - 1
src/js/promise.js

@@ -203,6 +203,63 @@ const titleConfig = {
     icon: iconOperationPush,
     name:"推荐手术及操作"
   },
+  operationPush2:{
+    background: "#E3FEFE",
+    icon: iconOperationPush,
+    name:"手术/操作"
+  }
+}
+const titleConfigH = {
+  warning:{
+    background: "#FFE8DD",
+    icon: iconWarning,
+    name:"智能警示"
+  },
+  symptomPush:{
+    background: "#EEF5FD",
+    icon: iconSymptomPush,
+    name:"推荐症状"
+  },
+  diagPush:{
+    background: "#FAECED",
+    icon: iconDiagPush,
+    name:"智能诊断"
+  },
+  checkupPush:{
+    background: "#EEF5FD",
+    icon: iconCheckupPush,
+    name:"体格检查"
+  },
+  scalePush:{
+    background: "#ECF4FC",
+    icon: iconScalePush,
+    name:"推荐量表"
+  },
+  lisPush:{
+    background: "#ECF4FC",
+    icon: iconLisPush,
+    name:"推荐检验"
+  },
+  pacsPush:{
+    background: "#ECF4FC",
+    icon: iconPacsPush,
+    name:"推荐检查"
+  },
+  drugPush:{
+    background: "#E3FEFE",
+    icon: iconDrugPush,
+    name:"推荐用药"
+  },
+  operationPush:{
+    background: "#E3FEFE",
+    icon: iconOperationPush,
+    name:"手术/操作"
+  },
+  vigilancePush:{
+    background: "#FFE8DD",
+    icon: iconWarning,
+    name:"警惕"
+  }
 }
 module.exports = {
   config,
@@ -212,5 +269,6 @@ module.exports = {
   throttle,
   openNewWin,
   isIe8,
-  titleConfig
+  titleConfig,
+  titleConfigH
 }

+ 8 - 1
src/js/staticSearch.js

@@ -4,6 +4,7 @@ var $ = require("jquery");
 var { post,config,getUrlArgObject,openNewWin,isIe8 } = require('./promise.js');
 let checkOffImg = require('./../images/check_off.png')
 let checkOnImg = require('./../images/check_on.png')
+let searchType = getUrlArgObject("searchType") || ""
 
 
 let medicalTypesList = []
@@ -14,7 +15,13 @@ if(is8Ie) {
   checkOffImg = checkOffImg.replace(reg, '')
   checkOnImg = checkOnImg.replace(reg, '')
 }
-
+if(searchType == '1'){
+    $(".staticSearchB>ul").css({
+        padding: "0px",
+        left:"0px"
+    })
+    document.title = "医学知识搜索"
+}
 $(".staticSearchT input").keyup(function(e) {
     const ev = e||window.event;
     const val = $(this).val();

+ 1 - 1
webpack.config.js

@@ -338,7 +338,7 @@ module.exports = {
     },
     hot: true,
     // openPage:'index.html?age=28&tipsName=血常规&tipsType=12&diseaseId=280&lisJson=&diagJson=急性胰腺炎&diseaseName=糖尿病&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常,%20报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg&hospitalCode=A001',
-    openPage:'cdss.html?mrId=200821362618001909'
+    openPage:'cdss.html?mrId=200821362618001909&hospitalId=1&planCode=plan_default'
   },
   stats: { children: false }
 }