소스 검색

Merge remote-tracking branch 'origin/test'

zhouna 5 년 전
부모
커밋
c2b944c420
7개의 변경된 파일45개의 추가작업 그리고 189개의 파일을 삭제
  1. 1 1
      src/css/indexHorizontal.less
  2. 1 1
      src/html/index.html
  3. 3 3
      src/js/disclaimer.js
  4. 22 91
      src/js/index.js
  5. 14 88
      src/js/indexHorizontal.js
  6. 2 2
      src/js/indexHorizontalDom.js
  7. 2 3
      src/js/indexVertDom.js

+ 1 - 1
src/css/indexHorizontal.less

@@ -277,7 +277,7 @@
     margin-top: 10px;
 }
 .labAndPacsRecommend  .labAndPacsTitle {
-    padding:5px; 
+    padding: 0 5px; 
     margin-right: 5px;
     background: #e2eaf2;
     border-radius: 4px;

+ 1 - 1
src/html/index.html

@@ -17,7 +17,7 @@
   <div class="bodyWrap">
       <div class="iframeWrap">
         <div class="recommendWrap"></div>
-        <p class="responsibility">以上推送为常见诊断及问诊内容,实际以医生临床判断为准</p>
+        <p class="responsibility"></p>
       </div>
       <div class="disclaimer clearfix">
         <span class="logo">&copy 朗通医疗</span>

+ 3 - 3
src/js/disclaimer.js

@@ -4,9 +4,9 @@ const $ = require("jquery");
 $(function(){
   function getDisclaimer() {
     post(config.disclaimer, '').then((res) => {
-      const data = res.data.data;
-      $("h1").html(data[2].title);
-      $(".content").html(data[2].description);
+      const data = res.data.data.find(item => item.disclaimerCode == '3');
+      $("h1").html('免责声明');
+      $(".content").html(data.description);
     })
   }
   getDisclaimer();

+ 22 - 91
src/js/index.js

@@ -58,103 +58,36 @@ if(mrId) {
 // window.msg = msg
 // window.pushMessage = {}
 function getConf() {
-  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
-        const data = res.data
-        if(data.code == 0){
-            let confArr = transConf(data.data)
-            window.confArr = confArr;
-        }
-  })
+  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
 }
 
 function getPushInfo() {
-  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
-          var data = res.data
-          if(data.code == 0){
-              window.pushInfo = data
-              var result = data.data;
-              // if(result.medicalIndications && result.medicalIndications.length>0){//病情提示
-              //   window.pushMessage = result.medicalIndications;//计算的需要的相关数据
-              //   renderRecommendConditTips('conditTips','病情提示', result.medicalIndications || [])
-              // }
-              if(result.dis){
-                  const diagPossible = result.dis['可能诊断'] || []//可能
-                  const diagDoubt = result.dis['疑似诊断'] || [] // 疑似
-                  const diagDeter = result.dis['确诊'] || []//确诊
-                  const diagWaring = result.dis['警惕'] || [] // 推荐警惕诊断
-                  const symptomRecommend = result.symptom || []  //推荐问诊症状
-                  const physiExamRecommend  = result.vital || [] //推荐体格检查
-                  const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
-                  const labRecommend = result.lab || []
-                  const pacsRecommend = result.pacs || []
-                  const labAndPacsRecommend = [
-                      {
-                          title: '化验',
-                          className: 'labRecommend',
-                          data:  labRecommend
-                      },
-                      {
-                          title: '辅检',
-                          className: 'pacsRecommend',
-                          data:  pacsRecommend
-                    }
-                  ]
-              }
-          }else {
-            window.pushInfo = {}
-          }
-  })
+  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
   
 }
 
 function getTreatment() {
-  return  post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
-          var data = res.data
-          if(data.code == 0){
-            window.treatInfo = data
-          } else {
-            window.treatInfo = {}
-          }
-  })
-  
+  return  post(config.pushTreatment,Object.assign({featureType: '8'},msg))
 }
 
 function getTipsInfo() {
-  post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
-    var data = res.data
-    if(data.code == 0) {
-        window.tipsInfo = data
-    } else {
-      window.tipsInfo = {}
-    }
-    
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
 }
 
 
