Bläddra i källkod

Merge remote-tracking branch 'origin/master' into referMaster

zhouna 5 år sedan
förälder
incheckning
55937b3d87

+ 23 - 1
src/css/index.less

@@ -393,6 +393,12 @@
 }
 
 /************治疗方案****************/
+.treatBox {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  overflow-y: auto;
+}
 .treatWrap{
   padding: 30px 60px;
   .treatMedicineWarp{
@@ -444,7 +450,23 @@
           border-radius: 4px;
           vertical-align: middle;
         }
-        
+        .medicineWaringDis {
+          background-color: #fff;
+          color: @grayColor;
+          font-size: 12px;
+          border-radius: 4px;
+          line-height: 18px;
+          border: 1px solid @grayColor;
+        }
+        .medicineWaringDisMsg {
+          color: @grayColor;
+          i {
+            color: @grayColor;
+          }
+        }
+        .medicineDis {
+          color: @grayColor;
+        }
         .medicine {
           position: relative;
           .infoMsg {

+ 99 - 11
src/css/indexHorizontal.less

@@ -1,4 +1,4 @@
-
+@import './common.less';
  .push .recommendInfoWrapper {
     height: 20px;
     line-height: 20px;
@@ -25,7 +25,7 @@
 }
 .push {
     margin-top: 10px;
-    width: 53%;
+    width: 52%;
     float: left;
     position: relative;
     padding-right: 2%;
@@ -41,11 +41,33 @@
 }
 .disclaimer {
     width: 5%;
+    min-width: 40px;
     float: left;
-    color: #d7d7d7;
+    color: #9C9C9C;
     text-align: center;
     border-right: 1px solid #f4f3f3;
     box-sizing: border-box;
+    display: table;
+    p{
+        width:14px;
+        display: table-cell;
+        word-break: break-all;
+        vertical-align: middle;
+    }
+    .version{
+        font-size: 12px;
+        line-height: 15px;
+        span{
+            color: #267FD7;
+            line-height: 14px;
+        }
+        &.new-icon i{
+            display: inline-block;
+            width: 100%;
+            height: 26px;
+            background: url("../images/newv.png") -3px -4px no-repeat;
+        }
+    }
 }
 
 .warning, .diagRecommend {
@@ -80,7 +102,6 @@
     position: relative;
 }
 .itemAllBox {
-    padding-right: 40px;
     background: #fff;
     border: 1px solid #3A73E1;
     border-radius: 4px;
@@ -139,22 +160,31 @@
     height: 20px;
     .mayIllness{
         float: left;
+        position: relative;
+        top: -5px;
+    }
+}
+.recommendInfoItem,.diagNameBox {
+    .infoMsg,
+    .infoMsgOn {
+        top: 4px;
     }
 }
 .infoMsg,
 .infoMsgOn {
-    position: absolute;
-    top: 2px;
-    right: 0px;
+    top: 8px;
 }
 .infoMsg,
 .infoMsgOn {
+    position: absolute;
+    right: 0px;
     display: none;
     cursor: pointer;
 }
 .durgNameBox {
     position: relative;
     padding-right: 15px;
+    display: inline-block;
 }
 .recommendInfoItemHasInfo:hover,
 .diagNameBox:hover,
@@ -231,14 +261,18 @@
     overflow: hidden;
 }
 .tipsInfoBox {
-    margin: 10px 0 0 80px;
-    line-height: 30px;
+    margin: 10px 0 0 0px;
+    line-height: 20px;
     height: 180px;
     overflow-y: auto;
     img {
         display: none;
     }
 }
+.diagName {
+    height: 30px;
+    line-height: 30px;
+}
 .drugTreatmentInfoItemBox {
     .ellipse;
     height: 30px;
@@ -247,7 +281,7 @@
     margin-top: 10px;
 }
 .labAndPacsRecommend  .labAndPacsTitle {
-    padding:5px; 
+    padding: 0 5px; 
     margin-right: 5px;
     background: #e2eaf2;
     border-radius: 4px;
@@ -277,7 +311,8 @@
 }
 .itemAll{
     max-height: 230px;
-    overflow-y: auto
+    overflow-y: auto;
+    margin-right: 20px;
 }
 .recommendInfoItem {
     position: relative;
@@ -313,3 +348,56 @@
     margin-left: 20px;
     cursor: pointer;
 }
+.durgNameBox {
+    .medicineWaring {
+        background-color: #f4c051;
+        color: #000;
+        font-size: 12px;
+        border-radius: 4px;
+        border: 1px solid #fff;
+        line-height: 18px;
+      }
+      .medicineWaringDisMsg {
+        background-color: #fff;
+        color: @grayColor;
+        font-size: 12px;
+        border-radius: 4px;
+        line-height: 18px;
+        border: 1px solid @grayColor;
+      }
+      .medicineWaringDisMsg {
+        color: @grayColor;
+      }
+}
+.medicineWaringDis {
+    color: @grayColor;
+  }
+.medicineWaringDis:hover {
+color: @grayColor;
+}
+
+.staticWin {
+    text-decoration: underline;
+    cursor: pointer;
+    position: relative;
+    margin: 10px 0 0 0;
+}
+.tipsInfoItem{
+    position: relative;
+    // max-height: 60px;
+    overflow: hidden;
+}
+.hasMore:after{
+    content: "..."; 
+    position: absolute; 
+    bottom: 0; 
+    right: 0; 
+    padding-left: 20px;
+    background: -webkit-linear-gradient(left, transparent, #fff 55%);
+    background: -moz-linear-gradient(left, transparent, #fff 55%);
+    background: -o-linear-gradient(left, transparent, #fff 55%);
+    background: linear-gradient(to right, transparent, #fff 55%);
+}
+.boldFont {
+    font-weight: bold;
+}

+ 52 - 5
src/css/indexVert.less

@@ -35,7 +35,7 @@
     }
 }
 
-.treatRecommend {
+.treatRecommend,.knowledgeInfo,.scaleInfo {
     h4 {
         background-color: #E3FEFE;
     }
@@ -54,10 +54,10 @@
 }
 
 .recommendInfoBox {
-    padding: 17px;
+    padding: 4px 17px;
 }
 
-.treatRecommend h4 i {
+.treatRecommend h4 i,.knowledgeInfo h4 i,.scaleInfo h4 i {
     background: url(/images/zhiliao.png) center center no-repeat;
 }
 .tipsInfo h4 i {
@@ -141,8 +141,9 @@
 .durgNameBox {
     position: relative;
     padding-right: 15px;
+    display: inline-block;
     .infoMsg, .infoMsgOn {
-        top: 4px;
+        top: 6px;
     }
 }
 .durgName, .diagName{
@@ -270,18 +271,28 @@
     height: 40px;
     width: 100%;
     line-height: 40px;
-    text-align: center;
     position: fixed;
     bottom: 0;
     background-color: #ececec;
     left: 0;
     z-index: 98;
+    .version-tip{
+        margin-left: 20px;
+        font-size: 12px;
+        padding-right: 34px;
+        cursor: pointer;
+        &.new-icon{
+            background: url(../images/new.png) 100% 0px no-repeat;
+        }
+    }
     .logo {
         float: left;
+        font-size: 12px;
         margin-left: 15px;
     }
     .disclaimerInfo {
         float: right;
+        font-size: 12px;
         margin-right: 15px;
     }
 }
@@ -320,4 +331,40 @@
     text-align: center;
     margin-left: 20px;
     cursor: pointer;
+}
+.durgNameBox {
+    .medicineWaring {
+        background-color: #f4c051;
+        color: #000;
+        font-size: 12px;
+        border-radius: 4px;
+        border: 1px solid #fff;
+        line-height: 18px;
+      }
+      .medicineWaringDisMsg {
+        background-color: #fff;
+        color: @grayColor;
+        font-size: 12px;
+        border-radius: 4px;
+        line-height: 18px;
+        border: 1px solid @grayColor;
+      }
+      .medicineWaringDisMsg {
+        color: @grayColor;
+      }
+}
+.medicineWaringDis {
+    color: @grayColor;
+    .durgName{
+        border-bottom: 1px solid @grayColor;
+    }
+  }
+.medicineWaringDis:hover {
+    color: @grayColor;
+}
+
+.staticWin {
+    color: #040428;
+    text-decoration: underline;
+    cursor: pointer;
 }

+ 101 - 0
src/css/staticSearch.css

@@ -0,0 +1,101 @@
+.container {
+    width: 80%;
+    background: #fff;
+    margin: 0 auto;
+    padding: 0 30px;
+    position: absolute;
+    /* width: 80%; */
+    left: 30px;
+    right: 30px;
+    height: 100%;
+    overflow: hidden;
+    /* box-sizing: border-box; */
+}
+.staticSearchT {
+    position: relative;
+    padding-right: 80px;
+    padding-bottom: 15px;
+    padding-top: 30px;
+}
+.container .ipt {
+    width: 100%;
+    height: 34px;
+    padding: 5px 25px 5px 5px;
+    vertical-align: top;
+    display: inline-block;
+    box-sizing: border-box;
+    border: 1px #CECECE solid;
+}
+.container .ipt input {
+    width: 100%;
+    position: relative;
+    top: 1px;
+}
+.container .searchScale {
+    display: none;
+}
+.container .staticSearchT button {
+    position: absolute;
+    right: 0;
+    top: 30px;
+    width: 80px;
+    height: 34px;
+    line-height: 34px;
+    color: #fff;
+    background: #2A9BD5;
+    text-align: center;
+    border: none;
+}
+.container .staticSearchT i {
+    position: absolute;
+    width: 15px;
+    height: 15px;
+    right: 85px;
+    top: 40px;
+    display: inline-block;
+    cursor: pointer;
+    background: url(/images/del_nor.png) center center no-repeat;
+    background-size:15px 15px;
+    z-index: 100;
+}
+.staticSearchB .tip,.container .staticSearchT i,.staticSearchB .empty {
+    display: none;
+}
+.staticSearchB .empty {
+    color: #979797;
+    text-align: center;
+    line-height: 40px;
+    margin-top: 10px;
+}
+.staticSearchB ul {
+    position: absolute;
+    height: 480px;
+    /* width: 100%; */
+    right: 30px;
+    left: 30px;
+    overflow: auto;
+}
+.staticSearchB ul li {
+    border-bottom: 1px #CECECE solid;
+    line-height: 30px;
+    padding-top: 5px;
+    cursor: pointer;
+}
+.staticSearchB ul li:hover {
+    border-bottom: 2px solid #3B9ED0;
+}
+.staticSearchB ul i {
+    font-size: 12px;
+    color: #2A9BD5;
+}
+.staticSearchB .tip {
+    font-size: 12px;
+    color: #979797;
+    margin-bottom: 10px;
+}
+.staticSearchB ul span {
+    color: #979797;
+    font-size: 12px;
+    margin-bottom: 10px;
+    line-height: 20px;
+}

+ 1 - 0
src/html/drugInfo.html

@@ -84,6 +84,7 @@
       top: 0;
       margin-right: 14px;
       overflow: auto;
+      height: 100%;
     }
 
     .anchors ul {

+ 2 - 1
src/html/index.html

@@ -17,10 +17,11 @@
   <div class="bodyWrap">
       <div class="iframeWrap">
         <div class="recommendWrap"></div>
-        <p class="responsibility">以上推送为常见诊断及问诊内容,实际以医生临床判断为准</p>
+        <p class="responsibility"></p>
       </div>
       <div class="disclaimer clearfix">
         <span class="logo">&copy 朗通医疗</span>
+        <span class="version-tip">版本说明</span>
         <span class="disclaimerInfo">免责声明</span>
       </div>
   </div>

+ 5 - 1
src/html/indexHorizontal.html

@@ -18,7 +18,11 @@
       <div class="iframeWrap">
         <div class="recommendWrap clearfix">
           <div class="disclaimer clearfix">
-            <span class="logo">智<br/>能<br/>推<br/>送<br/>仅<br/>供<br/>参<br/>考<br/>&copy; <br/>朗<br/>通<br/>医<br/>疗</span>
+            <p></p>
+            <p class="version">版本说明<i></i></p>
+            <p></p>
+            <p class="logo">智<br/>能<br/>推<br/>送<br/>仅<br/>供<br/>参<br/>考<br/>&copy; <br/>朗<br/>通<br/>医<br/>疗</p>
+            <p></p>
           </div>
             <div class="push"></div>
             <div class="infomationBox clearfix">

+ 1 - 1
src/html/information.html

@@ -3,7 +3,6 @@
 
 <head>
   <meta charset="utf-8">
-  <title>诊断指南</title>
   <style>
     * {
       margin: 0;
@@ -83,6 +82,7 @@
       top: 0;
       margin-right: 14px;
       overflow: auto;
+      height: 100%;
     }
 
     .anchors ul {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 46 - 14
src/html/scale.html


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 76 - 0
src/html/staticSearch.html


+ 2 - 2
src/html/treatplan.html

@@ -14,7 +14,7 @@
 </head>
 
 <body>
-<div class="bodyWrap">
+<div class="bodyWrap treatBox">
     <div class="iframeWrap treatWrap">
         <ul>
             <li class="conditionHintPub conditionHintZhiliao">
@@ -26,7 +26,7 @@
                             <p class="treatPlanNullText">暂无推荐</p>
                     </div>
                     <div class="treatMedicineWarp">
-                        <p class="treatDrug">推荐药物</p>
+                        <p class="treatDrug">药物治疗</p>
                         <p class="treatMedicineNullText">暂无推荐</p>
                         <div class="drugWarp"></div>
                     </div>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 71 - 0
src/html/version.html


BIN
src/images/del_nor.png


BIN
src/images/new.png


BIN
src/images/newv.png


+ 3 - 3
src/js/disclaimer.js

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

+ 61 - 98
src/js/index.js

@@ -7,7 +7,8 @@ var Promise = require("bluebird");
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
 const { transConf } = require('./util.js');
-const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo } = require('./indexVertDom.js');
+const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo ,renderKnowledgeInfo,renderScaleInfo} = require('./indexVertDom.js');
+
 
 let mrId = getUrlArgObject('mrId') 
 let msg;
@@ -58,110 +59,45 @@ if(mrId) {
 // window.msg = msg
 // window.pushMessage = {}
 function getConf() {
-  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
-        const data = res.data
-        if(data.code == 0){
-            let confArr = transConf(data.data)
-            window.confArr = confArr;
-        }
-  })
+  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
 }
 
 function getPushInfo() {
-  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
-          var data = res.data
-          if(data.code == 0){
-              window.pushInfo = data
-              var result = data.data;
-              // if(result.medicalIndications && result.medicalIndications.length>0){//病情提示
-              //   window.pushMessage = result.medicalIndications;//计算的需要的相关数据
-              //   renderRecommendConditTips('conditTips','病情提示', result.medicalIndications || [])
-              // }
-              if(result.dis){
-                  const diagPossible = result.dis['可能诊断'] || []//可能
-                  const diagDoubt = result.dis['疑似诊断'] || [] // 疑似
-                  const diagDeter = result.dis['确诊'] || []//确诊
-                  const diagWaring = result.dis['警惕'] || [] // 推荐警惕诊断
-                  const symptomRecommend = result.symptom || []  //推荐问诊症状
-                  const physiExamRecommend  = result.vital || [] //推荐体格检查
-                  const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
-                  const labRecommend = result.lab || []
-                  const pacsRecommend = result.pacs || []
-                  const labAndPacsRecommend = [
-                      {
-                          title: '化验',
-                          className: 'labRecommend',
-                          data:  labRecommend
-                      },
-                      {
-                          title: '辅检',
-                          className: 'pacsRecommend',
-                          data:  pacsRecommend
-                    }
-                  ]
-              }
-          }else {
-            window.pushInfo = {}
-          }
-  })
+  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
   
 }
 
 function getTreatment() {
-  return  post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
-          var data = res.data
-          if(data.code == 0){
-            window.treatInfo = data
-          } else {
-            window.treatInfo = {}
-          }
-  })
-  
+  return  post(config.pushTreatment,Object.assign({featureType: '8'},msg))
 }
 
 function getTipsInfo() {
-  post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
-    var data = res.data
-    if(data.code == 0) {
-        window.tipsInfo = data
-    } else {
-      window.tipsInfo = {}
-    }
-    
-  }).catch(function (err) {
-    console.log(err);
-  })
+  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})
 }
 
 
