Browse Source

Merge branch 'master' into his/zjhospital

lantone 5 years ago
parent
commit
6ad048aa22

+ 14 - 1
src/css/common.less

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

+ 44 - 13
src/css/indexHorizontal.less

@@ -59,6 +59,7 @@
         display: table-cell;
         word-break: break-all;
         vertical-align: middle;
+        font-size: 12px;
     }
     .version{
         font-size: 12px;
@@ -240,8 +241,8 @@
     color: #000000;
     float: left;
     width: 60px;
-    height: 30px;
-    line-height: 30px;
+    height: 20px;
+    line-height: 20px;
     float: left;
 }
 .tipsTitle {
@@ -252,8 +253,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 +263,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 +282,7 @@
 }
 .drugTreatmentInfoItemBox {
     .ellipse;
-    height: 30px;
+    height: 20px;
 }
 .infomationBox .treatRecommend {
     margin-top: 10px;
@@ -302,13 +303,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;
@@ -333,6 +332,10 @@
 .disclaimer, .illnessTable {
     cursor: pointer;
 }
+.illnessTable {
+    color: #267FD7;
+
+}
 .tipsInfoWrapper  {
     position: relative;
     margin: 10px 0 0 0;
@@ -409,4 +412,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;
+    }
 }

+ 37 - 4
src/css/indexVert.less

@@ -251,6 +251,9 @@
     right: 0px;
     color: @colorBlue;
     cursor: pointer;
+    height: 25px;
+    line-height: 25px;
+    box-shadow: -2px 0px 15px 0px #fff;
 
     i {
         width: 10px;
@@ -297,10 +300,7 @@
         margin-right: 15px;
     }
 }
-.labRecommend {
-    border-bottom: 1px solid #D1D1D1;
-    margin: 5px 0;
-}
+
 .labAndPacsTitle {
     border-right: 2px solid #ADADAD;
     padding-right:5px; 
@@ -368,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 {

+ 13 - 3
src/css/staticSearch.css

@@ -31,9 +31,7 @@
     position: relative;
     top: 1px;
 }
-.container .searchScale {
-    display: none;
-}
+
 .container .staticSearchT button {
     position: absolute;
     right: 0;
@@ -98,4 +96,16 @@
     font-size: 12px;
     margin-bottom: 10px;
     line-height: 20px;
+}
+.searchTypeBox {
+    margin: 10px 0 0 0;
+}
+.medicalTypeItem{
+    display: inline-block;
+    margin: 0 20px 10px 0;
+    cursor: pointer;
+}
+.medicalTypeItem img {
+    vertical-align: text-bottom;
+    margin: 0  3px 2px 0;
 }

+ 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);";
+}

File diff suppressed because it is too large
+ 9 - 1
src/html/information.html


File diff suppressed because it is too large
+ 9 - 1
src/html/scale.html


+ 2 - 16
src/html/staticSearch.html

@@ -46,22 +46,8 @@
                 <i id="clearKnowledge"></i>
                 <button >搜索</button>
             </div>
-            <div class="staticSearchB">
-                <p class="tip">查询内容</p>
-                <p class="empty">暂无搜索结果!</p>
-                <ul>
-                    
-                </ul>
-            </div>
-        </div>
-        <div class="searchScale">
-            <div class="staticSearchT">
-                <div class="ipt">
-                    <input type="text" value="" placeholder="量表搜索">
-                </div>
-                <i id="clearScale"></i>
-                <button >搜索</button>
-            </div>
+            <div class="searchTypeBox"></div>
+
             <div class="staticSearchB">
                 <p class="tip">查询内容</p>
                 <p class="empty">暂无搜索结果!</p>

+ 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/check_off.png


BIN
src/images/check_on.png


BIN
src/images/drug.png


BIN
src/images/general.png


+ 2 - 2
src/index.js

