Bläddra i källkod

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

zhouna 5 år sedan
förälder
incheckning
719301e703

+ 190 - 0
src/css/information.less

@@ -0,0 +1,190 @@
+* {
+    margin: 0;
+    padding: 0;
+  }
+
+  ul,
+  li {
+    list-style: none;
+  }
+
+  table {
+    border-collapse: collapse;
+    border-spacing: 0;
+  }
+
+  body {
+    font-size: 14px;
+    overflow-y: scroll;
+    font-family: '微软雅黑', '宋体';
+    background: #dde2ea;
+    height: 100%;
+    color: #1E1E1E;
+    line-height: 21px;
+  }
+
+  h1 {
+    margin: 0 0px 30px 0px !important;
+    font-size: 28px !important;
+    line-height: 37px;
+    padding: 0 0 0 20px;
+  }
+
+  .titleH2 {
+    font-size: 22px;
+    position: relative;
+    background: #fff;
+    padding-right: 6px;
+    font-weight: bold;
+    line-height: 30px;
+  }
+
+  .content {
+    position: relative;
+    height: 550px;
+  }
+  .infoBox {
+    border-left: 1px solid #969C9F;
+    padding: 0 0 0 33px;
+    margin: 0 0 20px 0;
+  }
+  .infoWrapper {
+    padding: 0 0 0 20px;
+  }
+  .circleBox {
+    position: absolute;
+    z-index: 10;
+    background: #fff;
+    left: -40px;
+    height: 32px;
+    top: -1px;
+  }
+  .circle {
+    display: inline-block;
+    width: 12px;
+    height: 12px;
+    border-radius: 50%;
+    background: #3B9ED0;
+    position: relative;
+    top: 2px;
+  }
+  .infos {
+    height: 100%;
+    overflow-y: auto;
+    padding: 0 60px 0 0;
+  }
+
+  .infos>div {
+    margin-right: 160px;
+  }
+
+  .title {
+    position: relative;
+    line-height: 24px;
+    
+    margin: 0 0 13px;
+  }
+
+  .line {
+    border-bottom: 1px dashed #ccc;
+  }
+
+  .container {
+    width: 80%;
+    overflow: hidden;
+    background: #fff;
+    margin: 0 auto;
+    padding: 43px 0 30px 20px;
+ 
+  }
+  pre {
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    color: #1E1E1E;
+  }
+  .anchors {
+    width: 200px;
+    position: absolute;
+    right:15px;
+    top: 0;
+    margin-right: 14px;
+    overflow: auto;
+    height: 100%;
+  }
+
+  .anchors ul {
+    padding: 15px 0px 15px 20px;
+    border-radius: 4px;
+    border: 1px solid #F5F6F7;
+    background-color: #F5F6F7;
+    line-height: 19px;
+  }
+
+  .anchors li {
+    position: relative;
+    border-left: 2px solid #E0E2E3;
+  }
+
+  .anchors .anchor-line {
+    height: 20px;
+    width: 0;
+    border-left: 2px solid #E0E2E3;
+  }
+
+  .anchors .anchor-line:last-child {
+    display: none;
+  }
+
+  .anchors i {
+    position: absolute;
+    display: inline-block;
+    width: 8px;
+    height: 8px;
+    border-radius: 5px;
+    border: 1px solid #E0E2E3;
+    background-color: #E0E2E3;
+    left: -6px;
+    top: 5px;
+  }
+
+  .anchors a {
+    display: inline-block;
+    position: relative;
+    top: 0;
+    left: 0;
+    width: 132px;
+    padding: 0 0px 0 20px;
+    text-decoration: none;
+    font-size: 14px;
+    font-weight: 400;
+    color: #777;
+    word-wrap: break-word;
+  }
+
+  .anchors .active a {
+    color: #3B9ED0 !important;
+    font-weight: 700 !important;
+  }
+
+  .anchors .active i {
+    width: 16px;
+    height: 16px;
+    top: 1px;
+    left: -8px;
+    border-radius: 0;
+    border: none;
+    background-color: #F5F6F7;
+    background: url('../images/icon_current.png') center center no-repeat;
+  }
+
+  a:visited {
+    color: #777;
+  }
+  .disCopy {
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+  }

