فهرست منبع

Merge remote-tracking branch 'origin/treatmentPlan' into testMerged

# Conflicts:
#	src/css/common.less
zhouna 5 سال پیش
والد
کامیت
ebce7522a4

+ 6 - 1
src/css/common.less

@@ -5,7 +5,7 @@
 @colorWaring:#FF545B; //警惕
 @bgcPlan:#E3FEFE; //治疗
 @bgcMay:#FAEBEC; //疑似,警惕,可能
-@bgcModal:#DFEAFE; //弹窗头 
+@bgcModal:#DFEAFE; //弹窗头
 .disCopy {
     -webkit-touch-callout: none;
     -webkit-user-select: none;
@@ -13,4 +13,9 @@
     -moz-user-select: none;
     -ms-user-select: none;
     user-select: none;
+}
+.ellipsis{
+    white-space: nowrap;/*强制在一行显示*/
+	text-overflow:ellipsis;/*设置超出内容显示...*/
+	overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
 }

+ 41 - 14
src/css/indexHorizontal.less

@@ -167,7 +167,7 @@
     .mayIllness{
         float: left;
         position: relative;
-        top: 0px;
+        top: -2px;
     }
 }
 .recommendInfoItem,.diagNameBox {
@@ -240,8 +240,8 @@
     color: #000000;
     float: left;
     width: 60px;
-    height: 30px;
-    line-height: 30px;
+    height: 20px;
+    line-height: 20px;
     float: left;
 }
 .tipsTitle {
@@ -252,8 +252,8 @@
 }
 .infomationBox .treatTextBox {
     margin-left: 80px;
-    line-height: 30px;
-    height: 90px;
+    line-height: 20px;
+    max-height: 60px;
     overflow:hidden;
     // text-overflow:ellipsis; 
     // display: -webkit-box;
@@ -262,14 +262,14 @@
 }
 .infomationBox .treatDrugBox {
     margin-left: 80px;
-    line-height: 30px;
-    height: 90px;
+    line-height: 20px;
+    max-height: 120px;
     overflow: hidden;
 }
 .tipsInfoBox {
     margin: 10px 0 0 0px;
     line-height: 20px;
-    height: 180px;
+    height: 211px; 
     overflow-y: auto;
     img {
         display: none;
@@ -281,7 +281,7 @@
 }
 .drugTreatmentInfoItemBox {
     .ellipse;
-    height: 30px;
+    height: 20px;
 }
 .infomationBox .treatRecommend {
     margin-top: 10px;
@@ -302,13 +302,11 @@
     display: inline-block;
     padding-right: 15px;
 }
-.treatRecommendbox {
-    margin-top: 10px;
-}
+
 .treatItemBox .more{
     bottom: 0;
-    height: 30px;
-    line-height: 30px;
+    height: 20px;
+    line-height: 20px;
 }
 .itemAllBox h4{
     float: left;
@@ -332,6 +330,7 @@
 }
 .disclaimer, .illnessTable {
     cursor: pointer;
+    color: #267FD7;
 }
 .tipsInfoWrapper  {
     position: relative;
@@ -409,4 +408,32 @@ color: @grayColor;
 }
 .boldFont {
     font-weight: bold;
+}
+.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 {
+    .more {
+        background: #fff;
+        top: 0;
+        z-index: 2;
+    }
 }

+ 34 - 4
src/css/indexVert.less

@@ -300,10 +300,7 @@
         margin-right: 15px;
     }
 }
-.labRecommend {
-    border-bottom: 1px solid #D1D1D1;
-    margin: 5px 0;
-}
+
 .labAndPacsTitle {
     border-right: 2px solid #ADADAD;
     padding-right:5px; 
@@ -371,4 +368,37 @@
     color: #040428;
     text-decoration: underline;
     cursor: pointer;
+}
+.line {
+    width: 100%;
+    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;
+    }
 }

+ 0 - 1
src/css/reset.css

