Browse Source

Merge branch 'tipsInfo' into syfTempMaster

zhangxc 5 years ago
parent
commit
96f624fbbc

+ 48 - 9
src/css/indexHorizontal.less

@@ -32,7 +32,7 @@
     border-right: 1px solid #f0efef;
     box-sizing: border-box;
 }
-.treat {
+.infomationBox {
     margin-top: 10px;
     width: 38%;
     float: left;
@@ -68,6 +68,9 @@
         color: #1AB3A9;
     }
 }
+.treatRecommend  {
+    position: absolute;
+}
 .icon{
     display: block;
     width: 20px;
@@ -191,20 +194,23 @@
 .diagName {
     color: #040428;
 }
-.treatItemTitle {
-    font-weight: bold;
-    font-size: 13px;
-    color: #7C828E;
+.treatItemTitle, .tipsTitle {
+    // font-weight: bold;
+    font-size: 14px;
+    color: #000000;
     float: left;
     width: 60px;
     height: 30px;
     line-height: 30px;
     float: left;
 }
-.treat .recommendInfoBox {
+.tipsTitle {
+    margin-top: 10px;
+}
+.infomationBox .recommendInfoBox {
     margin-left: 0px;
 }
-.treat .treatTextBox {
+.infomationBox .treatTextBox {
     margin-left: 80px;
     line-height: 30px;
     height: 90px;
@@ -214,17 +220,26 @@
     // -webkit-box-orient: vertical;
     // -webkit-line-clamp: 3;
 }
-.treat .treatDrugBox {
+.infomationBox .treatDrugBox {
     margin-left: 80px;
     line-height: 30px;
     height: 90px;
     overflow: hidden;
 }
+.tipsInfoBox {
+    margin: 10px 0 0 80px;
+    line-height: 30px;
+    height: 180px;
+    overflow-y: auto;
+    img {
+        display: none;
+    }
+}
 .drugTreatmentInfoItemBox {
     .ellipse;
     height: 30px;
 }
-.treat .treatRecommend {
+.infomationBox .treatRecommend {
     margin-top: 10px;
 }
 .labAndPacsRecommend  .labAndPacsTitle {
@@ -270,3 +285,27 @@
 .disclaimer, .illnessTable {
     cursor: pointer;
 }
+.tipsInfoWrapper  {
+    position: absolute;
+    top: 30px;
+}
+.infoTab {
+    margin-right: 15px;
+    cursor: pointer;
+}
+.activeTab {
+    color: #267FD7;
+    border-bottom: 2px solid #267FD7;
+}
+.moreInfo {
+    display: inline-block;
+    width:42px;
+    height:20px;
+    border-radius:4px;
+    border:1px solid #267FD7;
+    line-height:20px;
+    color: #267FD7;
+    text-align: center;
+    margin-left: 20px;
+    cursor: pointer;
+}

+ 22 - 1
src/css/indexVert.less

@@ -40,6 +40,12 @@
         background-color: #E3FEFE;
     }
 }
+.tipsInfo {
+    h4 {
+        background-color: #E3FEFE;
+    }
+}
+
 
 .conditTips {
     h4 {
@@ -54,6 +60,9 @@
 .treatRecommend 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;
@@ -285,7 +294,7 @@
     padding-right: 15px;
 }
 
-.recommendNull {
+.recommendNull,.TipsInfoNull {
     color: #ADADAD;
 }
 .treatItemTitle {
@@ -294,4 +303,16 @@
 }
 .disclaimerInfo {
     cursor: pointer;
+}
+.moreInfo {
+    display: inline-block;
+    width:42px;
+    height:20px;
+    border-radius:4px;
+    border:1px solid #267FD7;
+    line-height:20px;
+    color: #267FD7;
+    text-align: center;
+    margin-left: 20px;
+    cursor: pointer;
 }

+ 3 - 1
src/html/indexHorizontal.html

@@ -21,7 +21,9 @@
             <span class="logo">智<br/>能<br/>推<br/>送<br/>仅<br/>供<br/>参<br/>考<br/>&copy; <br/>朗<br/>通<br/>医<br/>疗</span>
           </div>
             <div class="push"></div>
-            <div class="treat"></div>
+            <div class="infomationBox clearfix">
+              <div class="infoTabBox"></div>
+            </div> 
         </div>
         <!-- <p class="responsibility">以上推送为常见诊断及问诊内容,实际以医生临床判断为准</p> -->
       </div>

+ 137 - 76
src/js/index.js

@@ -7,9 +7,22 @@ var Promise = require("bluebird");
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
 const { transConf } = require('./util.js');
-const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips } = require('./indexVertDom.js');
+const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo } = require('./indexVertDom.js');
 
-var msg = {
+let mrId = getUrlArgObject('mrId') 
+let msg;
+if(mrId) {
+ post(config.getMr,{mrId:mrId}).then((res) => {
+    const data = res.data
+    if(data.code == 0) {
+      msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
+      window.msg = msg
+      window.pushMessage = {} 
+      getPageInfo();
+    }
+  })
+} else {
+  msg = {
     age: getUrlArgObject('age'),
     sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
     symptom: getUrlArgObject('symptomJson'),
@@ -21,10 +34,29 @@ var msg = {
     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
     hosCode:getUrlArgObject('hospitalCode') || '',
     plan:getUrlArgObject('plan') || '0',
-}//推送相关信息
-//   http://localhost:8082/indexVert.html?age=28&diseaseId=280&lisJson=&diagJson=%E6%80%A5%E6%80%A7%E8%83%B0%E8%85%BA%E7%82%8E&pastJson=%E6%97%A0%E5%BF%83%E8%84%8F%E7%97%85&otherJson=%E6%97%A0%E9%AB%98%E8%A1%80%E5%8E%8B&pacsJson=%E8%85%B9%E9%83%A8B%E8%B6%85:%E6%97%A0%E5%BC%82%E5%B8%B8,%20%E6%8A%A5%E5%91%8A%E6%97%A5%E6%9C%9F:2019-05-07&sex=%E7%94%B7&symptomJson=%E6%81%B6%E5%BF%83%E5%91%95%E5%90%90%E8%85%B0%E7%97%9B&vitalJson=%E8%A1%80%E5%8E%8B%E5%B7%A6%E4%B8%8A%E8%82%A213/12mmHg
-window.msg = msg
-window.pushMessage = {}
+  }
+  window.msg = msg
+  window.pushMessage = {} 
+  getPageInfo();
+}
+
+
+// var msg = {
+//     age: getUrlArgObject('age'),
+//     sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
+//     symptom: getUrlArgObject('symptomJson'),
+//     vital: getUrlArgObject('vitalJson'),
+//     lis: getUrlArgObject('lisJson')? JSON.parse(getUrlArgObject('lisJson')) : [],
+//     pacs: getUrlArgObject('pacsJson'),
+//     diag: getUrlArgObject('diagJson'),
+//     diseaseName: getUrlArgObject('diagJson'),
+//     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+//     hosCode:getUrlArgObject('hospitalCode') || '',
+//     plan:getUrlArgObject('plan') || '0',
+// }//推送相关信息
+// //   http://localhost:8082/indexVert.html?age=28&diseaseId=280&lisJson=&diagJson=%E6%80%A5%E6%80%A7%E8%83%B0%E8%85%BA%E7%82%8E&pastJson=%E6%97%A0%E5%BF%83%E8%84%8F%E7%97%85&otherJson=%E6%97%A0%E9%AB%98%E8%A1%80%E5%8E%8B&pacsJson=%E8%85%B9%E9%83%A8B%E8%B6%85:%E6%97%A0%E5%BC%82%E5%B8%B8,%20%E6%8A%A5%E5%91%8A%E6%97%A5%E6%9C%9F:2019-05-07&sex=%E7%94%B7&symptomJson=%E6%81%B6%E5%BF%83%E5%91%95%E5%90%90%E8%85%B0%E7%97%9B&vitalJson=%E8%A1%80%E5%8E%8B%E5%B7%A6%E4%B8%8A%E8%82%A213/12mmHg
+// window.msg = msg
+// window.pushMessage = {}
 function getConf() {
   return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
         const data = res.data
@@ -128,82 +160,111 @@ function getTreatment() {
   
 }
 
+function getTipsInfo() {
+  post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
+    var data = res.data
+    window.tipsInfo = data
+  })
+}
+
+
 // getConf()
 // pushInfo()
 // getTreatment();
-Promise.all([getConf(),getPushInfo(),getTreatment()]).then(([res1, res2, res3]) =>{
-  if(pushInfo.code == 0) {
-    pushResult = pushInfo.data;
-  } else {
-    pushResult = {};
-  }
-  if(treatInfo.code == 0) {
-    treatResult = treatInfo.data
-  } else {
-    treatResult = {}
-  }
-  const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
-  const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
-  const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
-  const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
-  const symptomRecommend = pushResult.symptom || []  //推荐问诊症状
-  const physiExamRecommend  = pushResult.vital || [] //推荐体格检查
-  const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
-  const labRecommend = pushResult.lab || []
-  const pacsRecommend = pushResult.pacs || []
-  const medicalIndications = pushResult.medicalIndications || []
-  const labAndPacsRecommend = [
-    {
-        title: '化验',
-        className: 'labRecommend',
-        data:  labRecommend
-    },
-    {
-        title: '辅检',
-        className: 'pacsRecommend',
-        data:  pacsRecommend
-    }
-  ]
-  window.pushMessage = medicalIndications;//计算的需要的相关数据
-  for(let i = 0; i < confArr.length; i++) {
+function getPageInfo() {
 
-    switch(confArr[i].code) {
-      case "inquiry_show":  //问诊症状
-        renderRecommendInfo('symptomRecommend', '问诊症状', symptomRecommend, false)
-        break; 
-      case "health_show": //体格检查
-        renderRecommendInfo('physiExamRecommend', '体格检查', physiExamRecommend, false)
-        break;
-      case "illness_show": //病情提示
-        renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
-        break;
-      case "vigilant_show": //警惕诊断
-        renderRecommendInfo('warning', '警惕诊断', diagWaring, true,7,2)
-        break;
-      case "lispacs_show": //检验检查
-        renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
-        break;
-      case "cure_show": //治疗方案
-        renderTreat('treatRecommend','治疗方案',treatResult)
-        break;
-      case "diagnose_show": //推荐诊断
-        renderRecommendInfo('diagRecommend', '推荐诊断', diagRecommend, true,7,2)
-        break;
-      default:
-         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) 
+  Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3, res4]) =>{
+    if(pushInfo.code == 0) {
+      pushResult = pushInfo.data;
+    } else {
+      pushResult = {};
+    }
+    if(treatInfo.code == 0) {
+      treatResult = treatInfo.data
+    } else {
+      treatResult = {}
+    }
+    if(tipsInfo.code == 0) {
+      tipsResult = tipsInfo.data
+    } else {
+      tipsResult = {}
+    }
+    const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
+    const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
+    const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
+    const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
+    const symptomRecommend = pushResult.symptom || []  //推荐问诊症状
+    const physiExamRecommend  = pushResult.vital || [] //推荐体格检查
+    const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
+    const labRecommend = pushResult.lab || []
+    const pacsRecommend = pushResult.pacs || []
+    const medicalIndications = pushResult.medicalIndications || []
+    const labAndPacsRecommend = [
+      {
+          title: '化验',
+          className: 'labRecommend',
+          data:  labRecommend
+      },
+      {
+          title: '辅检',
+          className: 'pacsRecommend',
+          data:  pacsRecommend
+      }
+    ]
+    window.pushMessage = medicalIndications;//计算的需要的相关数据
+    for(let i = 0; i < confArr.length; i++) {
   
-  // renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
+      switch(confArr[i].code) {
+        case "inquiry_show":  //问诊症状
+          renderRecommendInfo('symptomRecommend', '问诊症状', symptomRecommend, false)
+          break; 
+        case "health_show": //体格检查
+          renderRecommendInfo('physiExamRecommend', '体格检查', physiExamRecommend, false)
+          break;
+        case "illness_show": //病情提示
+          renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
+          break;
+        case "vigilant_show": //警惕诊断
+          renderRecommendInfo('warning', '警惕诊断', diagWaring, true,7,2)
+          break;
+        case "lispacs_show": //检验检查
+          renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
+          break;
+        case "cure_show": //治疗方案
+          renderTreat('treatRecommend','治疗方案',treatResult)
+          break;
+        case "diagnose_show": //推荐诊断
+          renderRecommendInfo('diagRecommend', '推荐诊断', diagRecommend, true,7,2)
+          break;
+        case "tip_show": //提示信息
+          renderTipsInfo('tipsInfo','提示信息',tipsResult)
+          moreInfo()
+          break;
+        default:
+           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 || [])
+    
+  })
+
+
+}
+function moreInfo() {
+  $('.moreInfo').click(function(){
+    const name = $(this).attr('data-name')
+    const type = getUrlArgObject('tipsType')
+    openNewWin(`information.html?type=${type}&position=0&name=${name}`)
+  })
+}
 
 
 $(".disclaimerInfo").on("click", function(){

+ 168 - 83
src/js/indexHorizontal.js

@@ -16,7 +16,7 @@ let treatImg = require('./../images/zhiliao.png')
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin, isIe8 } = require('./promise.js');
 const { transConf } = require('./util.js');
-const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips } = require('./indexHorizontalDom.js');
+const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo } = require('./indexHorizontalDom.js');
 const is8Ie = isIe8() //判断是否为IE8
 if(is8Ie) {
   let reg = /undefined/g
@@ -29,7 +29,21 @@ if(is8Ie) {
   treatImg = treatImg.replace(reg, '')
 }
 
-var msg = {
+let mrId = getUrlArgObject('mrId') 
+let showTab = getUrlArgObject('showTab') || '0';
+let msg;
+if(mrId) {
+ post(config.getMr,{mrId:mrId}).then((res) => {
+    const data = res.data
+    if(data.code == 0) {
+      msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
+      window.msg = msg
+      window.pushMessage = {} 
+      getPageInfo();
+    }
+  })
+} else {
+  msg = {
     age: getUrlArgObject('age'),
     sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
     symptom: getUrlArgObject('symptomJson'),
@@ -41,10 +55,29 @@ var msg = {
     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
     hosCode:getUrlArgObject('hospitalCode') || '',
     plan:getUrlArgObject('plan') || '0',
-}//推送相关信息
-//   http://localhost:8082/indexVert.html?age=28&diseaseId=280&lisJson=&diagJson=%E6%80%A5%E6%80%A7%E8%83%B0%E8%85%BA%E7%82%8E&pastJson=%E6%97%A0%E5%BF%83%E8%84%8F%E7%97%85&otherJson=%E6%97%A0%E9%AB%98%E8%A1%80%E5%8E%8B&pacsJson=%E8%85%B9%E9%83%A8B%E8%B6%85:%E6%97%A0%E5%BC%82%E5%B8%B8,%20%E6%8A%A5%E5%91%8A%E6%97%A5%E6%9C%9F:2019-05-07&sex=%E7%94%B7&symptomJson=%E6%81%B6%E5%BF%83%E5%91%95%E5%90%90%E8%85%B0%E7%97%9B&vitalJson=%E8%A1%80%E5%8E%8B%E5%B7%A6%E4%B8%8A%E8%82%A213/12mmHg
-window.msg = msg
-window.pushMessage = {}
+  }
+  window.msg = msg
+  window.pushMessage = {} 
+  getPageInfo();
+}
+
+
+// var msg = {
+//     age: getUrlArgObject('age'),
+//     sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
+//     symptom: getUrlArgObject('symptomJson'),
+//     vital: getUrlArgObject('vitalJson'),
+//     lis: getUrlArgObject('lisJson')? JSON.parse(getUrlArgObject('lisJson')) : [],
+//     pacs: getUrlArgObject('pacsJson'),
+//     diag: getUrlArgObject('diagJson'),
+//     diseaseName: getUrlArgObject('diagJson'),
+//     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+//     hosCode:getUrlArgObject('hospitalCode') || '',
+//     plan:getUrlArgObject('plan') || '0',
+// }//推送相关信息
+// //   http://localhost:8082/indexVert.html?age=28&diseaseId=280&lisJson=&diagJson=%E6%80%A5%E6%80%A7%E8%83%B0%E8%85%BA%E7%82%8E&pastJson=%E6%97%A0%E5%BF%83%E8%84%8F%E7%97%85&otherJson=%E6%97%A0%E9%AB%98%E8%A1%80%E5%8E%8B&pacsJson=%E8%85%B9%E9%83%A8B%E8%B6%85:%E6%97%A0%E5%BC%82%E5%B8%B8,%20%E6%8A%A5%E5%91%8A%E6%97%A5%E6%9C%9F:2019-05-07&sex=%E7%94%B7&symptomJson=%E6%81%B6%E5%BF%83%E5%91%95%E5%90%90%E8%85%B0%E7%97%9B&vitalJson=%E8%A1%80%E5%8E%8B%E5%B7%A6%E4%B8%8A%E8%82%A213/12mmHg
+// window.msg = msg
+// window.pushMessage = {}
 function getConf() {
   return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
       const data = res.data
@@ -148,85 +181,137 @@ function getTreatment() {
     // }
   })
 }
-// getConf();
-// pushInfo();
-// getTreatment();
-Promise.all([getConf(),getPushInfo(),getTreatment()]).then(([res1, res2, res3]) =>{
-  if(pushInfo.code == 0) {
-    pushResult = pushInfo.data;
-  } else {
-    pushResult = {};
-  }
-  if(treatInfo.code == 0) {
-    treatResult = treatInfo.data
-  } else {
-    treatResult = {}
-  }
-  const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
-  const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
-  const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
-  const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
-  const symptomRecommend = pushResult.symptom || []  //推荐问诊症状
-  const physiExamRecommend  = pushResult.vital || [] //推荐体格检查
-  const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
-  const labRecommend = pushResult.lab || []
-  const pacsRecommend = pushResult.pacs || []
-  const medicalIndications = pushResult.medicalIndications || []
-  const labAndPacsRecommend = [
-    {
-        title: '化验',
-        className: 'labRecommend',
-        data:  labRecommend
-    },
-    {
-        title: '辅检',
-        className: 'pacsRecommend',
-        data:  pacsRecommend
+
+
+function getTipsInfo() {
+  post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
+    var data = res.data
+    window.tipsInfo = data
+  })
+}
+
+function getPageInfo() {
+  Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
+    if(pushInfo.code == 0) {
+      pushResult = pushInfo.data;
+    } else {
+      pushResult = {};
     }
-  ]
-  window.pushMessage = medicalIndications;//计算的需要的相关数据
-  for(let i = 0; i < confArr.length; i++) {
-
-    switch(confArr[i].code) {
-      case "inquiry_show":  //问诊症状
-        renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
-        break; 
-      case "health_show": //体格检查
-        renderRecommendInfo(physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
-        break;
-      case "illness_show": //病情提示
-        renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
-        break;
-      case "vigilant_show": //警惕诊断
-        renderRecommendInfo(warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
-        break;
-      case "lispacs_show": //检验检查
-        renderMultRecommendInfo(labAndPacsImg, 'labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
-        break;
-      case "cure_show": //治疗方案
-        renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult)
-        break;
-      case "diagnose_show": //推荐诊断
-        renderRecommendInfo(diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
-        break;
-      default:
-         return
-    } 
-  }
-  const pushHei = $('.push').height()
-  if(pushHei == 0) {
-    $('.treat').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 || [])
+    if(treatInfo.code == 0) {
+      treatResult = treatInfo.data
+    } else {
+      treatResult = {}
+    }
+    if(tipsInfo.code == 0) {
+      tipsResult = tipsInfo.data
+    } else {
+      tipsResult = {}
+    }
+    const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
+    const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
+    const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
+    const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
+    const symptomRecommend = pushResult.symptom || []  //推荐问诊症状
+    const physiExamRecommend  = pushResult.vital || [] //推荐体格检查
+    const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
+    const labRecommend = pushResult.lab || []
+    const pacsRecommend = pushResult.pacs || []
+    const medicalIndications = pushResult.medicalIndications || []
+    const labAndPacsRecommend = [
+      {
+          title: '化验',
+          className: 'labRecommend',
+          data:  labRecommend
+      },
+      {
+          title: '辅检',
+          className: 'pacsRecommend',
+          data:  pacsRecommend
+      }
+    ]
+    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)
+          break; 
+        case "health_show": //体格检查
+          renderRecommendInfo(physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
+          break;
+        case "illness_show": //病情提示
+          renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
+          break;
+        case "vigilant_show": //警惕诊断
+          renderRecommendInfo(warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
+          break;
+        case "lispacs_show": //检验检查
+          renderMultRecommendInfo(labAndPacsImg, 'labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
+          break;
+        case "cure_show": //治疗方案
+          tipsNum++;
+          renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult)
+          break;
+        case "diagnose_show": //推荐诊断
+          renderRecommendInfo(diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
+          break;
+        case "tip_show": //提示信息
+          tipsNum++;
+          renderTipsInfo('', 'tipsInfo','提示信息',tipsResult)
+          moreInfo()
+          break;
+        default:
+           return
+      } 
+    }
+    
+    function bindTab() {
+      if(showTab == '1') {
+          $('.infoTabBox .tipsTab').addClass('activeTab')
+          $('.infomationBox .treatRecommend').css("display","none")
+      } else {
+        $('.infoTabBox .treatTab').addClass('activeTab')
+        $('.infomationBox .tipsInfo').css("display","none")
+      }
+
+      $('.infomationBox .infoTab').click(function() {
+        $(this).addClass('activeTab').siblings().removeClass('activeTab')
+        $('.informationBox').css("display","none")
+        const boxNode = $(this).attr('data-box')
+        $('.'+boxNode).css("display","block")
+      })
+    
+    }
+    // bindTab();
+    if(tipsNum === 2) {
+      bindTab();
+    }
+    function moreInfo() {
+      $('.moreInfo').click(function(){
+        const name = $(this).attr('data-name')
+        const type = getUrlArgObject('tipsType')
+        openNewWin(`information.html?type=${type}&position=0&name=${name}`)
+      })
+    }
+    
+    const pushHei = $('.push').height()
+    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 || [])
+    
+  })
+
+}
+
 
 
 $(".disclaimerInfo").on("click", function(){

+ 71 - 7
src/js/indexHorizontalDom.js

@@ -1,9 +1,10 @@
 const $ = require("jquery");
-const { openNewWin, isIe8 } = require('./promise.js');
+const { openNewWin, imageUrlPrefix, isIe8 } = require('./promise.js');
 const { bindTipsEvent } = require('./popupEdit.js');
 let showImg = require('./../images/show.png')
 let collapseImg = require('./../images/collapse.png')
 
+
 const is8Ie = isIe8() //判断是否为IE8
 if(is8Ie) {
   let reg = /undefined/g
@@ -99,11 +100,12 @@ function renderMultRecommendInfo(icon, className,title,data, hasInfo, type, posi
 }
 
 function renderTreat(icon, className,title, data) {
-    const str = `<div class="recommendInfoWrapper ${className} clearfix">
-                    <h4><img src=${icon} title="${title}" class="icon">${title}:<span class="diagName">${msg.diag}</span></h4>
+    $('.infoTabBox').append(`<span class="infoTab treatTab"  data-box="${className}">${title}</span>`)
+    const str = `<div class="informationBox recommendInfoWrapper ${className} clearfix">
+                    <span class="diagName">${msg.diag}</span>
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </div>`
-    $('.treat').append(str)
+    $('.infomationBox').append(str)
     const commonTreatmentInfo = data.commonTreatment&&data.commonTreatment.content || ""
     const treatmentList = data.treatment || []
     renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, className+'box')
@@ -128,7 +130,7 @@ function renderTreatText(className,title,data, parentNode) {
     if(commonTreatHeight > 75){
         $(".treatTextBox").append('<span class="more">更多</span>')
     }
-    $(".treat .treatTextBox").on('click',".more",function(){
+    $(".infomationBox .treatTextBox").on('click',".more",function(){
         openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
       })
     
@@ -178,7 +180,7 @@ function renderTreatDrug(className,title,data, parentNode) {
     } else if(drugTreatmentHeight > 30) {
         $(".drugTreatmentInfo").append('<span class="more">更多</span>')
     }
-    $(".treat .drugTreatmentbox").on('click',".more",function(){
+    $(".infomationBox .drugTreatmentbox").on('click',".more",function(){
         openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
       })
     var treatList = $(".drugTreatmentInfo").find(".drugTreatmentInfoItemBox")
@@ -197,6 +199,67 @@ function renderTreatDrug(className,title,data, parentNode) {
     // }
 }
 
+function renderTipsInfo(icon, className,title,data) {
+  
+    $('.infoTabBox').append(`<span class="infoTab tipsTab" data-box="${className}">${title}</span>`)
+    let str
+    if(!data.name) {
+        str = `<div class="informationBox tipsInfoWrapper ${className} clearfix">
+            <p class="diagName recommendNull">暂无数据</p>
+            <div class="tipsInfoBox clearfix ${className + 'box'}"></div>
+        </div>`
+    } else {
+        str = `<div class="informationBox tipsInfoWrapper ${className} clearfix">
+                    <p class="diagName">${data.name} <span class="moreInfo" data-name="${data.name}">详情</span></p>
+                    <p class="tipsTitle">诊断依据:</p>
+                    <div class="tipsInfoBox clearfix ${className + 'box'}"></div>
+                </div>`
+    }
+    
+    $('.infomationBox').append(str)
+    if(data.name) {
+        renderTipsInfoText('','诊断依据',data.details,className + 'box')
+    }
+}
+
+
+function renderTipsInfoText(className,title,data, parentNode) {
+    let childrenNodeBoxStr = ``
+    if(data.length === 0) {
+        childrenNodeBoxStr += `<p class="recommendNull">暂无数据</p>
+                                
+                            `
+    } else {
+        for(let i = 0; i < data.length; i++) {
+            childrenNodeBoxStr += `<p>${data[i].title}</p>
+                                    ${data[i].content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}
+                                `
+        }
+    }
+   
+    // const childrenNodeBoxStr = `
+    //     <div class = "treatItemBox ${className + 'box'}">
+    //         <p class="treatItemTitle">${title}:</p>
+    //         <div class="treatTextBox">
+    //             <p class="${className + 'Info'} clearfix"></p>
+    //         </div>
+    //     </div>
+    // `
+    $('.' + parentNode).append(childrenNodeBoxStr)
+    // if(!data) {
+    //     data = '<span class="recommendNull">暂无推荐</span>'
+    // }
+    // $('.' + className+'Info').html(data)
+    // var commonTreatHeight = $(".commonTreatmentInfo").height()
+    // if(commonTreatHeight > 75){
+    //     $(".treatTextBox").append('<span class="more">更多</span>')
+    // }
+    // $(".treat .treatTextBox").on('click',".more",function(){
+    //     openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
+    //   })
+    
+}
+
 function renderRecommendConditTips(icon, className,title,data) {
     const str = `<div class="recommendInfoWrapper ${className} clearfix">
                     <h4><img src=${icon} title="${title}" class="icon">${title}:</h4>
@@ -262,5 +325,6 @@ module.exports = {
     renderRecommendInfo,
     renderMultRecommendInfo,
     renderTreat,
-    renderRecommendConditTips
+    renderRecommendConditTips,
+    renderTipsInfo
 }

+ 41 - 3
src/js/indexVertDom.js

@@ -1,5 +1,5 @@
 const $ = require("jquery");
-const { openNewWin } = require('./promise.js');
+const { openNewWin,imageUrlPrefix } = require('./promise.js');
 const { bindTipsEvent } = require('./popupEdit.js');
 
 function renderRecommendInfo(className,title,data, hasInfo, type, position) {
@@ -43,7 +43,7 @@ function renderMultRecommendInfo(className,title,data, hasInfo, type, position)
                     <h4><i></i>${title}</h4>
                     <div class="recommendInfoBox ${className + 'box'}"></div>
                 </div>`
-    $('.recommendWrap').append(str)
+    $('.recommendInfoWrapper').append(str)
     for(let i = 0; i < data.length; i++) {
         let childrenNodeBoxStr  = `<div class="labAndPacsBox ${data[i].className} clearfix"> </div>`
         let childrenNodeStr =  `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
@@ -60,6 +60,43 @@ function renderMultRecommendInfo(className,title,data, hasInfo, type, position)
 
 }
 
+function renderTipsInfo(className,title, data) {
+    const str = `<div class="recommendInfoWrapper ${className}">
+                    <h4><i></i>${title}</h4>
+                    <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
+                </div>`
+    $('.recommendWrap').append(str)
+    if(data.name) {
+        renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
+    } else {
+        // renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
+        $('.' + className+'box').append('<p class="TipsInfoNull">暂无数据</p>')
+    }
+}
+
+function renderTipsInfoMsg(className,title,data, parentNode) {
+    const childrenNodeBoxStr = `
+        <div class = "treatItemBox ${className + 'box'}">
+            <p class="treatItemTitle">${title} <span class="moreInfo" data-name="${title}">详情</span></p>
+            <p class="${className + 'Info'} clearfix"></p>
+        </div>
+    `
+    $('.' + parentNode).append(childrenNodeBoxStr)
+    let dataStr = ``
+    if(data.length === 0) {
+        dataStr += `<p class="TipsInfoNull">暂无数据</p>
+                            `
+    } else {
+        for(let i = 0; i < data.length; i++) {
+            dataStr += `<p>${data[i].title}</p>
+                                    ${data[i].content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}
+                        `
+        }
+    }
+    
+    $('.' + className+'Info').html(dataStr)
+}
+
 function renderTreat(className,title, data) {
     const str = `<div class="recommendInfoWrapper ${className}">
                     <h4><i></i>${title}${msg.diag?'('+msg.diag+')':''}</h4>
@@ -304,5 +341,6 @@ module.exports = {
     renderRecommendInfo,
     renderMultRecommendInfo,
     renderTreat,
-    renderRecommendConditTips
+    renderRecommendConditTips,
+    renderTipsInfo
 }

+ 2 - 1
src/js/promise.js

@@ -30,7 +30,8 @@ const config = {
   information: '/api/data/conceptDetail/getConceptDetail',
   pushScale: '/api/data/push/pushScale',
   pushTreatment: '/api/data/push/pushTreatment',
-  getSysSetInfoDatas: '/api/data/sysSet/getSysSetInfoDatas'
+  getSysSetInfoDatas: '/api/data/sysSet/getSysSetInfoDatas',
+  getMr: '/api/data/mr/getMr'
 }
 const imageUrlPrefix = 'http://192.168.2.241:82';
 const getUrlArgObject = function(parm) {  

+ 2 - 2
webpack.config.js

@@ -4,7 +4,7 @@ const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
-const proxyHost = "http://192.168.2.236:5050";
+const proxyHost = "http://192.168.2.241:5050";
 module.exports = {
   entry: {
     index: path.resolve(__dirname, 'src/js', 'index.js'),
@@ -245,6 +245,6 @@ module.exports = {
       '/api': proxyHost
     },
     hot: true,
-    openPage:'index.html?age=28&diseaseId=280&lisJson=&diagJson=急性胰腺炎&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常,%20报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg&hospitalCode=A001'
+    openPage:'index.html?age=28&plan=2&showTab=1&diseaseId=280&tipsName=血常规&tipsType=12&lisJson=&diagJson=急性胰腺炎&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常,%20报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg&hospitalCode=A001'
   }
 }