+ 8 - 0
src/css/treatPlan.less

@@ -103,6 +103,11 @@
     float: left;
     margin: 10px;
 }
+.slideImg {
+    width: 16px;
+    float: right;
+    margin: 10px;
+}
 .commonTreat {
     line-height: 36px;
 }
@@ -127,3 +132,6 @@
     filter:alpha(opacity=30);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
 }
+.treatPlanWrap {
+    margin: 0 0 10px 0;
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 7 - 158
src/html/information.html


BIN
src/images/icon_current.png


BIN
src/images/slide-down.png


BIN
src/images/slide-up.png


+ 1 - 1
src/js/illness.js

@@ -162,7 +162,7 @@ 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 msg1 = JSON.parse(JSON.stringify(msg))

+ 4 - 4
src/js/index.js

@@ -21,7 +21,7 @@ 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();
@@ -74,7 +74,7 @@ function getPushInfo() {
 }
 
 function getTreatment() {
-  return  post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
+  return  post(config.pushInner,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
 }
 
 function getTipsInfo() {
@@ -93,11 +93,11 @@ 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 treatInfo = res3&&res3.data &&res3.data || {}
     const tipsInfo = res4&&res4.data || {}
     const {confArr, showLabsNum, showPacsNum, labsAndPacMode} = transConf(configArr)
     const pushResult = pushInfo.data || {};
-    const treatResult = treatInfo.data || {}
+    const treatResult = treatInfo&&treatInfo.data&&treatInfo.data.treat || {}
     let tipsResult = []
     if(tipsInfo.data) {
       if(tipsMode == '2') {

+ 3 - 3
src/js/indexHorizontal.js

@@ -36,7 +36,7 @@ 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();
     }
@@ -69,7 +69,7 @@ function getPushInfo() {
 }
 
 function getTreatment() {
-  return post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
+  return post(config.pushInner,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
 }
 
 
@@ -91,7 +91,7 @@ function getPageInfo() {
     const {confArr, showLabsNum, showPacsNum, labsAndPacMode} = transConf(configArr)
     const tipsInfo = res4.data || {}
     const pushResult = pushInfo.data || {};
-    const treatResult = treatInfo.data || {}
+    const treatResult = treatInfo&&treatInfo.data&&treatInfo.data.treat || {}
     let tipsResult = []
     if(tipsInfo.data) {
       if(tipsMode == '2') {

+ 1 - 1
src/js/indexHorizontalDom.js

@@ -139,7 +139,7 @@ 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">
-                    <p class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</p>
+                    <p class="diagName boldFont">${msg.diseaseName.uniqueName?msg.diseaseName.uniqueName:''}</p>
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </div>`
     $('.infomationBox').append(str)

+ 2 - 2
src/js/indexVertDom.js

@@ -172,7 +172,7 @@ 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)
@@ -425,7 +425,7 @@ 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 msg1 = JSON.parse(JSON.stringify(msg))

+ 9 - 10
src/js/information.js

@@ -1,3 +1,4 @@
+require('../css/information.less')
 const {
   post,
   throttle,
@@ -33,17 +34,17 @@ function getInfomation() {
     }
     var list = data.details;
     $("h1").html(showName);
-    $("h1").css({
-      "color": "#267FD7",
-      "borderBottom": "4px solid  #E9E9E9",
-      "padding": "0px 60px 50px 0px"
-    });
+    // $("h1").css({
+    //   "color": "#267FD7",
+    //   "borderBottom": "4px solid  #E9E9E9",
+    //   "padding": "0px 60px 50px 0px"
+    // });
     for (var i = 0; i < list.length; i++) {
       item = list[i];
       item.content = item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
       anchors = '<li><i></i><a href="#' + item.title +
         '">' + item.title + '</a></li><li class="anchor-line"></li>';
-      str = '<div class="title"><h2 id="' + item.title +
+      str = '<div class="infoBox"><div class="title"> <div class= "circleBox"><span class="circle"> <span></div> <h2 class="titleH2" id="' + item.title +
         '">'
       if (getUrlArgObject('type') == 8) {
         str += '【' + item.title + '】'
@@ -51,10 +52,8 @@ function getInfomation() {
         str += item.title
       }
       str += '</h2></div>' +
-        '<div><pre>' + item.content + '</pre><div>';
-      if (i != list.length - 1 && getUrlArgObject('type') != 8) {
-        str += '<div class="line"></div>'
-      }
+        '<div><pre>' + item.content + '</pre><div></div>';
+        str = `<div class="infoWrapper">${str}</div>`
       $(".infos").append(str);
       $(".anchors ul").append(anchors);
     }

+ 0 - 1
src/js/promise.js

@@ -37,7 +37,6 @@ 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',

+ 19 - 8
src/js/treatplan.js

@@ -3,11 +3,13 @@ require('../css/reset.css');
 require('../css/common.less');
 // require('../css/popup.css');
 // require('../js/popup');
-require('../css/treatPlan.less')
+require('../css/treatPlan.less');
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin, isIe8 } = require('../js/promise.js');
-let generalImg = require('./../images/general.png')
-let drugImg = require('./../images/drug.png')
+let generalImg = require('./../images/general.png');
+let drugImg = require('./../images/drug.png');
+let slideUpImg = require('./../images/slide-up.png');
+let slideDownImg = require('./../images/slide-down.png');
 
 
 const is8Ie = isIe8() //判断是否为IE8
@@ -15,6 +17,8 @@ if(is8Ie) {
   let reg = /undefined/g
   generalImg = generalImg.replace(reg, '')
   drugImg = drugImg.replace(reg, '')
+  slideUpImg = slideUpImg.replace(reg, '')
+  slideDownImg = slideDownImg.replace(reg, '')
 }
 
 // var msg = {
@@ -32,10 +36,10 @@ if(is8Ie) {
 var msg = JSON.parse(getUrlArgObject('msg'))
 window.msg = msg
 window.pushMessage = {}
-post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg)).then((res)=>{
+post(config.pushInner,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg)).then((res)=>{
   var data = res.data
   if(data.code == 0){
-    var result = data.data;
+    var result = data.data.treat;
     var num = 0;
     if(result.commonTreatment && result.commonTreatment.content){
       $(".treatPlanNullWrap").css("display","none")
@@ -55,8 +59,16 @@ post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTy
 })
 
 function ybzlFun(data){//一般治疗
-  $(".conditionHintZhiliaoAp").prepend(`<div class="treatPlanWrap clearfix"><div class="treatPlan"><p class="treatPlanBg"></p><p class="treatPlanTitle"><img src=${generalImg} title="一般治疗" class="icon">一般治疗</p></div><div class="commonTreat clearfix">${data}</div></div>`)
-  $(".diseaseName").html(' ( '+msg.diseaseName+' )')
+  $(".conditionHintZhiliaoAp").prepend(`<div class="treatPlanWrap clearfix"><div class="treatPlan"><p class="treatPlanBg"></p><p class="treatPlanTitle clearfix"><img src=${generalImg} title="一般治疗" class="icon"/><img src=${slideUpImg} title="收起" class="slideImg"/>一般治疗</p></div><div class="commonTreat clearfix">${data}</div></div>`)
+  $(".diseaseName").html(' ( '+msg.diseaseName.uniqueName+' )')
+  $(document).on('click','.treatPlanTitle', function(){
+    if($('.slideImg').attr('src') === slideDownImg) {
+      $('.slideImg').attr('src', slideUpImg)
+    } else {
+      $('.slideImg').attr('src', slideDownImg)
+    }
+    $(".commonTreat").slideToggle(500);
+  })
 }
 function cyywFun(data){//常用药物
   for(let i = 0; i < data.length; i++) {
@@ -94,7 +106,6 @@ function cyywFun(data){//常用药物
  
   $(".infoMsg").on("click",function(){
     const infoMsgName = $(this).parent().attr('data-name')
-    console.log('infoMsgName',  $(this).parent())
     openNewWin(`information.html?type=8&position=5&name=${encodeURIComponent(infoMsgName)}`)
   })
   // for(var i = 0;i < data.length;i++){