@@ -24,7 +24,7 @@ var msg = {
 window.msg = msg
 window.pushMessage = {}
 
-post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
+post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',ruleType:config.ruleTypeMap['22']},msg)).then((res)=>{
   var data = res.data
   if(data.code == 0){
     var result = data.data;
@@ -71,7 +71,7 @@ post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((re
   }
 })
 
-post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
+post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg)).then((res)=>{
   var data = res.data
   if(data.code == 0){
     var result = data.data;

+ 8 - 5
src/js/illness.js

@@ -22,7 +22,7 @@ var msg = JSON.parse(getUrlArgObject('msg'))
 window.msg = msg
 window.pushMessage = {}
 
-post(config.pushInner,Object.assign(msg,{featureType: '22'})).then((res)=>{
+post(config.pushInner,Object.assign(msg,{featureType: '22',ruleType:config.ruleTypeMap['22']})).then((res)=>{
   var data = res.data
   if(data.code == 0) {
     var result = data.data;
@@ -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){
@@ -161,10 +162,12 @@ function bqtsFun(data){//病情提示
 
   $(".mayIllness .infoMsg").on("click",function(){
     const infoMsgName = $(this).parent().attr('data-name')
-    openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
+    openNewWin(`information.html?type=22&position=2&name=${encodeURIComponent(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))}`)
   })
 }

+ 36 - 19
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,12 +14,14 @@ 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) => {
     const data = res.data
     if(data.code == 0) {
-      msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
+      msg = Object.assign(data.data, {plan:getUrlArgObject('plan') || '0',})
       window.msg = msg
       window.pushMessage = {} 
       getPageInfo();
@@ -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',
   }
@@ -63,18 +69,21 @@ function getConf() {
 }
 
 function getPushInfo() {
-  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
+  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',ruleType:config.ruleTypeMap['22']},msg))
   
 }
 
 function getTreatment() {
-  return  post(config.pushTreatment,Object.assign({featureType: '8'},msg))
+  return  post(config.pushInner,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
 }
 
 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})
+  }
 }
 
 
@@ -84,12 +93,19 @@ function getPageInfo() {
     // 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 treatInfo = res3&&res3.data &&res3.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&&treatInfo.data&&treatInfo.data.treat || {}
+    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": //医学知识
@@ -165,7 +182,7 @@ function moreInfo() {
   $('.moreInfo').click(function(){
     const name = $(this).attr('data-name')
     const type = $(this).attr('data-type')
-    openNewWin(`information.html?type=${type}&position=0&name=${name}`)
+    openNewWin(`information.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
   })
 }
 

+ 40 - 37
src/js/indexHorizontal.js

@@ -29,12 +29,14 @@ 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) => {
     const data = res.data
     if(data.code == 0) {
-      msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
+      msg = Object.assign(data.data, {plan:getUrlArgObject('plan') || '0',})
       window.msg = msg
       getPageInfo();
     }
@@ -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,40 +60,27 @@ 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})
 }
 
 function getPushInfo() {
-  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
+  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',ruleType:config.ruleTypeMap['22']},msg))
 }
 
 function getTreatment() {
-  return post(config.pushTreatment,Object.assign({featureType: '8'},msg))
+  return post(config.pushInner,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
 }
 
 
 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 || []
+    const treatResult = treatInfo&&treatInfo.data&&treatInfo.data.treat || {}
+    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++;
@@ -203,7 +206,7 @@ function getPageInfo() {
       $('.moreInfo').click(function(){
         const name = $(this).attr('data-name')
         const type = $(this).attr('data-type')
-        openNewWin(`information.html?type=${type}&position=0&name=${name}`)
+        openNewWin(`information.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
       })
     }
     

+ 72 - 47
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.uniqueName?msg.diseaseName.uniqueName:''}</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>`)
@@ -150,7 +155,7 @@ function renderKnowledgeInfo(icon, className,title, data) {
                 </div>`
     $('.infomationBox').append(str)
     $('.'+className+'.staticWin' ).on('click', function(){
-        openNewWin(`staticSearch.html?type=1`)
+        openNewWin(`staticSearch.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
 }
 function renderScaleInfo(icon, className,title, data) {
@@ -160,13 +165,13 @@ function renderScaleInfo(icon, className,title, data) {
                 </div>`
     $('.infomationBox').append(str)
     $('.'+className+'.staticWin' ).on('click', function(){
-        openNewWin(`staticSearch.html?type=2&msg=${encodeURIComponent(JSON.stringify(msg))}`)
+        openNewWin(`staticSearch.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
 }
 
 function renderTreatText(className,title,data, parentNode) {
     const childrenNodeBoxStr = `
-        <div class = "treatItemBox ${className + 'box'}">
+        <div class = "treatItemBox ${className + 'box'} disCopy">
             <p class="treatItemTitle">${title}:</p>
             <div class="treatTextBox">
                 <p class="${className + 'Info'} clearfix"></p>
@@ -184,13 +189,16 @@ function renderTreatText(className,title,data, parentNode) {
     }
     $(".infomationBox .treatTextBox").on('click',".more",function(){
         openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
-      })
+    })
+    $('.' + className + 'box' + ' img').bind('contextmenu', function(){
+        return false
+    })
     
 }
 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 +208,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}`)
@@ -262,11 +282,11 @@ function renderTipsInfo(icon, className,title,data) {
     if(data.length === 0) {
         str = `<div class="informationBox tipsInfoWrapper ${className} clearfix">
             <p class="diagName recommendNull">暂无数据</p>
-            <div class="tipsInfoBox clearfix ${className + 'box'}"></div>
+            <div class="tipsInfoBox clearfix ${className + 'box'} disCopy"></div>
         </div>`
     } else {
         str = `<div class="informationBox tipsInfoWrapper ${className} clearfix">
-                    <div class="tipsInfoBox clearfix ${className + 'box'}">
+                    <div class="tipsInfoBox clearfix ${className + 'box'} disCopy">
                     </div>
                 </div>`
     }
@@ -275,6 +295,9 @@ function renderTipsInfo(icon, className,title,data) {
     for(let i = 0; i < data.length; i++) {
         renderTipsInfoText('','诊断依据',data[i],className + 'box')
     }
+    $('.' + className + 'box' + ' img').bind('contextmenu', function(){
+        return false
+    })
     // if(data.name) {
     //     renderTipsInfoText('','诊断依据',data.details,className + 'box')
     // }
@@ -357,7 +380,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 +397,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)}`)

+ 90 - 64
src/js/indexVertDom.js

@@ -3,6 +3,7 @@ const { openNewWin,imageUrlPrefix } = require('./promise.js');
 const { bindTipsEvent } = require('./popupEdit.js');
 
 function renderRecommendInfo(showNum,className,title,data, hasInfo, type, position) {
+    let showNumCopy = showNum || 5
     const dataLen = data.length
     const str = `<div class="recommendInfoWrapper ${className}">
                     <h4><i></i>${title}</h4>
@@ -13,8 +14,8 @@ function renderRecommendInfo(showNum,className,title,data, hasInfo, type, positi
                 </div>`
     $('.recommendWrap').append(str)
     let dataShort
-    if(showNum&& dataLen > showNum) {
-        dataShort = data.slice(0, showNum)
+    if(showNumCopy&& dataLen > showNumCopy) {
+        dataShort = data.slice(0, showNumCopy)
     } else {
         dataShort = data
     }
@@ -52,9 +53,9 @@ function renderRecommendInfo(showNum,className,title,data, hasInfo, type, positi
     $('.'+className + 'box').append(childrenNodeStrShort)
     $('.'+className + 'box' +' .infoMsg').on('click', function(){
         const infoMsgName = $(this).attr('data-name')
-        openNewWin(`information.html?type=${type}&position=${position}&name=${infoMsgName}`)
+        openNewWin(`information.html?type=${encodeURIComponent(type)}&position=${encodeURIComponent(position)}&name=${encodeURIComponent(infoMsgName)}`)
     })
-    if(dataLen > showNum) {
+    if(dataLen > showNumCopy) {
         slideToggle($("."+className+"box"), childrenNodeStrShort,childrenNodeStrLong)
     }
 }
@@ -65,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
+        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>`
@@ -99,7 +107,7 @@ 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 class="recommendInfoBox clearfix ${className + 'box'} disCopy"></div>
                 </div>`
     $('.recommendWrap').append(str)
     if(data.length > 0) {
@@ -111,6 +119,9 @@ function renderTipsInfo(className,title, data) {
         // renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
         $('.' + className+'box').append('<p class="TipsInfoNull">暂无数据</p>')
     }
+    $('.' + className + 'box' + ' img').bind('contextmenu', function(){
+        return false
+    })
 }
 
 function renderKnowledgeInfo(className,title, data) {
@@ -121,7 +132,7 @@ function renderKnowledgeInfo(className,title, data) {
     $('.recommendWrap').append(str)
     $('.' + className+'box').append('<p class="TipsInfoNull staticWin">'+data+'</p>')
     $('.'+className+' .staticWin' ).on('click', function(){
-        openNewWin(`staticSearch.html?type=1`)
+        openNewWin(`staticSearch.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
 }
 
@@ -133,13 +144,13 @@ function renderScaleInfo(className,title, data) {
     $('.recommendWrap').append(str)
     $('.' + className+'box').append('<p class="TipsInfoNull staticWin">'+data+'</p>')
     $('.'+className+' .staticWin' ).on('click', function(){
-        openNewWin(`staticSearch.html?type=2&msg=${encodeURIComponent(JSON.stringify(msg))}`)
+        openNewWin(`staticSearch.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
 }
 
 function renderTipsInfoMsg(className,item,data, parentNode) {
     const childrenNodeBoxStr = `
-        <div class = "treatItemBox ${className + 'box'}">
+        <div class = "treatItemBox ${className + 'box'} disCopy">
             <p class="treatItemTitle">${item.name} <span class="moreInfo" data-name="${item.name}" data-type="${item.type}"}>详情</span></p>
             <p class="${className + 'Info'} clearfix"></p>
         </div>
@@ -161,19 +172,19 @@ function renderTipsInfoMsg(className,item,data, parentNode) {
 
 function renderTreat(className,title, data) {
     const str = `<div class="recommendInfoWrapper ${className}">
-                    <h4><i></i>${title}${msg.diseaseName?'('+msg.diseaseName+')':''}</h4>
+                    <h4><i></i>${title}${msg.diseaseName?'('+msg.diseaseName.uniqueName+')':''}</h4>
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </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) {
     const childrenNodeBoxStr = `
-        <div class = "treatItemBox ${className + 'box'}">
+        <div class = "treatItemBox ${className + 'box'} disCopy">
             <p class="treatItemTitle">${title}</p>
             <p class="${className + 'Info'} clearfix"></p>
         </div>
@@ -188,18 +199,16 @@ 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()
+        openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
     })
-    $(".treatItemBox").on('click',".slideup",function(){
-        $(this).parents(".commonTreatmentInfo").addClass("commonTreatmentInfoLimit").append('<span class="slideDown">更多 <i></i></span>')
-        $(this).remove()
+    $('.' + className + 'Info' + ' img').bind('contextmenu', function(){
+        return false
     })
 }
 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>
     `
@@ -207,50 +216,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) {
@@ -296,7 +320,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>`
@@ -401,11 +425,13 @@ function renderRecommendConditTips(className,title,data) {
       }
       $('.mayIllness .infoMsg').on('click', function(){
         const infoMsgName = $(this).attr('data-name')
-        openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
+        openNewWin(`information.html?type=22&position=2&name=${encodeURIComponent(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()
 }

+ 3 - 0
src/js/information.js

@@ -60,6 +60,9 @@ function getInfomation() {
     }
     addLinkClickEvent();
     adjustHeight();
+    $('.content img').bind('contextmenu', function(){
+      return false
+    })
     function addScrollEvent() {
       var scrollTop = $('.infos').scrollTop()
       var divHeight = 0;

+ 6 - 1
src/js/promise.js

@@ -37,12 +37,17 @@ const config = {
   information: '/api/data/conceptDetail/getConceptDetail',
   informationMore: '/api/data/conceptDetail/getConceptDetails',
   pushScale: '/api/data/push/pushScale',
-  pushTreatment: '/api/data/push/pushTreatment',
   getSysSetInfoDatas: '/api/data/sysSet/getSysSetInfoDatas',
   getMr: '/api/data/mr/getMr',
   getVersion: '/api/data/versionInfo/getVersionInfoAlls',
   getStaticKnowledge: '/api/data/search/getStaticKnowledge',
   getStaticScale: '/api/data/search/getScale',
+  dictionaryInfo: '/api/data/dictionaryInfo/getList', //字典信息
+  ruleTypeMap:{     //大数据推送参数featureType对应
+    '22':'1,2',
+    '11':'3',
+    '8':'4,5'
+  }
 }
 const imageUrlPrefix = 'http://192.18.101.207:82';
 // const getUrlArgObject = function(parm) {

+ 7 - 18
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) {
@@ -34,10 +24,9 @@ $(function () {
             $('.content').append(scaleInfo[i].content)
           }
         }
-
-        
-
-        
+        $('.content img').bind('contextmenu', function(){
+          return false
+        })
       }
     })
   }

+ 92 - 77
src/js/staticSearch.js

@@ -1,52 +1,99 @@
 require('./../css/staticSearch.css');
 require('./../images/del_nor.png')
 var $ = require("jquery");
-var { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
+var { post,config,getUrlArgObject,openNewWin,isIe8 } = require('./promise.js');
+let checkOffImg = require('./../images/check_off.png')
+let checkOnImg = require('./../images/check_on.png')
+
+
+let medicalTypesList = []
+let first = true
+const is8Ie = isIe8() //判断是否为IE8
+if(is8Ie) {
+  let reg = /undefined/g
+  checkOffImg = showImg.replace(reg, '')
+  checkOnImg = collapseImg.replace(reg, '')
+}
 
-var type = getUrlArgObject("type");
 $(".staticSearchT input").keyup(function(e) {
     const ev = e||window.event;
     const val = $(this).val();
-    const place = $(this).attr("placeholder")
     $(this).parents(".staticSearchT").find("i").css({display:val==""?"none":"inline-block"})
-    
-    if(place == '量表搜索'){
-        if(val == ''){
-            $(".searchScale .staticSearchB .empty").css({display:'none'})
-            $(".searchScale .staticSearchB .tip").css({display:'none'})
-            $(".searchScale .staticSearchB ul").html('')
-        }
-        ev.keyCode == 13&&getScaleData(val);
-    }else if(place == '医学知识搜索'){
-        if(val == ''){
-            $(".searchKnowledge .staticSearchB .empty").css({display:'none'})
-            $(".searchKnowledge .staticSearchB .tip").css({display:'none'})
-            $(".searchKnowledge .staticSearchB ul").html('')
-        }
-        ev.keyCode == 13&&getKnowledgeData(val);
+    if(val == ''){
+        $(".searchKnowledge .staticSearchB .empty").css({display:'none'})
+        $(".searchKnowledge .staticSearchB .tip").css({display:'none'})
+        $(".searchKnowledge .staticSearchB ul").html('')
     }
+    ev.keyCode == 13&&getKnowledgeData(val);
+})
+document.title = "医学知识搜索"
+$(".searchScale").css({display:'none'})
+$(".searchKnowledge").css({display:'block'})
+$(".searchKnowledge .staticSearchT").on('click','button',function() {
+    var val = $(this).parents(".staticSearchT").find("input").val()
+    val!=''&&getKnowledgeData(val)
 })
-if(type == 1){
-    document.title = "医学知识搜索"
-    $(".searchScale").css({display:'none'})
-    $(".searchKnowledge").css({display:'block'})
-    $(".searchKnowledge .staticSearchT").on('click','button',function() {
-        var val = $(this).parents(".staticSearchT").find("input").val()
-        val!=''&&getKnowledgeData(val)
+
+
+function getMedicalTypes() {
+    post(config.dictionaryInfo,{}).then((res) =>{
+        const data = res.data
+        if(data.code == 0) {
+            medicalTypesList = res.data.data[7]
+            medicalTypesList[0].checked = true
+            renderMedicalType(medicalTypesList)
+        } else {
+            console.log(res)
+        }
     })
-}else if(type == 2){
-    document.title = "量表搜索"
-    $(".searchKnowledge").css({display:'none'})
-    $(".searchScale").css({display:'block'})
-    $(".searchScale .staticSearchT").on('click','button',function(e) {
-        var val = $(this).parents(".staticSearchT").find("input").val()
-        val!=''&&getScaleData(val)
+}
+function renderMedicalType(medicalTypesList) {
+    let str = ''
+    for(let i = 0; i < medicalTypesList.length; i++) {
+        str += `<span class='medicalTypeItem' data-index=${i}><img src = ${medicalTypesList[i].checked? checkOnImg:checkOffImg}>${medicalTypesList[i].name}</span>`
+    }
+    $('.searchTypeBox').html(str)
+    bindMedicalTypeClick();
+}
+function bindMedicalTypeClick() {
+    $('.searchTypeBox .medicalTypeItem').on("click", function(){
+        const index = $(this).attr('data-index')
+        if(index == 0) {
+            if(medicalTypesList[0].checked) {
+                medicalTypesList[0].checked = false
+            }else {
+                for(let i = 0; i < medicalTypesList.length; i++) {
+                    medicalTypesList[i].checked = false
+                }
+                medicalTypesList[0].checked = true
+            }
+            renderMedicalType(medicalTypesList)
+        } else {
+            if(medicalTypesList[0].checked) {
+                medicalTypesList[0].checked = false
+            }
+            medicalTypesList[index].checked = !medicalTypesList[index].checked
+        }
+        renderMedicalType(medicalTypesList)
     })
 }
-
+getMedicalTypes()
 function getKnowledgeData(value) {
+    if(first) {
+        adjustHeight()
+        first =false
+    }
+    let medicalTypes = []
+    for(let i = 0; i < medicalTypesList.length; i++) {
+        if(medicalTypesList[i].checked) {
+            if(i !== 0) {
+                medicalTypes.push(medicalTypesList[i].val)
+            }
+        }
+    }
     post(config.getStaticKnowledge,{
-        inputStr: value
+        inputStr: value.replace(/\\/g,'\\\\').replace(/%/g,'\\%').replace(/\_/g,'\\_'),
+        types:medicalTypes
         }).then((res) => {
         const data = res.data
         if(data.code == 0) {
@@ -55,7 +102,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.name}' data-uname='${tmpPart.uniqueName}' data-type='1' data-sign='${tmpPart.type}'>
+                    var tmpLi = `<li data-name='${tmpPart.name}' data-uname='${tmpPart.uniqueName}' data-type='${tmpPart.libTypeId}' data-sign='${tmpPart.type}'>
                         <p>${tmpPart.name}<i>${tmpPart.libTypeName?('( '+tmpPart.libTypeName+' )'):''}</i></p>
                         ${tmpPart.retrievalName?('<span>• '+tmpPart.retrievalName+'</span>'):''}
                     </li>`
@@ -74,39 +121,11 @@ function getKnowledgeData(value) {
         }
     })
 }
-function getScaleData(value) {
-    post(config.getStaticScale,{
-        filterName: [],
-        name: value
-    }).then((res) => {
-        const data = res.data
-        if(data.code == 0) {
-            var knowledgeLis = data.data;
-            var lisStr = ''
-            if(knowledgeLis&&knowledgeLis.length>0){
-                for(var i = 0;i<knowledgeLis.length;i++){
-                    var tmpPart = knowledgeLis[i]
-                    var tmpLi = `<li data-name='${tmpPart.name}' data-type='2'>
-                        <p>${tmpPart.name}<i>${tmpPart.libTypeName?('( '+tmpPart.libTypeName+' )'):''}</i></p>
-                    </li>`
-                    lisStr += tmpLi
-                }
-                $(".searchScale .staticSearchB ul").html(lisStr)
-                $(".searchScale .staticSearchB .empty").css({display:'none'})
-                $(".searchScale .staticSearchB .tip").css({display:'block'})
-            }else{
-                $(".searchScale .staticSearchB .empty").css({display:'block'})
-                $(".searchScale .staticSearchB .tip").css({display:'none'})
-                $(".searchScale .staticSearchB ul").html('')
-            }
-        }else{
-            console.log(res)
-        }
-    })
-}
+
 function adjustHeight() {
     var ht = window.innerHeight;
-    $(".staticSearchB ul").height(ht - 120 + "px");
+    var ht2 = $(".searchTypeBox").outerHeight(true)
+    $(".staticSearchB ul").height(ht - 120 - ht2 + "px");
 }
 $(window).on('resize', function(){
     adjustHeight()
@@ -117,11 +136,15 @@ $(".staticSearchB ul").on("click","li",function(){
     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}&uname=${infoMsgUName}`)
+    if(type != 48){
+        openNewWin(`information.html?type=${encodeURIComponent(sign)}&position=0&name=${encodeURIComponent(infoMsgName)}&uname=${encodeURIComponent(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))
+        console.log('scaleName', msg,infoMsgName)
+        msg1.scaleName = infoMsgName
+        msg1.featureType = 21
+        openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
     }
 })
 
@@ -134,11 +157,3 @@ $(".staticSearchT").on('click','#clearKnowledge',function() {
     $(this).prev('.ipt').find('input').focus()
     $(this).css({display:"none"})
 })
-$(".staticSearchT").on('click','#clearScale',function() {
-    $(".staticSearchT input").val("")
-    $(".searchScale .staticSearchB ul").html('')
-    $(".searchScale .staticSearchB .tip").css({display:'none'})
-    $(".searchScale .staticSearchB .empty").css({display:'none'})
-    $(this).prev('.ipt').find('input').focus()
-    $(this).css({display:"none"})
-})

File diff suppressed because it is too large
+ 74 - 28
src/js/treatplan.js


+ 6 - 6
src/js/util.js

@@ -22,14 +22,14 @@ const transConf = function(arr) {
     //     {hospitalCode: "A001", sysType: 16, name: "警惕诊断", code: "vigilant_no", value: 3}
     // ]
     const reg = /_show$/g;
-    let newArr = arr.filter(item => item.code.match(reg) && item.value === 1 )
+    let newArr = arr.filter(item => item.code.match(reg) && +item.value === 1 )
     for(let i = 0; i < newArr.length; i++) {
         for (let j = 0; j < arr.length; j++) {
             if(arr[j].code.match(/_no$/g) && arr[j].code.replace('_no', ' ') === newArr[i].code.replace('_show', ' ')) {
-                newArr[i].orderNo = arr[j].value
+                newArr[i].orderNo = +arr[j].value
             }
             if(arr[j].code.match(/_num$/g) && arr[j].code.replace('_num', ' ') === newArr[i].code.replace('_show', ' ')) {
-                newArr[i].showNum = arr[j].value
+                newArr[i].showNum = +arr[j].value
             }
         }
     }
@@ -37,9 +37,9 @@ const transConf = function(arr) {
         return a.orderNo - b.orderNo
     })
     let showLabsNum, showPacsNum, labsAndPacMode
-    showLabsNum = arr.filter(item => item.code === 'inspeclis_num')[0].value
-    showPacsNum = arr.filter(item => item.code === 'inspecpacs_num')[0].value
-    labsAndPacMode = arr.filter(item => item.code === 'lispacs_place')[0].value
+    showLabsNum = arr.filter(item => item.code === 'inspeclis_num')[0]&&arr.filter(item => item.code === 'inspeclis_num')[0].value
+    showPacsNum = arr.filter(item => item.code === 'inspecpacs_num')[0]&&arr.filter(item => item.code === 'inspecpacs_num')[0].value
+    labsAndPacMode = arr.filter(item => item.code === 'lispacs_place')[0]&&arr.filter(item => item.code === 'lispacs_place')[0].value
     return {
         confArr: newArr,
         showLabsNum,