@@ -46,7 +46,6 @@ li {
   list-style: none;
 }
 a {
-  text-decoration: none;
   color: #000;
 }
 button {

+ 129 - 0
src/css/treatPlan.less

@@ -0,0 +1,129 @@
+.conditionHintZhiliao {
+    padding: 10px 20px 0;
+    overflow-y: auto;
+    h4 {
+        font-size: 18px;
+        margin: 15px 0;
+    }
+    .diseaseName {
+        font-size: 18px;
+    }
+}
+.diagBox{
+    border: 1px solid #d2d2d2;
+    margin: 10px 0;
+    padding: 10px 10px 0;
+}
+.treatPlan,.treatDrug{
+    position: relative;
+    line-height: 36px;
+    min-height: 36px;
+  
+}
+.treatPlanBg,.treatDrugBg {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 1;
+}
+.treatPlanBg {
+    background: #2fc79c;
+    opacity: 0.1;
+    filter:alpha(opacity=10);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=10);";
+}
+.treatDrugBg {
+    background: #EAF7FA;
+}
+.treatPlanTitle, .treatDrugTitle {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 2;
+    font-weight: 600;
+}
+.drugCategoryBox {
+    position: relative;
+    line-height: 36px;
+    // border-bottom: 1px dashed #d2d2d2;
+}
+.drugNameBox {
+    padding-right: 15px;
+    position: relative;
+    display: inline-block;
+
+}
+.drugName{
+    display: inline-block;
+    text-decoration:underline;
+}
+.infoMsg {
+    position: absolute;
+    right: 1px;
+    top: 10px;
+    display: none;
+    width: 14px;
+    height: 14px;
+    background: url(/images/msg1.png) center center no-repeat;
+    cursor: pointer;
+}
+
+.infoMsg:hover {
+    background: url(/images/msg2.png) center center no-repeat;
+}
+.drugNameBox:hover {
+    .infoMsg {
+        display: inline-block;
+    }
+}
+.diagTitle {
+    color: #3b9ed0;
+    position: relative;
+    margin: 10px 0 10px 0;
+    font-weight: 500;
+    i {
+        position: relative;
+        display: inline-block;
+        width: 4px;
+        height: 4px;
+        background: #3b9ed0;
+        border-radius: 50%;
+        top: -4px;
+        margin-right: 6px;
+    }
+}
+.diagDescription{
+    margin: 5px 0 10px;
+    line-height: 28px;
+    background:#F2F2F2;
+    padding: 5px 10px;
+}
+.icon {
+    width: 16px;
+    float: left;
+    margin: 10px;
+}
+.commonTreat {
+    line-height: 36px;
+}
+.infoFlag {
+    display: inline-block;
+    width: 34px;
+    height: 16px;
+    line-height: 16px;
+    border-radius: 4px;
+    text-align: center;
+    margin: 0 0 0 5px;
+    border: 1px solid #000;
+    position: relative;
+    top: -1px;
+}
+.cautious {
+    border: 1px solid #F4C051;
+    background: #F4C051;
+}
+.disUse {
+    opacity: 0.3;
+    filter:alpha(opacity=30);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
+}

+ 5 - 1
src/html/information.html

@@ -73,8 +73,12 @@
       background: #fff;
       margin: 0 auto;
       padding: 30px 0 30px 24px;
+   
+    }
+    pre {
+      white-space: pre-wrap;
+      word-wrap: break-word;
     }