-// getConf()
-// pushInfo()
-// getTreatment();
 function getPageInfo() {
 
   Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3, res4]) =>{
-    if(pushInfo&&pushInfo.code == 0) {
-      pushResult = pushInfo.data;
-    } else {
-      pushResult = {};
-    }
-    if(treatInfo&&treatInfo.code == 0) {
-      treatResult = treatInfo.data
-    } else {
-      treatResult = {}
-    }
-    if(tipsInfo&&tipsInfo.code == 0) {
-      tipsResult = tipsInfo.data
-    } else {
-      tipsResult = {}
-    }
+    console.log({res1, res2, res3, res4})
+    const configArr = res1&&res1.data&&res1.data.data || []
+    const pushInfo = res2&&res2.data || {}
+    const treatInfo = res3&&res3.data || {}
+    const tipsInfo = res4&&res4.data || {}
+    const confArr = transConf(configArr)
+    pushResult = pushInfo.data || {};
+    treatResult = treatInfo.data || {}
+    tipsResult = tipsInfo.data || {}
+
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
     const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
@@ -210,16 +143,6 @@ function getPageInfo() {
            return
       } 
     }
-  
-    // renderRecommendInfo('warning', '警惕诊断', diagWaring, true,7,2)
-    // renderRecommendInfo('diagRecommend', '推荐诊断', diagRecommend, true,7,2)
-    // renderRecommendInfo('symptomRecommend', '问诊症状', symptomRecommend, false)
-    // renderRecommendInfo('physiExamRecommend', '体格检查', physiExamRecommend, false)
-    // renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
-    // renderTreat('treatRecommend','治疗方案',treatResult) 
-    
-    // renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
-    
   }).catch(function (err) {
     console.log(err);
   })
@@ -247,8 +170,16 @@ function getVersion() {
     }
   })
 }