-// getConf()
-// pushInfo()
-// getTreatment();
 function getPageInfo() {
 
   Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3, res4]) =>{
-    if(pushInfo&&pushInfo.code == 0) {
-      pushResult = pushInfo.data;
-    } else {
-      pushResult = {};
-    }
-    if(treatInfo&&treatInfo.code == 0) {
-      treatResult = treatInfo.data
-    } else {
-      treatResult = {}
-    }
-    if(tipsInfo&&tipsInfo.code == 0) {
-      tipsResult = tipsInfo.data
-    } else {
-      tipsResult = {}
-    }
+    // console.log({res1, res2, res3, res4})
+    const configArr = res1&&res1.data&&res1.data.data || []
+    const pushInfo = res2&&res2.data || {}
+    const treatInfo = res3&&res3.data || {}
+    const tipsInfo = res4&&res4.data || []
+    const confArr = transConf(configArr)
+    pushResult = pushInfo.data || {};
+    treatResult = treatInfo.data || {}
+    tipsResult = tipsInfo.data || {}
+
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
     const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
     const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
     const symptomRecommend = pushResult.symptom || []  //推荐问诊症状
     const physiExamRecommend  = pushResult.vital || [] //推荐体格检查
-    const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
+    const diagRecommend = diagDeter.concat(diagDoubt, diagPossible) //推荐诊断
     const labRecommend = pushResult.lab || []
     const pacsRecommend = pushResult.pacs || []
     const medicalIndications = pushResult.medicalIndications || []
@@ -180,6 +116,7 @@ function getPageInfo() {
     window.pushMessage = medicalIndications;//计算的需要的相关数据
 
     for(let i = 0; i < confArr.length; i++) {
+
       switch(confArr[i].code) {
         case "inquiry_show":  //问诊症状
           renderRecommendInfo('symptomRecommend', '问诊症状', symptomRecommend, false)
@@ -206,20 +143,16 @@ function getPageInfo() {
           renderTipsInfo('tipsInfo','提示信息',tipsResult)
           moreInfo()
           break;
+        case "knowledge_show": //医学知识
+          renderKnowledgeInfo('knowledgeInfo','医学知识','点击搜索医学知识')
+          break;
+        case "scale_show": //全部量表
+          renderScaleInfo('scaleInfo','全部量表','点击搜索全部量表')
+          break;
         default:
-           return
+          break
       } 
     }
-  
-    // renderRecommendInfo('warning', '警惕诊断', diagWaring, true,7,2)
-    // renderRecommendInfo('diagRecommend', '推荐诊断', diagRecommend, true,7,2)
-    // renderRecommendInfo('symptomRecommend', '问诊症状', symptomRecommend, false)
-    // renderRecommendInfo('physiExamRecommend', '体格检查', physiExamRecommend, false)
-    // renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
-    // renderTreat('treatRecommend','治疗方案',treatResult) 
-    
-    // renderRecommendConditTips('conditTips','病情提示', medicalIndications || [])
-    
   }).catch(function (err) {
     console.log(err);
   })
@@ -229,12 +162,42 @@ function getPageInfo() {
 function moreInfo() {
   $('.moreInfo').click(function(){
     const name = $(this).attr('data-name')
-    const type = getUrlArgObject('tipsType')
+    const type = $(this).attr('data-type')
     openNewWin(`information.html?type=${type}&position=0&name=${name}`)
   })
 }
 
+function getVersion() {
+  post(config.getVersion, '').then((res) => {
+    const data = res.data.data;
+    const ver = localStorage.getItem('versionTime');
+    const time = data.refreshTime;
+    if(!ver||ver===time+"=new"||time!==ver.replace("=new","")){       //判断版本是否更新
+      $(".version-tip").addClass('new-icon');
+      localStorage.setItem('versionTime',time+"=new");     //保存版本更新时间
+    }else{
+      $(".version-tip").removeClass('new-icon');
+    }
+  })
+}
+  function getDisclaimer() {
+    post(config.disclaimer, '').then((res) => {
+      const data = res.data.data.find(item => item.disclaimerCode == '2');
+      $(".responsibility").html(data.description);
+    })
+  }
+
 
-$(".disclaimerInfo").on("click", function(){
-  openNewWin("disclaimer.html")
-})
+$(function(){
+  getDisclaimer(); //获取免责声明
+  getVersion();   //获取版本信息
+  $(".disclaimerInfo").on("click", function(){
+    openNewWin("disclaimer.html")
+  });
+  $(".version-tip").on("click", function(){
+    const ver = localStorage.getItem('versionTime');
+    $(".version-tip").removeClass('new-icon');
+    localStorage.setItem('versionTime',ver.replace("=new",""));
+    openNewWin("version.html");
+  });
+});

+ 70 - 106
src/js/indexHorizontal.js

@@ -14,7 +14,7 @@ let treatImg = require('./../images/zhiliao.png')
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin, isIe8 } = require('./promise.js');
 const { transConf } = require('./util.js');
-const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo } = require('./indexHorizontalDom.js');
+const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo ,renderKnowledgeInfo,renderScaleInfo} = require('./indexHorizontalDom.js');
 const is8Ie = isIe8() //判断是否为IE8
 if(is8Ie) {
   let reg = /undefined/g
@@ -36,7 +36,6 @@ if(mrId) {
     if(data.code == 0) {
       msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
       window.msg = msg
-      window.pushMessage = {} 
       getPageInfo();
     }
   })