-
     .anchors {
       width: 160px;
       position: absolute;

+ 9 - 3
src/html/treatplan.html

@@ -17,16 +17,22 @@
 <div class="bodyWrap treatBox">
     <div class="iframeWrap treatWrap">
         <ul>
-            <li class="conditionHintPub conditionHintZhiliao">
+            <li class="conditionHintPub conditionHintZhiliao disCopy">
                 <h4 href="javascript:void(0);">治疗方案<span class="diseaseName"></span></h4>
                 <div class="conditionMain conditionHintZhiliaoAp">
                     <!-- <p class="conditionHintZhiliaoNull pushEmpty">暂无推荐</p> -->
                     <div class="treatPlanNullWrap">
-                            <p class="treatPlan">一般治疗</p>
+                            <div  class="treatPlan">
+                                <p class="treatPlanBg"></p>
+                                <p class="treatPlanTitle">一般治疗</p>
+                            </div>
                             <p class="treatPlanNullText">暂无推荐</p>
                     </div>
                     <div class="treatMedicineWarp">
-                        <p class="treatDrug">药物治疗</p>
+                        <div class="treatDrug">
+                                <p class="treatDrugBg"></p>
+                                <p class="treatDrugTitle"><img src='./../images/drug.png' title="推荐药物" class="icon">推荐药物</p>
+                        </div>
                         <p class="treatMedicineNullText">暂无推荐</p>
                         <div class="drugWarp"></div>
                     </div>

BIN
src/images/drug.png


BIN
src/images/general.png


+ 6 - 3
src/js/illness.js

@@ -66,7 +66,8 @@ function bqtsFun(data){//病情提示
     for(var m = 0;m < tmpBq.details.length;m++){
       var tmpBqDetail = tmpBq.details[m]
       if(tmpBqDetail.type == 1){
-        tmpBqDetailStr+=tmpBqStr+ "<div target='_blank' data-scaleName="+tmpBqDetail.content.name+" href='scale.html?featureType=21&sex="+msg.sex+"&lis="+JSON.stringify(msg.lis)+"&diseaseName"+msg.diseaseName+"&diag="+msg.diag+"&scaleName="+tmpBqDetail.content.name+"&symptom="+msg.symptom+"&other="+msg.other+"&pacs="+msg.pacs+"&vital="+msg.vital+"&age="+msg.age+"&scaleId="+tmpBqDetail.content.id+"' class='illnessTable'>【"+tmpBqDetail.content.name+"】</div>"+
+       
+        tmpBqDetailStr+=tmpBqStr+ "<div target='_blank' data-scaleName="+tmpBqDetail.content.name+"  class='illnessTable'>【"+tmpBqDetail.content.name+"】</div>"+
           '</div>';
       }
       if(tmpBqDetail.type == 2){
@@ -164,7 +165,9 @@ function bqtsFun(data){//病情提示
     openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
   })
   $(".illnessTable").on('click',function(){
-    const scaleName = $(this).attr('data-scaleName')
-    openNewWin(`scale.html?featureType=21&sex=${msg.sex}&lis=${JSON.stringify(msg.lis)}&diag=${msg.diag}&diseaseName=${msg.diseaseName}&scaleName=${scaleName}&symptom=${msg.symptom}&other=${msg.other}&pacs=${msg.pacs}&vital=${msg.vital}&age=${msg.age}`)
+    const msg1 = JSON.parse(JSON.stringify(msg))
+    msg1.scaleName = $(this).attr('data-scaleName')
+    msg1.featureType = 21
+    openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
   })
 }

+ 31 - 14
src/js/index.js

@@ -4,6 +4,9 @@ require('./../css/popup.css');
 // require('./popupEdit.js');
 var Promise = require("bluebird");
 
+
+//tipsMode: 提示信息模式  1 为单个, 2 为多个(只有传2时为多个)
+
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
 const { transConf } = require('./util.js');
@@ -11,6 +14,8 @@ const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecomme
 
 
 let mrId = getUrlArgObject('mrId') 
+const tipsMode = getUrlArgObject('tipsMode') || 1
+
 let msg;
 if(mrId) {
  post(config.getMr,{mrId:mrId}).then((res) => {
@@ -33,6 +38,7 @@ if(mrId) {
     diag: getUrlArgObject('diagJson'),
     diseaseName: getUrlArgObject('diseaseName'),
     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+    pasts: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
     hosCode:getUrlArgObject('hospitalCode') || '',
     plan:getUrlArgObject('plan') || '0',
   }
@@ -73,8 +79,11 @@ function getTreatment() {
 
 function getTipsInfo() {
   let tipsInfoList =  getUrlArgObject('tipsInfoList')&&JSON.parse(getUrlArgObject('tipsInfoList')) || []
-  return post(config.informationMore, {conceptIntorduces:tipsInfoList})
-  // return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
+  if(tipsMode == 2) {
+    return post(config.informationMore, {conceptIntorduces:tipsInfoList})
+  } else {
+    return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
+  }
 }
 
 
@@ -85,11 +94,18 @@ function getPageInfo() {
     const configArr = res1&&res1.data&&res1.data.data || []
     const pushInfo = res2&&res2.data || {}
     const treatInfo = res3&&res3.data || {}
-    const tipsInfo = res4&&res4.data || []
+    const tipsInfo = res4&&res4.data || {}
     const {confArr, showLabsNum, showPacsNum, labsAndPacMode} = transConf(configArr)
-    pushResult = pushInfo.data || {};
-    treatResult = treatInfo.data || {}
-    tipsResult = tipsInfo.data || {}
+    const pushResult = pushInfo.data || {};
+    const treatResult = treatInfo.data || {}
+    let tipsResult = []
+    if(tipsInfo.data) {
+      if(tipsMode == '2') {
+          tipsResult = tipsInfo.data
+      } else {
+          tipsResult.push(tipsInfo.data)
+      }
+    }
 
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['拟诊'] || [] // 疑似
@@ -121,28 +137,29 @@ function getPageInfo() {
 
       switch(confArr[i].code) {
         case "inquiry_show":  //问诊症状
-          renderRecommendInfo(confArr[i].showNum,'symptomRecommend', '问诊症状', symptomRecommend, false)
+        symptomRecommend.length > 0 && renderRecommendInfo(confArr[i].showNum,'symptomRecommend', '问诊症状', symptomRecommend, false)
           break; 
         case "health_show": //体格检查
-          renderRecommendInfo(confArr[i].showNum,'physiExamRecommend', '体格检查', physiExamRecommend, false)
+        physiExamRecommend.length > 0&&  renderRecommendInfo(confArr[i].showNum,'physiExamRecommend', '体格检查', physiExamRecommend, false)
           break;
         case "illness_show": //病情提示
-          renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
+        medicalIndications.length > 0&& renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
           break;
         case "vigilant_show": //警惕诊断
-          renderRecommendInfo(confArr[i].showNum,'warning', '警惕诊断', diagWaring, true,7,2)
+          
+        diagWaring.length > 0&& renderRecommendInfo(confArr[i].showNum,'warning', '警惕诊断', diagWaring, true,7,2)
           break;
         case "lispacs_show": //检验检查
-          renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
+          (labRecommend.length > 0 || pacsRecommend.length >0) && renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
           break;
         case "cure_show": //治疗方案
-          renderTreat('treatRecommend','治疗方案',treatResult)
+          JSON.stringify(treatResult)!='{}'&&(treatResult.commonTreatment||treatResult.treatmentPlan&&treatResult.treatmentPlan.length > 0)&&renderTreat('treatRecommend','治疗方案',treatResult)
           break;
         case "diagnose_show": //推荐诊断
-          renderRecommendInfo(confArr[i].showNum,'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
+        diagRecommend.length > 0 && renderRecommendInfo(confArr[i].showNum,'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
           break;
         case "tip_show": //提示信息
-          renderTipsInfo('tipsInfo','提示信息',tipsResult)
+          tipsResult.length > 0 && renderTipsInfo('tipsInfo','提示信息',tipsResult)
           moreInfo()
           break;
         case "knowledge_show": //医学知识

+ 35 - 32
src/js/indexHorizontal.js

@@ -29,6 +29,8 @@ if(is8Ie) {
 
 let mrId = getUrlArgObject('mrId') 
 let showTab = getUrlArgObject('showTab') || '0';
+const tipsMode = getUrlArgObject('tipsMode') || 1
+
 let msg;
 if(mrId) {
  post(config.getMr,{mrId:mrId}).then((res) => {
@@ -50,6 +52,7 @@ if(mrId) {
     diag: getUrlArgObject('diagJson'),
     diseaseName: getUrlArgObject('diseaseName'),
     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+    pasts: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
     hosCode:getUrlArgObject('hospitalCode') || '',
     plan:getUrlArgObject('plan') || '0',
   }
@@ -57,23 +60,6 @@ if(mrId) {
   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})
 }
@@ -89,8 +75,12 @@ function getTreatment() {
 
 function getTipsInfo() {
   let tipsInfoList =  getUrlArgObject('tipsInfoList')&&JSON.parse(getUrlArgObject('tipsInfoList')) || []
-  return post(config.informationMore, {conceptIntorduces:tipsInfoList})
-  // return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
+  
+  if(tipsMode == '2') {
+    return post(config.informationMore, {conceptIntorduces:tipsInfoList})
+  } else {
+    return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
+  }
 }
 
 function getPageInfo() {
@@ -98,11 +88,20 @@ function getPageInfo() {
     const configArr = res1&&res1.data&&res1.data.data || []
     const pushInfo = res2.data || {}
     const treatInfo = res3.data || {}
-    const tipsInfo = res4.data || {}
     const {confArr, showLabsNum, showPacsNum, labsAndPacMode} = transConf(configArr)
+    const tipsInfo = res4.data || {}
     const pushResult = pushInfo.data || {};
     const treatResult = treatInfo.data || {}
-    const tipsResult = tipsInfo.data&&tipsInfo.data || []
+    let tipsResult = []
+    if(tipsInfo.data) {
+      if(tipsMode == '2') {
+          tipsResult = tipsInfo.data
+      } else {
+          tipsResult.push(tipsInfo.data)
+      }
+    }
+    
+    
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['拟诊'] || [] // 疑似
     const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
@@ -132,31 +131,35 @@ function getPageInfo() {
     for(let i = 0; i < confArr.length; i++) {
       switch(confArr[i].code) {
         case "inquiry_show":  //问诊症状
-          renderRecommendInfo(confArr[i].showNum, symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
+          symptomRecommend.length > 0 && renderRecommendInfo(confArr[i].showNum, symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
           break; 
         case "health_show": //体格检查
-          renderRecommendInfo(confArr[i].showNum, physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
+          physiExamRecommend.length > 0 && renderRecommendInfo(confArr[i].showNum, physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
           break;
         case "illness_show": //病情提示
-          renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
+          medicalIndications.length > 0 && renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
           break;
         case "vigilant_show": //警惕诊断
-          renderRecommendInfo(confArr[i].showNum, warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
+          diagWaring.length > 0 && renderRecommendInfo(confArr[i].showNum, warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
           break;
         case "lispacs_show": //检验检查
-          renderMultRecommendInfo(labsAndPacMode,labAndPacsImg, 'labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
+          (labRecommend.length > 0 || pacsRecommend.length >0) && renderMultRecommendInfo(labsAndPacMode,labAndPacsImg, 'labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
           break;
         case "cure_show": //治疗方案
-          tipsNum++;
-          renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult)
+          if(JSON.stringify(treatResult)!='{}'&&(treatResult.commonTreatment||treatResult.treatmentPlan&&treatResult.treatmentPlan.length > 0)) {
+            tipsNum++;
+            renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult)
+          }
           break;
         case "diagnose_show": //推荐诊断
-          renderRecommendInfo(confArr[i].showNum, diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
+          diagRecommend.length > 0 && renderRecommendInfo(confArr[i].showNum, diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
           break;
         case "tip_show": //提示信息
-          tipsNum++;
-          renderTipsInfo('', 'tipsInfo','提示信息',tipsResult)
-          moreInfo()
+          if(tipsResult.length > 0 ) {
+            tipsNum++;
+            renderTipsInfo('', 'tipsInfo','提示信息',tipsResult)
+            moreInfo()
+          }
           break;
         case "knowledge_show": //医学知识
           tipsNum++;

+ 60 - 41
src/js/indexHorizontalDom.js

@@ -84,16 +84,21 @@ function renderRecommendInfo(showNum, icon, className,title,data, hasInfo, type,
 
 //化验和辅检等多种类型
 function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasInfo, type, position) {
-    console.log(labsAndPacMode)
     const str = `<div class="recommendInfoWrapper ${className} clearfix">
                     <h4 class ="${+labsAndPacMode === 1 ? 'showTopTitle':'showRightTitle'}"><img src=${icon} title="${title}" class="icon">${title}:</h4>
                     <div class="recommendInfoBox ${className + 'box'} ${+labsAndPacMode === 1 ? 'showTopInfo':'showRightInfo'}"></div>
                 </div>`
     $('.push').append(str)
-    
+    let hanContentNum = 0
     for(let i = 0; i < data.length; i++) {
+        if(data[i].data === 0) {
+            continue
+        }
         const showNum = data[i].showNum || 5
         const dataLen = data[i].data.length
+        if(dataLen === 0) {
+            continue
+        }
         let childrenNodeBoxStr  = `<div class="labAndPacsWrapper ${data[i].className+'wrapper'}">
                 <div class="labAndPacsBox ${data[i].className+'box'} clearfix"> 
                 </div>
@@ -134,14 +139,14 @@ function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasI
 function renderTreat(icon, className,title, data) {
     $('.infoTabBox').append(`<span class="infoTab treatTab boldFont"  data-box="${className}">${title}</span>`)
     const str = `<div class="informationBox recommendInfoWrapper ${className} clearfix">
-                    <span class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</span>
+                    <p class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</p>
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </div>`
     $('.infomationBox').append(str)
     const commonTreatmentInfo = data.commonTreatment&&data.commonTreatment.content || ""
-    const treatmentList = data.treatment || []
+    const treatmentList = data.treatmentPlan || []
     renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, className+'box')
-    renderTreatDrug('drugTreatment', '药物治疗', treatmentList, className+'box')
+    renderTreatDrug('drugTreatment', '推荐药物', treatmentList, className+'box')
 }
 function renderKnowledgeInfo(icon, className,title, data) {
     $('.infoTabBox').append(`<span class="infoTab tipsTab boldFont"  data-box="${className}">${title}</span>`)
@@ -190,7 +195,7 @@ function renderTreatText(className,title,data, parentNode) {
 function renderTreatDrug(className,title,data, parentNode) {
     const childrenNodeBoxStr = `
         <div class = "treatItemBox ${className + 'box'}">
-            <p class="treatItemTitle">${title}:</p>
+            <p class="treatItemTitle">${title}: ${data.length ==0 ? '':'<span class="more">更多</span>'}</p>
             <div class="treatDrugBox">
                 <p class="${className + 'Info'}"></p>
             </div>
@@ -200,42 +205,54 @@ function renderTreatDrug(className,title,data, parentNode) {
     if(data.length ==0) {
         $('.' + className+'Info').append('<span class="recommendNull">暂无推荐</span>')
     }
-    for(let i = 0; i < data.length; i++) {
-        let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
-            ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
-        for (let j = 0; j < data[i].medicitionsList.length; j++) {
-            childrenNodeStr += `<span class="durgNameBox ${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}">${data[i].medicitionsList[j].medicitionName}`
-            if(data[i].medicitionsList[j].forbidden == '1') {
-                childrenNodeStr += `<span class="medicineWaring">慎用</span>`
-            } else if(data[i].medicitionsList[j].forbidden == '2') {
-                childrenNodeStr += `<span  class="medicineWaringDisMsg">禁用</span>`
-            }
-            childrenNodeStr += `<span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>`
-            if(j !== data[i].medicitionsList.length-1) {
-                childrenNodeStr += ','
-            }
-            childrenNodeStr += '</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 += ';'
-            // } else {
-            //     childrenNodeStr += ','
+    for(let i = 0; i <  data.length; i++) {
+        let childrenNodeStr =`<div class = "drugTreatmentInfoItemBox">
+            <p class="diagTitle ellipsis"><i></i>${data[i].title}</p>`
+            //二级标题暂时不放
+            // for(let j = 0; j < data[i].meditionDetails.length; j++) {
+            //     if(data[i].meditionDetails[j].description) {
+            //         childrenNodeStr += `<p class="diaDescription">${data[i].meditionDetails[j].description}</p>`
+            //     }
             // }
-        }
-        childrenNodeStr += ` </p>`
+            childrenNodeStr +=`</div>`
         $('.' + className+'Info').append(childrenNodeStr)
     }
-    $('.' + className+'Info'+ ' .infoMsg').on('click', function(){
-        const infoMsgName = $(this).attr('data-name')
-        openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
-    })
+    // for(let i = 0; i < data.length; i++) {
+    //     let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
+    //         ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
+    //     for (let j = 0; j < data[i].medicitionsList.length; j++) {
+    //         childrenNodeStr += `<span class="durgNameBox ${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}">${data[i].medicitionsList[j].medicitionName}`
+    //         if(data[i].medicitionsList[j].forbidden == '1') {
+    //             childrenNodeStr += `<span class="medicineWaring">慎用</span>`
+    //         } else if(data[i].medicitionsList[j].forbidden == '2') {
+    //             childrenNodeStr += `<span  class="medicineWaringDisMsg">禁用</span>`
+    //         }
+    //         childrenNodeStr += `<span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>`
+    //         if(j !== data[i].medicitionsList.length-1) {
+    //             childrenNodeStr += ','
+    //         }
+    //         childrenNodeStr += '</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 += ';'
+    //         // } else {
+    //         //     childrenNodeStr += ','
+    //         // }
+    //     }
+    //     childrenNodeStr += ` </p>`
+    //     $('.' + className+'Info').append(childrenNodeStr)
+    // }
+    // $('.' + className+'Info'+ ' .infoMsg').on('click', function(){
+    //     const infoMsgName = $(this).attr('data-name')
+    //     openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
+    // })
     
-    var drugTreatmentHeight = $(".drugTreatmentInfo").height()
-    if(drugTreatmentHeight > 75){
-        $(".treatDrugBox").append('<span class="more">更多</span>')
-    } else if(drugTreatmentHeight > 30) {
-        $(".drugTreatmentInfo").append('<span class="more">更多</span>')
-    }
+    // var drugTreatmentHeight = $(".drugTreatmentInfo").height()
+    // if(drugTreatmentHeight > 75){
+    //     $(".treatDrugBox").append('<span class="more">更多</span>')
+    // } else if(drugTreatmentHeight > 30) {
+    //     $(".drugTreatmentInfo").append('<span class="more">更多</span>')
+    // }
     $(".infomationBox .drugTreatmentbox").on('click',".more",function(){
         openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
         // openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diseaseName=${msg.diseaseName}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
@@ -357,7 +374,7 @@ function renderRecommendConditTips(icon, className,title,data) {
         for(var m = 0;m < tmpBq.details.length;m++){
           var tmpBqDetail = tmpBq.details[m]
           if(tmpBqDetail.type == 1){
-            tmpBqDetailStr+=`<span data-url=scale.html?featureType=21&sex=${msg.sex}&lis=${JSON.stringify(msg.lis)}&diag=${msg.diag}&diseaseName=${msg.diseaseName}&scaleName=${tmpBqDetail.content.name}&symptom=${msg.symptom}&other=${msg.other}&pacs=${msg.pacs}&vital=${msg.vital}&age=${msg.age}&scaleId=${tmpBqDetail.content.id} class="illnessTable">【${tmpBqDetail.content.name}】</span>`
+            tmpBqDetailStr+=`<span data-scaleName=${tmpBqDetail.content.name} class="illnessTable">【${tmpBqDetail.content.name}】</span>`
           }
           if(tmpBqDetail.type == 4){
             // tmpBqDetailStr+=`<span class="sriticalinfo">&nbsp;${tmpBqDetail.content.name}(诊断要点)</span>`
@@ -374,8 +391,10 @@ function renderRecommendConditTips(icon, className,title,data) {
         openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
       })
       $('.alertModal .illnessTable').on('click', function(){
-        const infoMsgUrl = $(this).attr('data-url')
-        openNewWin(infoMsgUrl)
+        const msg1 = JSON.parse(JSON.stringify(msg))
+        msg1.scaleName = $(this).attr('data-scaleName')
+        msg1.featureType = 21
+        openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
       })
       $(".conditTipsbox").on('click',".more",function(){
         // openNewWin(`illness.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${JSON.stringify(msg.lis)}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&diseaseName=${msg.diseaseName}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}&msg=${JSON.stringify(msg)}`)

+ 72 - 53
src/js/indexVertDom.js

@@ -66,10 +66,17 @@ function renderMultRecommendInfo(className,title,data, hasInfo, type, position)
                     <div class="recommendInfoBox ${className + 'box'}"></div>
                 </div>`
     $('.recommendWrap').append(str)
-    
+    let hasDataNum = 0
     for(let i = 0; i < data.length; i++) {
         const showNum = data[i].showNum || 5
         const dataLen = data[i].data.length
+        if(dataLen === 0) {
+            continue
+        }
+        hasDataNum++
+        if(hasDataNum > 1) {
+            $('.'+className + 'box').append('<div class="line"></div>')
+        }
         let childrenNodeBoxStr  = `<div class="labAndPacsBox ${data[i].className} clearfix"> </div>`
         let childrenNodeStrShort =  `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
         let childrenNodeStrLong =  `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
@@ -167,9 +174,9 @@ function renderTreat(className,title, data) {
                 </div>`
     $('.recommendWrap').append(str)
     const commonTreatmentInfo = data.commonTreatment&&data.commonTreatment.content || ""
-    const treatmentList = data.treatment || []
+    const treatmentList = data.treatmentPlan || []
     renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, className+'box')
-    renderTreatDrug('drugTreatment', '常用药物治疗', treatmentList, className+'box')
+    renderTreatDrug('drugTreatment', '推荐药物', treatmentList, className+'box')
 }
 
 function renderTreatText(className,title,data, parentNode) {
@@ -189,18 +196,13 @@ function renderTreatText(className,title,data, parentNode) {
         $(".commonTreatmentInfo").addClass('commonTreatmentInfoLimit').append('<span class="slideDown">更多 <i></i></span>')
     }
     $(".treatItemBox").on('click',".slideDown",function(){
-        $(this).parents(".commonTreatmentInfo").removeClass("commonTreatmentInfoLimit").append('<span class="slideup">收起 <i></i></span>')
-        $(this).remove()
-    })
-    $(".treatItemBox").on('click',".slideup",function(){
-        $(this).parents(".commonTreatmentInfo").addClass("commonTreatmentInfoLimit").append('<span class="slideDown">更多 <i></i></span>')
-        $(this).remove()
+        openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
 }
 function renderTreatDrug(className,title,data, parentNode) {
     const childrenNodeBoxStr = `
         <div class = "treatItemBox ${className + 'box'}">
-            <p class="treatItemTitle">${title}</p>
+            <p class="treatItemTitle">${title} ${data.length ==0 ?'':'<span class="slideDown">更多 <i></i></span>'}</p>
             <p class="${className + 'Info'}"></p>
         </div>
     `
@@ -208,50 +210,65 @@ function renderTreatDrug(className,title,data, parentNode) {
     if(data.length ==0) {
         $('.' + className+'Info').append('<span class="recommendNull">暂无推荐</span>')
     }
-    for(let i = 0; i < data.length; i++) {
-        let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
-            ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
-        for (let j = 0; j < data[i].medicitionsList.length; j++) {
-            childrenNodeStr += `<span class="durgNameBox ${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}"><span class="durgName">${data[i].medicitionsList[j].medicitionName}</span>`
-            if(data[i].medicitionsList[j].forbidden == '1') {
-                childrenNodeStr += `<span class="medicineWaring">慎用</span>`
-            } else if(data[i].medicitionsList[j].forbidden == '2') {
-                childrenNodeStr += `<span  class="medicineWaringDisMsg">禁用</span>`
-            }
-            childrenNodeStr += `<span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>`
-            if(j !== data[i].medicitionsList.length-1) {
-                childrenNodeStr += ','
-            }
-            childrenNodeStr += '</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 += ';'
-            // } else {
-            //     childrenNodeStr += ','
+    for(let i = 0; i <  data.length; i++) {
+        let childrenNodeStr =`<div class = "drugTreatmentInfoItemBox">
+            <p class="diagTitle"><i></i>${data[i].title}</p>`
+            //二级标题暂时不放
+            // for(let j = 0; j < data[i].meditionDetails.length; j++) {
+            //     if(data[i].meditionDetails[j].description) {
+            //         childrenNodeStr += `<p class="diagDescription">${data[i].meditionDetails[j].description}</p>`
+            //     }
             // }
-        }
-        childrenNodeStr += ` </p>`
+            childrenNodeStr +=`</div>`
         $('.' + className+'Info').append(childrenNodeStr)
     }
-    $('.' + className+'Info'+ ' .infoMsg').on('click', function(){
-        const infoMsgName = $(this).attr('data-name')
-        openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
+    $(".treatItemTitle").on('click',".slideDown",function(){
+        openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
-    var treatList = $(".drugTreatmentInfo").find(".drugTreatmentInfoItemBox")
-    for(var h = 0;h < treatList.length;h++){ 
-        if($(treatList[h]).height() > 25){
-        $(treatList[h]).addClass('recommendInfoItemBoxLimit').append('<span class="slideDown">更多 <i></i></span>')
-        }
-        $(".drugTreatmentInfo").on('click',".slideDown",function(){
-        $(this).parents(".drugTreatmentInfoItemBox ").removeClass("recommendInfoItemBoxLimit").append('<span class="slideup">收起 <i></i></span>')
-        $(this).remove()
-        })
-        $(".drugTreatmentInfo").on('click',".slideup",function(){
-        $(this).parents(".drugTreatmentInfoItemBox ").addClass("recommendInfoItemBoxLimit").append('<span class="slideDown">更多 <i></i></span>')
-        $(this).remove()
-        })
-    }
+    // for(let i = 0; i < data.length; i++) {
+    //     let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
+    //         ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
+        // for (let j = 0; j < data[i].medicitionsList.length; j++) {
+        //     childrenNodeStr += `<span class="durgNameBox ${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}"><span class="durgName">${data[i].medicitionsList[j].medicitionName}</span>`
+        //     if(data[i].medicitionsList[j].forbidden == '1') {
+        //         childrenNodeStr += `<span class="medicineWaring">慎用</span>`
+        //     } else if(data[i].medicitionsList[j].forbidden == '2') {
+        //         childrenNodeStr += `<span  class="medicineWaringDisMsg">禁用</span>`
+        //     }
+        //     childrenNodeStr += `<span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>`
+        //     if(j !== data[i].medicitionsList.length-1) {
+        //         childrenNodeStr += ','
+        //     }
+        //     childrenNodeStr += '</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 += ';'
+        //     // } else {
+        //     //     childrenNodeStr += ','
+        //     // }
+        // }
+        // childrenNodeStr += ` </p>`
+        // $('.' + className+'Info').append(childrenNodeStr)
+    // }
+    // $('.' + className+'Info'+ ' .infoMsg').on('click', function(){
+    //     const infoMsgName = $(this).attr('data-name')
+    //     openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
+    // })
+    // var treatList = $(".drugTreatmentInfo").find(".drugTreatmentInfoItemBox")
+    // for(var h = 0;h < treatList.length;h++){ 
+    //     if($(treatList[h]).height() > 25){
+    //     $(treatList[h]).addClass('recommendInfoItemBoxLimit').append('<span class="slideDown">更多 <i></i></span>')
+    //     }
+    //     $(".drugTreatmentInfo").on('click',".slideDown",function(){
+    //     $(this).parents(".drugTreatmentInfoItemBox ").removeClass("recommendInfoItemBoxLimit").append('<span class="slideup">收起 <i></i></span>')
+    //     $(this).remove()
+    //     })
+    //     $(".drugTreatmentInfo").on('click',".slideup",function(){
+    //     $(this).parents(".drugTreatmentInfoItemBox ").addClass("recommendInfoItemBoxLimit").append('<span class="slideDown">更多 <i></i></span>')
+    //     $(this).remove()
+    //     })
+    // }
 }
 
 function renderRecommendConditTips(className,title,data) {
@@ -297,7 +314,7 @@ function renderRecommendConditTips(className,title,data) {
         for(var m = 0;m < tmpBq.details.length;m++){
           var tmpBqDetail = tmpBq.details[m]
           if(tmpBqDetail.type == 1){
-            tmpBqDetailStr+=`<span data-url=scale.html?featureType=21&sex=${msg.sex}&lis=${JSON.stringify(msg.lis)}&diag=${msg.diag}&diseaseName=${msg.diseaseName}&scaleName=${tmpBqDetail.content.name}&symptom=${msg.symptom}&other=${msg.other}&pacs=${msg.pacs}&vital=${msg.vital}&age=${msg.age}&scaleId=${tmpBqDetail.content.id} class="illnessTable">${tmpBqDetail.content.name}</span>`
+            tmpBqDetailStr+=`<span data-scaleName=${tmpBqDetail.content.name} class="illnessTable">${tmpBqDetail.content.name}</span>`
           }
           if(tmpBqDetail.type == 2){
             var deepDetailName = `<div class="modalTitle">${tmpBqDetail.content.name}<i class="closeModal"></i></div>`
@@ -405,8 +422,10 @@ function renderRecommendConditTips(className,title,data) {
         openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
       })
       $('.alertModal .illnessTable').on('click', function(){
-        const infoMsgUrl = $(this).attr('data-url')
-        openNewWin(infoMsgUrl)
+        const msg1 = JSON.parse(JSON.stringify(msg))
+        msg1.scaleName = $(this).attr('data-scaleName')
+        msg1.featureType = 21
+        openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
       })
       bindTipsEvent()
 }

+ 9 - 3
src/js/information.js

@@ -13,10 +13,16 @@ function getInfomation() {
     "name": getUrlArgObject('name'),
     "position": getUrlArgObject('position')
   };
+  const uname = getUrlArgObject('uname')
+  const showName = param.name
+  if (param.type == 5 || param.type == 51) {
+    param.type = 12;
+    param.name = uname;
+  }
 
   post(config.information, param).then((res) => {
     const data = res.data.data
-    document.title = data.name
+    document.title = showName
     var str = '';
     var anchors = '';
     var item = '';
@@ -26,7 +32,7 @@ function getInfomation() {
       return;
     }
     var list = data.details;
-    $("h1").html(data.name);
+    $("h1").html(showName);
     $("h1").css({
       "color": "#267FD7",
       "borderBottom": "4px solid  #E9E9E9",
@@ -45,7 +51,7 @@ function getInfomation() {
         str += item.title
       }
       str += '</h2></div>' +
-        '<div>' + item.content + '<div>';
+        '<div><pre>' + item.content + '</pre><div>';
       if (i != list.length - 1 && getUrlArgObject('type') != 8) {
         str += '<div class="line"></div>'
       }

+ 1 - 1
src/js/promise.js

@@ -49,7 +49,7 @@ const config = {
     '8':'4,5'
   }
 }
-const imageUrlPrefix = 'http://192.168.2.121:82';
+const imageUrlPrefix = 'http://192.168.2.241:82';
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));

+ 4 - 14
src/js/scale.js

@@ -8,20 +8,10 @@ let hasCalc = false;
 $(function () {
   var scaleInfo;
   // 用GetQueryString方法从地址栏获取参数,暂时写死
-  var params = {
-    "age": getUrlArgObject('age') || 28,
-    "featureType": getUrlArgObject('featureType') || '21',
-    "scaleName": getUrlArgObject('scaleName') || '密西根糖尿病周围神经病评分(MDNS)',
-    "sex": getUrlArgObject('sex') || 1,
-    "diag": getUrlArgObject('diag') || '肺结核(复诊);',
-    "lis": getUrlArgObject('lis') ? JSON.parse(getUrlArgObject('lis')) : [],
-    "symptom": getUrlArgObject('symptom') || '',
-    "other": getUrlArgObject('other') || '',
-    "pacs": getUrlArgObject('pacs') || '',
-    "vital": getUrlArgObject('vital') || ''
-  }
-
-  if (getUrlArgObject('scaleName')) {
+  
+  var msg = JSON.parse(getUrlArgObject('msg'))
+  var params =  msg
+  if (msg.scaleName) {
     post(config.pushScale, params).then((res) => {
       const data = res.data.data
       if (res.data.code == 0) {

+ 7 - 3
src/js/staticSearch.js

@@ -55,7 +55,7 @@ function getKnowledgeData(value) {
             if(knowledgeLis&&knowledgeLis.length>0){
                 for(var i = 0;i<knowledgeLis.length;i++){
                     var tmpPart = knowledgeLis[i]
-                    var tmpLi = `<li data-name='${(tmpPart.type==5 ||tmpPart.type==51)?tmpPart.uniqueName:tmpPart.name}' data-type='1' data-sign='${(tmpPart.type==5 ||tmpPart.type==51)?12:tmpPart.type}'>
+                    var tmpLi = `<li data-name='${tmpPart.name}' data-uname='${tmpPart.uniqueName}' data-type='1' data-sign='${tmpPart.type}'>
                         <p>${tmpPart.name}<i>${tmpPart.libTypeName?('( '+tmpPart.libTypeName+' )'):''}</i></p>
                         ${tmpPart.retrievalName?('<span>• '+tmpPart.retrievalName+'</span>'):''}
                     </li>`
@@ -114,13 +114,17 @@ $(window).on('resize', function(){
 
 $(".staticSearchB ul").on("click","li",function(){
     const infoMsgName = $(this).attr('data-name')
+    const infoMsgUName = $(this).attr('data-uname')
     const type = $(this).attr('data-type')
     const sign = $(this).attr('data-sign')
     if(type == 1){
-        openNewWin(`information.html?type=${sign}&position=0&name=${infoMsgName}`)
+        openNewWin(`information.html?type=${sign}&position=0&name=${infoMsgName}&uname=${infoMsgUName}`)
     }else{
         let msg = JSON.parse(getUrlArgObject("msg"));
-        openNewWin(`scale.html?featureType=21&sex=${msg.sex}&lis=${JSON.stringify(msg.lis)}&diag=${msg.diag}&diseaseName=${msg.diseaseName}&scaleName=${infoMsgName}&symptom=${msg.symptom}&other=${msg.other}&pacs=${msg.pacs}&vital=${msg.vital}&age=${msg.age}`)
+        const msg1 = JSON.parse(JSON.stringify(msg))
+        msg1.scaleName = infoMsgName
+        msg1.featureType = 21
+        openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
     }
 })
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 71 - 24
src/js/treatplan.js


+ 1 - 1
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'),