+  function getDisclaimer() {
+    post(config.disclaimer, '').then((res) => {
+      const data = res.data.data.find(item => item.disclaimerCode == '2');
+      $(".responsibility").html(data.description);
+    })
+  }
+
 
 $(function(){
+  getDisclaimer(); //获取免责声明
   getVersion();   //获取版本信息
   $(".disclaimerInfo").on("click", function(){
     openNewWin("disclaimer.html")

+ 14 - 88
src/js/indexHorizontal.js

@@ -36,7 +36,6 @@ if(mrId) {
     if(data.code == 0) {
       msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
       window.msg = msg
-      window.pushMessage = {} 
       getPageInfo();
     }
   })
@@ -55,7 +54,6 @@ if(mrId) {
     plan:getUrlArgObject('plan') || '0',
   }
   window.msg = msg
-  window.pushMessage = {} 
   getPageInfo();
 }
 
@@ -77,95 +75,33 @@ if(mrId) {
 // window.msg = msg
 // window.pushMessage = {}
 function getConf() {
-  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
-      const data = res.data
-      if(data.code == 0){
-          let confArr = transConf(data.data)
-          window.confArr = confArr;
-      }
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
 }
 
 function getPushInfo() {
-  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
-    var data = res.data
-    if(data.code == 0){
-      window.pushInfo = data
-    } else {
-      window.pushInfo = {}
-    }
-      
-    
-      
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
 }
 
 function getTreatment() {
-  post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
-    var data = res.data
-    if(data.code == 0){
-      window.treatInfo = data
-      } else {
-        window.treatInfo = {}
-      }
-    // if(data.code == 0){
-    //   var result = data.data;
-    //   renderTreat(treatImg, 'treatRecommend','治疗方案',result)
-    //   // var num = 0;
-    //   // if(result.commonTreatment && result.commonTreatment.content){
-    //   //   ++num
-    //   //   ybzlFun(result.commonTreatment.content)//一般治疗
-    //   // }
-    //   // if(result.treatment && result.treatment.length>0){
-    //   //   ++num
-    //   //   cyywFun(result.treatment)//常用药物
-    //   // }
-    //   // if(num == 0){
-    //   //   $(".conditionHintZhiliaoNull").css("display","block")
-    //   // }
-    // } else {
-    //   renderTreat(treatImg,'treatRecommend','治疗方案',{})
-    // }
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.pushTreatment,Object.assign({featureType: '8'},msg))
 }
 
 
 function getTipsInfo() {
-  post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
-    var data = res.data
-    if(data.code == 0) {
-      window.tipsInfo = data
-    }else {
-      window.tipsInfo = {}
-    }
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
 }
 
 function getPageInfo() {
   Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
-    if(pushInfo&&pushInfo.code == 0) {
-      pushResult = pushInfo.data;
-    } else {
-      pushResult = {};
-    }
-    if(treatInfo&&treatInfo.code == 0) {
-      treatResult = treatInfo.data
-    } else {
-      treatResult = {}
-    }
-    if(tipsInfo&&tipsInfo.code == 0) {
-      tipsResult = tipsInfo.data
-    } else {
-      tipsResult = {}
-    }
+    const configArr = res1&&res1.data&&res1.data.data || []
+    const pushInfo = res2.data || {}
+    const treatInfo = res3.data || {}
+    const tipsInfo = res4.data || {}
+    const confArr = transConf(configArr)
+    pushResult = pushInfo.data || {};
+    treatResult = treatInfo.data || {}
+    tipsResult = tipsInfo.data || {}
+    
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
     const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
@@ -191,7 +127,6 @@ function getPageInfo() {
     window.pushMessage = medicalIndications;//计算的需要的相关数据
     let tipsNum = 0;
     for(let i = 0; i < confArr.length; i++) {
-  
       switch(confArr[i].code) {
         case "inquiry_show":  //问诊症状
           renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
@@ -242,7 +177,6 @@ function getPageInfo() {
       })
     
     }
-    // bindTab();
     if(tipsNum === 2) {
       bindTab();
     }
@@ -258,21 +192,13 @@ function getPageInfo() {
     if(pushHei == 0) {
       $('.infomationBox').css({"width":"90%"})
     }
-    // renderRecommendInfo(warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
-    // renderRecommendInfo(diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
-    // renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
-    // renderRecommendInfo(physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
-    // renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
-    // renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult) 
-    
-    // renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
+  
     
   }).catch(function (err) {
     console.log(err);
   })
 
 }
-
 function getVersion() {
   post(config.getVersion, '').then((res) => {
     const data = res.data.data;

+ 2 - 2
src/js/indexHorizontalDom.js

@@ -27,7 +27,7 @@ function renderRecommendInfo(icon, className,title,data, hasInfo, type, position
         for (let i = 0; i < data.length; i++) {
             childrenNodeStr += `<span class="recommendInfoItem recommendInfoItemHasInfo">
                                     ${data[i].name}
-                                    <span  title="点击名称可看详细说明" class="infoMsg" data-name=${data[i].name}></span>
+                                    <span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].name}></span>
                                 </span>`
         }
     } else {
@@ -158,7 +158,7 @@ function renderTreatDrug(className,title,data, parentNode) {
             } else if(data[i].medicitionsList[j].forbidden == '2') {
                 childrenNodeStr += `<span  class="medicineWaringDisMsg">禁用</span>`
             }
-            childrenNodeStr += `<span  title="点击名称可看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>,</span></span>`
+            childrenNodeStr += `<span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>,</span></span>`
             childrenNodeStr += `<span class="${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}">使用率${data[i].medicitionsList[j].rate}</span>`
             if(j === data[i].medicitionsList.length-1) {
                 childrenNodeStr += ';'

+ 2 - 3
src/js/indexVertDom.js

@@ -16,7 +16,7 @@ function renderRecommendInfo(className,title,data, hasInfo, type, position) {
         for (let i = 0; i < data.length; i++) {
             childrenNodeStr += `<span class="recommendInfoItem recommendInfoItemHasInfo">
                                     ${data[i].name}
-                                    <span  title="点击名称可看详细说明" class="infoMsg" data-name=${data[i].name}></span>
+                                    <span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].name}></span>
                                 </span>`
         }
     } else {
@@ -39,7 +39,6 @@ function renderRecommendInfo(className,title,data, hasInfo, type, position) {
 }
 
 function renderMultRecommendInfo(className,title,data, hasInfo, type, position) {
-    console.log('data', data)
     const str = `<div class="recommendInfoWrapper ${className}">
                     <h4><i></i>${title}</h4>
                     <div class="recommendInfoBox ${className + 'box'}"></div>
@@ -156,7 +155,7 @@ function renderTreatDrug(className,title,data, parentNode) {
             } else if(data[i].medicitionsList[j].forbidden == '2') {
                 childrenNodeStr += `<span  class="medicineWaringDisMsg">禁用</span>`
             }
-            childrenNodeStr += `<span  title="点击名称可看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>,</span></span>`
+            childrenNodeStr += `<span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>,</span></span>`
             childrenNodeStr += `<span class="${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}">使用率${data[i].medicitionsList[j].rate}</span>`
             if(j === data[i].medicitionsList.length-1) {
                 childrenNodeStr += ';'