@@ -55,7 +54,6 @@ if(mrId) {
     plan:getUrlArgObject('plan') || '0',
   }
   window.msg = msg
-  window.pushMessage = {} 
   getPageInfo();
 }
 
@@ -77,102 +75,42 @@ if(mrId) {
 // window.msg = msg
 // window.pushMessage = {}
 function getConf() {
-  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
-      const data = res.data
-      if(data.code == 0){
-          let confArr = transConf(data.data)
-          window.confArr = confArr;
-      }
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
 }
 
 function getPushInfo() {
-  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
-    var data = res.data
-    if(data.code == 0){
-      window.pushInfo = data
-    } else {
-      window.pushInfo = {}
-    }
-      
-    
-      
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
 }
 
 function getTreatment() {
-  post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
-    var data = res.data
-    if(data.code == 0){
-      window.treatInfo = data
-      } else {
-        window.treatInfo = {}
-      }
-    // if(data.code == 0){
-    //   var result = data.data;
-    //   renderTreat(treatImg, 'treatRecommend','治疗方案',result)
-    //   // var num = 0;
-    //   // if(result.commonTreatment && result.commonTreatment.content){
-    //   //   ++num
-    //   //   ybzlFun(result.commonTreatment.content)//一般治疗
-    //   // }
-    //   // if(result.treatment && result.treatment.length>0){
-    //   //   ++num
-    //   //   cyywFun(result.treatment)//常用药物
-    //   // }
-    //   // if(num == 0){
-    //   //   $(".conditionHintZhiliaoNull").css("display","block")
-    //   // }
-    // } else {
-    //   renderTreat(treatImg,'treatRecommend','治疗方案',{})
-    // }
-  }).catch(function (err) {
-    console.log(err);
-  })
+  return post(config.pushTreatment,Object.assign({featureType: '8'},msg))
 }
 
 
 function getTipsInfo() {
-  post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
-    var data = res.data
-    if(data.code == 0) {
-      window.tipsInfo = data
-    }else {
-      window.tipsInfo = {}
-    }
-  }).catch(function (err) {
-    console.log(err);
-  })
+  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})
 }
 
 function getPageInfo() {
   Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
-    if(pushInfo&&pushInfo.code == 0) {
-      pushResult = pushInfo.data;
-    } else {
-      pushResult = {};
-    }
-    if(treatInfo&&treatInfo.code == 0) {
-      treatResult = treatInfo.data
-    } else {
-      treatResult = {}
-    }
-    if(tipsInfo&&tipsInfo.code == 0) {
-      tipsResult = tipsInfo.data
-    } else {
-      tipsResult = {}
-    }
+    const configArr = res1&&res1.data&&res1.data.data || []
+    const pushInfo = res2.data || {}
+    const treatInfo = res3.data || {}
+    const tipsInfo = res4.data || []
+    const confArr = transConf(configArr)
+    pushResult = pushInfo.data || {};
+    treatResult = treatInfo.data || {}
+    tipsResult = tipsInfo.data || {}
+    
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
     const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
     const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
     const symptomRecommend = pushResult.symptom || []  //推荐问诊症状
     const physiExamRecommend  = pushResult.vital || [] //推荐体格检查
-    const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
+    const diagRecommend = diagDeter.concat(diagDoubt, diagPossible) //推荐诊断
     const labRecommend = pushResult.lab || []
     const pacsRecommend = pushResult.pacs || []
     const medicalIndications = pushResult.medicalIndications || []
@@ -191,7 +129,6 @@ function getPageInfo() {
     window.pushMessage = medicalIndications;//计算的需要的相关数据
     let tipsNum = 0;
     for(let i = 0; i < confArr.length; i++) {
-  
       switch(confArr[i].code) {
         case "inquiry_show":  //问诊症状
           renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
@@ -220,19 +157,29 @@ function getPageInfo() {
           renderTipsInfo('', 'tipsInfo','提示信息',tipsResult)
           moreInfo()
           break;
+        case "knowledge_show": //医学知识
+          tipsNum++;
+          renderKnowledgeInfo('','knowledgeInfo','医学知识','点击搜索医学知识')
+          break;
+        case "scale_show": //全部量表
+          tipsNum++;
+          renderScaleInfo('','scaleInfo','全部量表','点击搜索全部量表')
+          break;
         default:
-           return
+          break;
       } 
     }
-    
     function bindTab() {
-      if(showTab == '1') {
-          $('.infoTabBox .tipsTab').addClass('activeTab')
-          $('.infomationBox .treatRecommend').css("display","none")
-      } else {
-        $('.infoTabBox .treatTab').addClass('activeTab')
-        $('.infomationBox .tipsInfo').css("display","none")
-      }
+      $('.infoTabBox .infoTab').eq(showTab).addClass('activeTab').siblings().removeClass('activeTab')
+      $('.informationBox').eq(showTab).siblings(".informationBox").css({"display":"none"})
+      // if(showTab == '1') {
+      //     $('.infoTabBox .tipsTab').addClass('activeTab')
+      //     $('.infomationBox .treatRecommend').css("display","none")
+      // } else {
+      //   $('.infoTabBox .treatTab').addClass('activeTab')
+      //   $('.infomationBox .tipsInfo').css("display","none")
+      //   $('.infomationBox .staticWin').css("display","none")
+      // }
 
       $('.infomationBox .infoTab').click(function() {
         $(this).addClass('activeTab').siblings().removeClass('activeTab')
@@ -242,14 +189,19 @@ function getPageInfo() {
       })
     
     }
-    // bindTab();
-    if(tipsNum === 2) {
+    if(tipsNum > 1) {
       bindTab();
+    }else if(tipsNum == 0){
+      $('.push').css({
+        "width":"95%",
+        "border-right":"0 none"
+      })
+      $('.itemAllBox').css({"width":"98%"})
     }
     function moreInfo() {
       $('.moreInfo').click(function(){
         const name = $(this).attr('data-name')
-        const type = getUrlArgObject('tipsType')
+        const type = $(this).attr('data-type')
         openNewWin(`information.html?type=${type}&position=0&name=${name}`)
       })
     }
@@ -258,23 +210,35 @@ function getPageInfo() {
     if(pushHei == 0) {
       $('.infomationBox').css({"width":"90%"})
     }
-    // renderRecommendInfo(warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
-    // renderRecommendInfo(diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
-    // renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
-    // renderRecommendInfo(physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
-    // renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
-    // renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult) 
-    
-    // renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
+  
     
   }).catch(function (err) {
     console.log(err);
   })
 
 }
-
-
-
-$(".disclaimerInfo").on("click", function(){
-  openNewWin("disclaimer.html")
-})
+function getVersion() {
+  post(config.getVersion, '').then((res) => {
+    const data = res.data.data;
+    const name = data.name;
+    const ver = localStorage.getItem('versionTime-v');
+    const time = data.refreshTime;
+    if(!ver||ver===time+"=new"||time!==ver.replace("=new","")){       //判断版本是否更新
+      $(".version").addClass('new-icon');
+      localStorage.setItem('versionTime-v',time+"=new");     //保存版本更新时间
+    }else{
+      $(".version").removeClass('new-icon');
+    }
+    $(".version span").html(name);
+  })
+}
+$(function(){
+  getVersion();
+  //打开版本信息
+  $(".disclaimer .version").on("click",function() {
+    const ver = localStorage.getItem('versionTime-v');
+    $(".version").removeClass('new-icon');
+    localStorage.setItem('versionTime-v',ver.replace("=new",""));
+    openNewWin("version.html");
+  });
+ })

+ 79 - 36
src/js/indexHorizontalDom.js

@@ -27,7 +27,7 @@ function renderRecommendInfo(icon, className,title,data, hasInfo, type, position
         for (let i = 0; i < data.length; i++) {
             childrenNodeStr += `<span class="recommendInfoItem recommendInfoItemHasInfo">
                                     ${data[i].name}
-                                    <span  title="点击名称可看详细说明" class="infoMsg" data-name=${data[i].name}></span>
+                                    <span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].name}></span>
                                 </span>`
         }
     } else {
@@ -100,9 +100,9 @@ function renderMultRecommendInfo(icon, className,title,data, hasInfo, type, posi
 }
 
 function renderTreat(icon, className,title, data) {
-    $('.infoTabBox').append(`<span class="infoTab treatTab"  data-box="${className}">${title}</span>`)
+    $('.infoTabBox').append(`<span class="infoTab treatTab boldFont"  data-box="${className}">${title}</span>`)
     const str = `<div class="informationBox recommendInfoWrapper ${className} clearfix">
-                    <span class="diagName">${msg.diseaseName?msg.diseaseName:''}</span>
+                    <span class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</span>
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </div>`
     $('.infomationBox').append(str)
@@ -111,6 +111,26 @@ function renderTreat(icon, className,title, data) {
     renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, 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>`)
+    const str = `<div class="informationBox staticWin recommendInfoWrapper ${className} clearfix">
+                    <p class="diagName">${data}</p>
+                </div>`
+    $('.infomationBox').append(str)
+    $('.'+className+'.staticWin' ).on('click', function(){
+        openNewWin(`staticSearch.html?type=1`)
+    })
+}
+function renderScaleInfo(icon, className,title, data) {
+    $('.infoTabBox').append(`<span class="infoTab tipsTab boldFont"  data-box="${className}">${title}</span>`)
+    const str = `<div class="informationBox staticWin recommendInfoWrapper ${className} clearfix">
+                    <p class="diagName">${data}</p>
+                </div>`
+    $('.infomationBox').append(str)
+    $('.'+className+'.staticWin' ).on('click', function(){
+        openNewWin(`staticSearch.html?type=2&msg=${encodeURIComponent(JSON.stringify(msg))}`)
+    })
+}
 
 function renderTreatText(className,title,data, parentNode) {
     const childrenNodeBoxStr = `
@@ -152,19 +172,23 @@ function renderTreatDrug(className,title,data, parentNode) {
         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].medicitionName}`
-            if(data[i].medicitionsList[j].drugsForbidden == '1') {
-                childrenNodeStr += `<span>慎用</span>`
-            } else if(data[i].medicitionsList[j].drugsForbidden == '2') {
-                childrenNodeStr += `<span>禁用</span>`
+            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="点击名称可看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>,</span></span>`
-            childrenNodeStr += `使用率${data[i].medicitionsList[j].rate}`
-            if(j === data[i].medicitionsList.length-1) {
-                childrenNodeStr += ';'
-            } else {
+            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)
@@ -201,46 +225,61 @@ function renderTreatDrug(className,title,data, parentNode) {
 }
 
 function renderTipsInfo(icon, className,title,data) {
-  
-    $('.infoTabBox').append(`<span class="infoTab tipsTab" data-box="${className}">${title}</span>`)
+    $('.infoTabBox').append(`<span class="infoTab tipsTab boldFont" data-box="${className}">${title}</span>`)
     let str
-    if(!data.name) {
+    if(data.length === 0) {
         str = `<div class="informationBox tipsInfoWrapper ${className} clearfix">
             <p class="diagName recommendNull">暂无数据</p>
             <div class="tipsInfoBox clearfix ${className + 'box'}"></div>
         </div>`
     } else {
         str = `<div class="informationBox tipsInfoWrapper ${className} clearfix">
-                    <p class="diagName">${data.name} <span class="moreInfo" data-name="${data.name}">详情</span></p>
-                    <p class="tipsTitle">诊断依据:</p>
-                    <div class="tipsInfoBox clearfix ${className + 'box'}"></div>
+                    <div class="tipsInfoBox clearfix ${className + 'box'}">
+                    </div>
                 </div>`
     }
     
     $('.infomationBox').append(str)
-    if(data.name) {
-        renderTipsInfoText('','诊断依据',data.details,className + 'box')
+    for(let i = 0; i < data.length; i++) {
+        renderTipsInfoText('','诊断依据',data[i],className + 'box')
+    }
+    // if(data.name) {
+    //     renderTipsInfoText('','诊断依据',data.details,className + 'box')
+    // }
+    if(data.length > 1) {
+        $('.tipsInfoItem').each(function(i, obj){
+            var lineHeight = parseInt($(this).css("line-height"));
+            var height = parseInt($(this).height());
+            if((height / lineHeight) >3 ){
+                $(this).addClass("hasMore")
+                $(this).css("height","60px");    
+            }else{
+                $(this).removeClass("hasMore");
+            }
+        });
     }
+   
 }
 
 
 function renderTipsInfoText(className,title,data, parentNode) {
-    let childrenNodeBoxStr = ``
-    if(data.length === 0) {
+    let childrenNodeBoxStr = `<p class="diagName boldFont">${data.name} <span class="moreInfo"  data-name="${data.name}" data-type="${data.type}">详情</span></p>`
+    if(data.details.length === 0) {
         childrenNodeBoxStr += `<p class="recommendNull">暂无数据</p>
-                                
                             `
     } else {
-        for(let i = 0; i < data.length; i++) {
-            childrenNodeBoxStr += `<p>${data[i].title}</p>
-                                    ${data[i].content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}
+        for(let i = 0; i < data.details.length; i++) {
+            childrenNodeBoxStr += `<div class="tipsInfoItem">
+                                        <p class="tipsInfoItemTitle">${data.details[i].title}</p>
+                                        ${data.details[i].content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}
+                                   </div>
                                 `
         }
     }
    
     $('.' + parentNode).append(childrenNodeBoxStr)
   
-    
+   
 }
 
 function renderRecommendConditTips(icon, className,title,data) {
@@ -316,9 +355,11 @@ function renderRecommendConditTips(icon, className,title,data) {
 function slideToggle(className){//展开收起
     const domName = $(className)
     const domNameBoxAll = $(className+'All')
-    if(domName.height() > 20){
-      domName.append(`<span class="slideDown"><img src="${showImg}"></span>`)
-    }
+    setTimeout(() => {
+        if(domName.height() > 20){
+          domName.append(`<span class="slideDown"><img src="${showImg}"></span>`)
+        }
+    });
     domName.on('click',".slideDown",function(){
         $(".itemAllBox").css('display', 'none')
         $(domNameBoxAll).css('display', 'block')
@@ -328,15 +369,17 @@ function slideToggle(className){//展开收起
         $(domNameBoxAll).css('display', 'none')
     })
   }
-
-  $(".disclaimer").on("click",function() {
-    openNewWin("disclaimer.html")
-  })
+//打开免责申明
+  $(".disclaimer .logo").on("click",function() {
+    openNewWin("disclaimer.html");
+  });
 
 module.exports = {
     renderRecommendInfo,
     renderMultRecommendInfo,
     renderTreat,
     renderRecommendConditTips,
-    renderTipsInfo
+    renderTipsInfo,
+    renderKnowledgeInfo,
+    renderScaleInfo
 }

+ 50 - 18
src/js/indexVertDom.js

@@ -16,7 +16,7 @@ function renderRecommendInfo(className,title,data, hasInfo, type, position) {
         for (let i = 0; i < data.length; i++) {
             childrenNodeStr += `<span class="recommendInfoItem recommendInfoItemHasInfo">
                                     ${data[i].name}
-                                    <span  title="点击名称可看详细说明" class="infoMsg" data-name=${data[i].name}></span>
+                                    <span  title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].name}></span>
                                 </span>`
         }
     } else {
@@ -39,7 +39,6 @@ function renderRecommendInfo(className,title,data, hasInfo, type, position) {
 }
 
 function renderMultRecommendInfo(className,title,data, hasInfo, type, position) {
-    console.log('data', data)
     const str = `<div class="recommendInfoWrapper ${className}">
                     <h4><i></i>${title}</h4>
                     <div class="recommendInfoBox ${className + 'box'}"></div>
@@ -67,18 +66,45 @@ function renderTipsInfo(className,title, data) {
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </div>`
     $('.recommendWrap').append(str)
-    if(data.name) {
-        renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
+    if(data.length > 0) {
+        for(let i = 0; i < data.length; i++) {
+            renderTipsInfoMsg('tipsInfo'+i, data[i], data[i].details, className+'box')
+
+        }
     } else {
         // renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
         $('.' + className+'box').append('<p class="TipsInfoNull">暂无数据</p>')
     }
 }
 
-function renderTipsInfoMsg(className,title,data, parentNode) {
+function renderKnowledgeInfo(className,title, data) {
+    const str = `<div class="recommendInfoWrapper ${className}">
+                    <h4><i></i>${title}</h4>
+                    <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
+                </div>`
+    $('.recommendWrap').append(str)
+    $('.' + className+'box').append('<p class="TipsInfoNull staticWin">'+data+'</p>')
+    $('.'+className+' .staticWin' ).on('click', function(){
+        openNewWin(`staticSearch.html?type=1`)
+    })
+}
+
+function renderScaleInfo(className,title, data) {
+    const str = `<div class="recommendInfoWrapper ${className}">
+                    <h4><i></i>${title}</h4>
+                    <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
+                </div>`
+    $('.recommendWrap').append(str)
+    $('.' + className+'box').append('<p class="TipsInfoNull staticWin">'+data+'</p>')
+    $('.'+className+' .staticWin' ).on('click', function(){
+        openNewWin(`staticSearch.html?type=2&msg=${encodeURIComponent(JSON.stringify(msg))}`)
+    })
+}
+
+function renderTipsInfoMsg(className,item,data, parentNode) {
     const childrenNodeBoxStr = `
         <div class = "treatItemBox ${className + 'box'}">
-            <p class="treatItemTitle">${title} <span class="moreInfo" data-name="${title}">详情</span></p>
+            <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>
     `
@@ -94,7 +120,6 @@ function renderTipsInfoMsg(className,title,data, parentNode) {
                         `
         }
     }
-    
     $('.' + className+'Info').html(dataStr)
 }
 
@@ -150,19 +175,24 @@ function renderTreatDrug(className,title,data, parentNode) {
         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"><span class="durgName">${data[i].medicitionsList[j].medicitionName}</span>`
-            if(data[i].medicitionsList[j].drugsForbidden == '1') {
-                childrenNodeStr += `<span>慎用</span>`
-            } else if(data[i].medicitionsList[j].drugsForbidden == '2') {
-                childrenNodeStr += `<span>禁用</span>`
+            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="点击名称可看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>,</span></span>`
-            childrenNodeStr += `使用率${data[i].medicitionsList[j].rate}`
-            if(j === data[i].medicitionsList.length-1) {
-                childrenNodeStr += ';'
-            } else {
+            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)
@@ -362,5 +392,7 @@ module.exports = {
     renderMultRecommendInfo,
     renderTreat,
     renderRecommendConditTips,
-    renderTipsInfo
+    renderTipsInfo,
+    renderKnowledgeInfo,
+    renderScaleInfo
 }

+ 6 - 1
src/js/information.js

@@ -16,6 +16,7 @@ function getInfomation() {
 
   post(config.information, param).then((res) => {
     const data = res.data.data
+    document.title = data.name
     var str = '';
     var anchors = '';
     var item = '';
@@ -80,4 +81,8 @@ function addLinkClickEvent() {
 function adjustHeight() {
   var ht = window.innerHeight;
   $(".content").height(ht - 145 + "px");
-}
+}
+$(window).on('resize', function(){
+  adjustHeight()
+})
+

+ 56 - 52
src/js/promise.js

@@ -3,12 +3,12 @@ const $ = require("jquery");
 var Promise = require('./rePromise');
 //重写assign方法
 if (typeof Object.assign != 'function') {
-  Object.assign = function(target) {
+  Object.assign = function (target) {
     'use strict';
     if (target == null) {
       throw new TypeError('Cannot convert undefined or null to object');
     }
- 
+
     target = Object(target);
     for (var index = 1; index < arguments.length; index++) {
       var source = arguments[index];
@@ -23,15 +23,26 @@ if (typeof Object.assign != 'function') {
     return target;
   };
 }
+
+window.console = window.console || (function () {
+  var c = {}; c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
+    = c.clear = c.exception = c.trace = c.assert = function () { };
+  return c;
+})();
+
 const config = {
-  pushInner:'/api/data/push/push',
-  calculate:'/api/data/calc/calculate',
+  pushInner: '/api/data/push/push',
+  calculate: '/api/data/calc/calculate',
   disclaimer: '/api/data/disclaimerInformation/getDisclaimerInformations',
   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'
+  getMr: '/api/data/mr/getMr',
+  getVersion: '/api/data/versionInfo/getVersionInfoAlls',
+  getStaticKnowledge: '/api/data/search/getStaticKnowledge',
+  getStaticScale: '/api/data/search/getScale',
 }
 const imageUrlPrefix = 'http://192.168.2.122:82';
 // const getUrlArgObject = function(parm) {  
@@ -40,42 +51,35 @@ const imageUrlPrefix = 'http://192.168.2.122:82';
 //   return args[parm];//返回对象  
 // } 
 
-
 const getUrlArgObject = function getQueryString(name) {
   var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
   var reg_rewrite = new RegExp("(^|/)" + name + "/([^/]*)(/|$)", "i");
   var r = window.location.search.substr(1).match(reg);
   var q = window.location.pathname.substr(1).match(reg_rewrite);
-  if(r != null){
-  return decodeURIComponent(r[2]);
-  }else if(q != null){
-  return decodeURIComponent(q[2]);
-  }else{
-  return null;
-  }
-
-
-
-
-  
-
+  if (r != null) {
+    return decodeURIComponent(r[2]);
+  } else if (q != null) {
+    return decodeURIComponent(q[2]);
+  } else {
+    return null;
   }
+}
 
-const post = function(url,data){
-  return new Promise((resolve,reject)=>{
+const post = function (url, data) {
+  return new Promise((resolve, reject) => {
     $.ajax({
-      method:'post',
-      url:url,
-      data:JSON.stringify(data),
-      contentType:"application/json; charset=UTF-8",
-      beforeSend :function(xmlHttp){
-        xmlHttp.setRequestHeader("If-Modified-Since","0");
-        xmlHttp.setRequestHeader("Cache-Control","no-cache");
+      method: 'post',
+      url: url,
+      data: JSON.stringify(data),
+      contentType: "application/json; charset=UTF-8",
+      beforeSend: function (xmlHttp) {
+        xmlHttp.setRequestHeader("If-Modified-Since", "0");
+        xmlHttp.setRequestHeader("Cache-Control", "no-cache");
       },
-      success:function(res){
-        resolve({data:res});
+      success: function (res) {
+        resolve({ data: res });
       },
-      error:function(error){
+      error: function (error) {
         reject(error);
       },
     });
@@ -90,45 +94,45 @@ const newinConf = {
 }
 
 const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
-const openNewWin = function(url) {
+const openNewWin = function (url) {
   window.open(url, newinConf.openMode, newWindowLocation)
 }
 
 //判断浏览器是否为Ie8
-const isIe8 = function(){
+const isIe8 = function () {
   var DEFAULT_VERSION = 8.0;
   var ua = navigator.userAgent.toLowerCase();
-  var isIE = ua.indexOf("msie")>-1;
+  var isIE = ua.indexOf("msie") > -1;
   var safariVersion;
-  if(isIE){
-  safariVersion =  ua.match(/msie ([\d.]+)/)[1];
-  } 
-  if(safariVersion <= DEFAULT_VERSION ) {
+  if (isIE) {
+    safariVersion = ua.match(/msie ([\d.]+)/)[1];
+  }
+  if (safariVersion <= DEFAULT_VERSION) {
     return true
-  } 
+  }
 }
 
-const throttle =  function(fn, threshhold) {
+const throttle = function (fn, threshhold) {
   var timeout
   var start = new Date;
   var threshhold = threshhold || 160
   return function () {
- 
-  var context = this, args = arguments, curr = new Date() - 0
-  
-  clearTimeout(timeout)//总是干掉事件回调
-  if(curr - start >= threshhold){ 
+
+    var context = this, args = arguments, curr = new Date() - 0
+
+    clearTimeout(timeout)//总是干掉事件回调
+    if (curr - start >= threshhold) {
       // console.log("now", curr, curr - start)//注意这里相减的结果,都差不多是160左右
       fn.apply(context, args) //只执行一部分方法,这些方法是在某个时间段内执行一次
       start = curr
-  }else{
-  //让方法在脱离事件后也能执行一次
-      timeout = setTimeout(function(){
-         fn.apply(context, args) 
+    } else {
+      //让方法在脱离事件后也能执行一次
+      timeout = setTimeout(function () {
+        fn.apply(context, args)
       }, threshhold);
-     }
-   }
- }
+    }
+  }
+}
 
 module.exports = {
   config,

+ 158 - 55
src/js/scale.js

@@ -4,7 +4,7 @@ const {
   getUrlArgObject
 } = require('./promise.js');
 const $ = require("jquery");
-
+let hasCalc = false;
 $(function () {
   var scaleInfo;
   // 用GetQueryString方法从地址栏获取参数,暂时写死
@@ -35,80 +35,58 @@ $(function () {
           }
         }
 
-        $('input').on('change', function (e) {
-          var indexList = $(this).attr('data-index').split(',')
-          for (var i = 0; i < scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details.length; i++) {
-            scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details[i].select = 0
-          }
-          scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details[indexList[3]].select = 1
-          const className = $(this).parent().parent().parent().attr('data-group')
-          for (let i = 0; i < $('.' + className).length; i++) {
-            $('.' + className).eq(i).removeClass('noSelect')
-          }
-        })
-
-        $('.calcuBtn').on('click', function () {
-          let allSelect = true
-          for (let i = 0; i < scaleList.group.length; i++) {
-            for (let j = 0; j < scaleList.group[i].rows.length; j++) {
-              if (scaleList.group[i].rows[j].required == 1) {
-                let itemSelect = false
-                for (let x = 0; x < scaleList.group[i].rows[j].row.length; x++) {
-                  for (let y = 0; y < scaleList.group[i].rows[j].row[x].details.length; y++) {
-                    if (scaleList.group[i].rows[j].row[x].details[y].select == 1) {
-                      itemSelect = true
-                    }
-                  }
-                }
-                if (!itemSelect) {
-                  allSelect = false
-                  $('.' + i + j).addClass('noSelect')
-                }
-              }
+        
 
-            }
-          }
-          if (!allSelect) {
-            $('.modal').css('display', 'block');
-            let timer = setTimeout(() => {
-              $('.modal').css('display', 'none');
-            }, 2000);
-            $('.closeModal').click(function () {
-              $('.modal').css('display', 'none');
-              if (timer) {
-                clearTimeout(timer)
-              }
-            })
-          }
-          if (allSelect) {
-            getCalcuResult(scaleList)
-          }
-        })
+        
       }
     })
   }
 })
 
 function renderCalcu(scaleList) {
+  
   $("h1").html(scaleList.scaleName);
+  if(+scaleList.scaleType === 1 && +scaleList.Calc === 1) {
+    renderScaleType1(scaleList)
+    bindScaleType1(scaleList)
+  } else if(+scaleList.scaleType === 2 && +scaleList.Calc === 0) {
+    renderScaleType2(scaleList)
+    bindScaleType2(scaleList)
+  }
+  
+}
+
+function renderScaleType1(scaleList) {
   var str = ''
   for (var j = 0; j < scaleList.group.length; j++) {
     str += '<div class="groupBox"> <div class="groupName">' + scaleList.group[j].groupName + '</div>';
     for (var x = 0; x < scaleList.group[j].rows.length; x++) {
       for (var y = 0; y < scaleList.group[j].rows[x].row.length; y++) {
         var str2 = ''
+        var hasSelect = false
         for (var z = 0; z < scaleList.group[j].rows[x].row[y].details.length; z++) {
-          str2 += '<span class="groupRowRadio"><input  type="radio" data-index="' + j + ',' + x + ',' + y + ',' + z + '"  name="' + j + x + y + '" id="' + j + x + y + z
+          str2 += '<span class="groupRowRadio"><input  type="radio" data-index="' + j + '_' + x + '_' + y + '_' + z + '"  name="' + j +'_'+ x  +'_'+ y + '" id="' + j +'_' + x +'_' + y  +'_'+ z + '"'
           if (scaleList.group[j].rows[x].row[y].details[z].select == 1) {
+            hasSelect = true
             str2 += ' checked="checked"'
           }
-          str2 += '" />' + '<label for="' + j + x + y + z + '">' + scaleList.group[j].rows[x].row[y].details[z].detailName + '(' + scaleList.group[j].rows[x].row[y].details[z].score + ')' + '</label>'
+          str2 += ' />' + '<label for="' + j  +'_'+ x +'_' + y +'_' + z + '">' + scaleList.group[j].rows[x].row[y].details[z].detailName + '(' + scaleList.group[j].rows[x].row[y].details[z].score + ')' + '</label>'
           if (scaleList.group[j].rows[x].row[y].details[z].state == 1) {
             str2 += '<span class="groupRowRecommend">智能推荐</span>'
           }
           str2 += '</span>'
         }
-        str += '<div class="groupRowWrapper ' + j + x + '" data-group="' + j + x + '" id="' + j + x + y + '"><div class="groupRowName"> <span class="groupRowIndex">'
+        str += '<div class="groupRowWrapper '
+        if(+scaleList.group[j].rows[x].required === 1&&hasCalc&&!hasSelect) {
+          str += 'noSelect '
+        }
+        str +='' + j  +'_'+ x + '" data-group="' + j +'_' + x + '" id="' + j  +'_'+ x  +'_'+ y + '">'
+        
+        if(scaleList.group[j].rows[x].row.length > 1 && y=== 0) {
+          str += '<div class="tips">本组选项可多选或根据需要选择某一条选项</div>'
+        }
+        
+        str +='<div class="groupRowName"> <span class="groupRowIndex">'
         if (y == 0) {
           str += (x + 1) + '.'
         }
@@ -127,11 +105,135 @@ function renderCalcu(scaleList) {
     calcuStr += scaleList.calculate.result.value + ' ' + scaleList.calculate.result.text
   }
   calcuStr += '</span><span class="calcuBtn">得分</span></div>'
+  if($(".calcuWrapper")[0]) {
+    $(".calcuWrapper").html(str + calcuStr)
+  } else {
+    var allStr = '<div class="calcuWrapper">' + str + calcuStr + '</div>'
+    $('.content').append(allStr)
+  }
+  
+}
+
+function bindScaleType1(scaleList) {
+  $('input').on('change', function (e) {
+    var indexList = $(this).attr('data-index').split('_')
+    for (let i = 0; i < scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details.length; i++) {
+      scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details[i].select = 0
+    }
+    if(+scaleList.group[indexList[0]].rows[indexList[1]].metux === 1) {
+      for(let i = 0; i < scaleList.group[indexList[0]].rows[indexList[1]].row.length; i++) {
+        for(let j = 0; j < scaleList.group[indexList[0]].rows[indexList[1]].row[i].details.length; j++) {
+          scaleList.group[indexList[0]].rows[indexList[1]].row[i].details[j].select = 0
+        }
+      }
+    }
+
+    scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details[indexList[3]].select = 1
+    const className = $(this).parent().parent().parent().attr('data-group')
+    for (let i = 0; i < $('.' + className).length; i++) {
+      $('.' + className).eq(i).removeClass('noSelect')
+    }
+    renderScaleType1(scaleList)
+    bindScaleType1(scaleList)
+  })
+
+  $('.calcuBtn').on('click', function () {
+    hasCalc = true
+    let allSelect = true
+    for (let i = 0; i < scaleList.group.length; i++) {
+      for (let j = 0; j < scaleList.group[i].rows.length; j++) {
+        if (scaleList.group[i].rows[j].required == 1) {
+          let itemSelect = false
+          for (let x = 0; x < scaleList.group[i].rows[j].row.length; x++) {
+            for (let y = 0; y < scaleList.group[i].rows[j].row[x].details.length; y++) {
+              if (scaleList.group[i].rows[j].row[x].details[y].select == 1) {
+                itemSelect = true
+              }
+            }
+          }
+          if (!itemSelect) {
+            allSelect = false
+            $('.' + i+'_' + j).addClass('noSelect')
+          }
+        }
+
+      }
+    }
+    if (!allSelect) {
+      $('.modal').css('display', 'block');
+      let timer = setTimeout(() => {
+        $('.modal').css('display', 'none');
+      }, 2000);
+      $('.closeModal').click(function () {
+        $('.modal').css('display', 'none');
+        if (timer) {
+          clearTimeout(timer)
+        }
+      })
+    }
+    if (allSelect) {
+      getCalcuResult(scaleList)
+    }
+  })
+}
+
+function renderScaleType2(scaleList) {
+  let str = ''
+  for( let i = 0; i < scaleList.rows.length; i++){
+    let str2 = ''
+    for(let j = 0; j < scaleList.rows[i].details.length; j++) {
+      str2 += '<div class="groupRowRadio groupRowRadioType2"><input  type="radio" data-index="' + i + '_' + j +'"  name="' + i + '_' + '" id="' + i+'_' + j
+          if (scaleList.rows[i].details[j].select == 1) {
+            str2 += ' checked="checked"'
+          }
+          str2 += '" />' + '<label for="' + i +'_'+ j  + '">' + scaleList.rows[i].details[j].detailName + '(' + scaleList.rows[i].details[j].result + ')' + '</label>'
+          if (scaleList.rows[i].details[j].state == 1) {
+            str2 += '<span class="groupRowRecommend">智能推荐</span>'
+          }
+          str2 += '</div>'
+    }
+    str += `
+      <div class="groupBox groupBoxType2">
+        <div class="groupName">
+          ${scaleList.rows[i].name}
+        </div>
+        ${str2}
+
+      </div>
+    `
+    
+  }
+  var calcuStr =`<div class="calcResult"></div>`
   var allStr = '<div class="calcuWrapper">' + str + calcuStr + '</div>'
   $('.content').append(allStr)
-  
 }
 
+function bindScaleType2(scaleList) {
+  $('input').on('change', function (e) {
+    var indexList = $(this).attr('data-index').split('_')
+    for (var i = 0; i < scaleList.rows[indexList[0]].details.length; i++) {
+      scaleList.rows[indexList[0]].details[i].select = 0
+    }
+    scaleList.rows[indexList[0]].details[indexList[1]].select = 1
+
+    let resultStr ="结果:"
+    let resultStrNum = 0
+    for(let i = 0; i < scaleList.rows.length; i++) {
+        for(let j = 0; j < scaleList.rows[i].details.length; j++) {
+          if(scaleList.rows[i].details[j].select === 1) {
+            resultStrNum++
+            resultStr += `${scaleList.rows[i].details[j].detailName}(${scaleList.rows[i].details[j].result}),`
+          }
+        }
+    }
+    if(resultStrNum > 0) {
+      resultStr = resultStr.slice(0,-1)
+    }
+    $('.calcResult').html(resultStr)
+  })
+}
+
+
 function getCalcuResult(data) {
   const param = {
     type: 1,
@@ -148,9 +250,10 @@ function getCalcuResult(data) {
           }
         }
       }
-      if ($('.calcu')) {
+      if ($('.calcu').length) {
         for (let i = 0; i < $('.calcu').length; i++) {
-          let calcuItemName = $('.calcu').eq(i).prev().find('.groupName').html();
+         
+          let calcuItemName = $('.calcu').eq(i).parent().find('.groupName').html();
           let calcuItem = data.group.filter(function (item) {
             return item.groupName == calcuItemName
           })[0]

+ 143 - 0
src/js/staticSearch.js

@@ -0,0 +1,143 @@
+require('./../css/staticSearch.css');
+require('./../images/del_nor.png')
+var $ = require("jquery");
+var { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
+
+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(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)
+    })
+}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 getKnowledgeData(value) {
+    post(config.getStaticKnowledge,{
+        inputStr: 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.type==5 ||tmpPart.type==51)?tmpPart.uniqueName:tmpPart.name}' data-type='1' data-sign='${(tmpPart.type==5 ||tmpPart.type==51)?12:tmpPart.type}'>
+                        <p>${tmpPart.name}<i>${tmpPart.libTypeName?('( '+tmpPart.libTypeName+' )'):''}</i></p>
+                        ${tmpPart.retrievalName?('<span>• '+tmpPart.retrievalName+'</span>'):''}
+                    </li>`
+                    lisStr += tmpLi
+                }
+                $(".searchKnowledge .staticSearchB .empty").css({display:'none'})
+                $(".searchKnowledge .staticSearchB .tip").css({display:'block'})
+                $(".searchKnowledge .staticSearchB ul").html(lisStr)
+            }else{
+                $(".searchKnowledge .staticSearchB .empty").css({display:'block'})
+                $(".searchKnowledge .staticSearchB .tip").css({display:'none'})
+                $(".searchKnowledge .staticSearchB ul").html('')
+            }
+        }else{
+            console.log(res)
+        }
+    })
+}
+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");
+}
+$(window).on('resize', function(){
+    adjustHeight()
+})
+
+$(".staticSearchB ul").on("click","li",function(){
+    const infoMsgName = $(this).attr('data-name')
+    const type = $(this).attr('data-type')
+    const sign = $(this).attr('data-sign')
+    if(type == 1){
+        openNewWin(`information.html?type=${sign}&position=0&name=${infoMsgName}`)
+    }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}`)
+    }
+})
+
+  
+$(".staticSearchT").on('click','#clearKnowledge',function() {
+    $(".staticSearchT input").val("")
+    $(".searchKnowledge .staticSearchB ul").html('')
+    $(".searchKnowledge .staticSearchB .tip").css({display:'none'})
+    $(".searchKnowledge .staticSearchB .empty").css({display:'none'})
+    $(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"})
+})

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 4 - 3
src/js/treatplan.js


+ 7 - 3
src/js/util.js

@@ -5,7 +5,7 @@ const transConf = function(arr) {
     //     {hospitalCode: "A001", sysType: 16, name: "问诊症状", code: "inquiry_show", value: 1},
     //     {hospitalCode: "A001", sysType: 16, name: "体格检查", code: "health_show", value: 1},
     //     {hospitalCode: "A001", sysType: 16, name: "病情提示", code: "illness_show", value: 1},
-    //     {hospitalCode: "A001", sysType: 16, name: "治疗方案", code: "cure_show", value: 1},
+    //     {hospitalCode: "A001", sysType: 16, name: "治疗方案", code: "cure_show", value: 0},
     //     {hospitalCode: "A001", sysType: 16, name: "检验检查", code: "lispacs_show", value: 1},
     //     {hospitalCode: "A001", sysType: 16, name: "推荐诊断", code: "diagnose_no", value: 7},
     //     {hospitalCode: "A001", sysType: 16, name: "问诊症状", code: "inquiry_no", value: 1},
@@ -14,8 +14,12 @@ const transConf = function(arr) {
     //     {hospitalCode: "A001", sysType: 16, name: "治疗方案", code: "cure_no", value: 6},
     //     {hospitalCode: "A001", sysType: 16, name: "检验检查", code: "lispacs_no", value: 5},
     //     {hospitalCode: "A001", sysType: 16, name: "是否对接", code: "connect", value: 1},
-    //     {hospitalCode: null, sysType: 16, name: "警惕诊断", code: "vigilant_show", value: 1},
-    //     {hospitalCode: null, sysType: 16, name: "警惕诊断", code: "vigilant_no", value: 3}
+    //     {hospitalCode: "A001", sysType: 16, name: "医学知识", code: "knowledge_show", value: 0},
+    //     {hospitalCode: "A001", sysType: 16, name: "医学知识", code: "knowledge_no", value: 19},
+    //     {hospitalCode: "A001", sysType: 16, name: "全部量表", code: "scale_show", value: 0},
+    //     {hospitalCode: "A001", sysType: 16, name: "全部量表", code: "scale_no", value: 10},
+    //     {hospitalCode: "A001", sysType: 16, name: "警惕诊断", code: "vigilant_show", value: 1},
+    //     {hospitalCode: "A001", sysType: 16, name: "警惕诊断", code: "vigilant_no", value: 3}
     // ]
     const reg = /_show$/g;
     var newArr = arr.filter(item => item.code.match(reg) && item.value === 1 )

+ 20 - 0
src/js/version.js

@@ -0,0 +1,20 @@
+const {post, config} = require('./promise.js');
+const $ = require("jquery");
+
+$(function(){
+  function getVersion() {
+    post(config.getVersion, '').then((res) => {
+      const data = res.data.data;
+      const dtl = data.detail;
+      const time = data.refreshTime.substr(0,10);
+      let dom = '';
+      $("h1 span").html(data.name);
+      $("h1 i").html(time);
+      for(let i=0;i<dtl.length;i++){
+        dom += '<p>'+dtl[i].title+'</p><p>'+dtl[i].description+'</p>';
+      }
+      $(".content").html(dom);
+    })
+  }
+  getVersion();
+})

+ 5 - 1
src/page.js

@@ -20,5 +20,9 @@ var lis = [
   // {name:"血电解质3项",detailName:"钠(Na)",uniqueName:"血电解质3项--钠(Na)",source:"0",maxValue:145,minValue:"",time:"2019-08-30 15:31:49",units:"mmol/L",value:"120",otherValue:""},
   // {name:"尿常规11联",detailName:"尿蛋白(PRO-U)",uniqueName:"尿常规11联--尿蛋白(PRO)",source:"0",maxValue:1,minValue:"",time:"2019-08-30 15:31:49",units:"",value:"300",otherValue:""}
 ]
+var tipsInfo = [
+  {name:"血常规",type:12,position:"1"},
+  {name:"尿常规",type:12,position:"1"},
+  {name:"糖尿病",type:7,position:"1"}]
 
-$(".iframeContainer").attr("src",'indexHorizontal.html?age=22&lisJson='+JSON.stringify(lis)+'&diagJson=糖尿病&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常, 报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg')
+$(".iframeContainer").attr("src",'indexHorizontal.html?age=22&lisJson='+JSON.stringify(lis)+'&diagJson=糖尿病&tipsInfo='+JSON.stringify(tipsInfo)+'&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常, 报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg')

+ 30 - 1
webpack.config.js

@@ -11,10 +11,12 @@ module.exports = {
     page: path.resolve(__dirname, 'src', 'page.js'),
     information: path.resolve(__dirname, 'src/js', 'information.js'),
     disclaimer: path.resolve(__dirname, 'src/js', 'disclaimer.js'),
+    version: path.resolve(__dirname, 'src/js', 'version.js'),
     scale: path.resolve(__dirname, 'src/js', 'scale.js'),
     illness: path.resolve(__dirname, 'src/js', 'illness.js'),
     treatplan: path.resolve(__dirname, 'src/js', 'treatplan.js'),
     indexHorizontal: path.resolve(__dirname, 'src/js', 'indexHorizontal.js'),
+    staticSearch: path.resolve(__dirname, 'src/js', 'staticSearch.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -118,6 +120,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: '版本信息',
+      template: path.resolve(__dirname, 'src/html', 'version.html'),
+      filename: 'version.html',
+      chunks: ['vendor', 'common', 'version'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: 'scale',
       template: path.resolve(__dirname, 'src/html', 'scale.html'),
@@ -144,6 +159,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'staticSearch',
+      template: path.resolve(__dirname, 'src/html', 'staticSearch.html'),
+      filename: 'staticSearch.html',
+      chunks: ['staticSearch', 'vendor', 'common'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new MiniCssExtractPlugin({
       filename: 'css/[name].css',
       chunkFilename: '[id].css'
@@ -245,6 +273,7 @@ module.exports = {
       '/api': proxyHost
     },
     hot: true,
-    openPage:'index.html?age=28&plan=2&showTab=1&diseaseId=280&tipsName=血常规&tipsType=12&lisJson=&diagJson=急性胰腺炎&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常,%20报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg&hospitalCode=A001'
+    openPage:'index.html?age=28&tipsName=血常规&tipsType=12&diseaseId=280&lisJson=&diagJson=急性胰腺炎&diseaseName=糖尿病&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常,%20报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg&hospitalCode=A001'
+    
   }
 }