Просмотр исходного кода

数据服务模式医嘱页面

zhangxc 6 лет назад
Родитель
Сommit
78dc3dc05e

+ 2 - 2
src/css/landscape.css

@@ -295,11 +295,11 @@
   }
   .conditionHintAssistLis,
   .conditionHintInspectLis {
-    padding: 5px 0;
+    /* padding: 5px 0; */
   }
   .conditionHintAssistLis .slideDown,
   .conditionHintInspectLis .slideDown {
-    padding: 5px 0 5px 0px;
+    /* padding: 5px 0 5px 0px; */
   }
   .conditionHintAssistLis li:first-child,
   .conditionHintInspectLis li:first-child {

+ 486 - 0
src/css/landscapeMedical.css

@@ -0,0 +1,486 @@
+.bodyWrap {
+    /* width: 1000px; */
+    height: 116px;
+    overflow: hidden;
+    font-size: 13px;
+    /* padding: 13px 0 */
+  }
+  .iframeWrap {
+      /* margin: 10px auto 50px;
+      padding: 20px; */
+      min-width: 340px;
+      height: 100%;
+    }
+    .push {
+      width: 55%;
+      float: left;
+      padding: 18px 5px 8px 20px;
+      border-right: 1px solid  #EFEEEE;
+    }
+    .treat {
+      width: 35%;
+      float: left;
+      padding: 18px 0
+    }
+    .iframeWrap .conditionHintPub {
+      /* border: 1px solid #F2F2F2; */
+      margin-bottom: 8px;
+      height: 20px;
+      line-height: 20px;
+      position: relative;
+      background: #fff;
+   
+    }
+    .iframeWrap .conditionHintPub li {
+      padding-right: 22px;
+      float: left;
+      line-height: 20px;
+      position: relative;
+      margin-bottom: 8px;
+    }
+    .iframeWrap .conditionHintPub .conditionMain {
+      margin: 0 0px 0 62px;
+      height: 20px;
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+    }
+    .iframeWrap .conditionHintPub .alertModal {
+      position: relative;
+      float: left;
+    }
+    .iframeWrap .conditionHintPub .alertModal .mayResult {
+      color: #838383;
+      position: relative;
+    }
+    .iframeWrap .conditionHintPub .alertModal .mayResultSelect {
+      line-height: 20px;
+    }
+    .iframeWrap .conditionHintPub .alertModal .mayResultSelect .makesureResult {
+      cursor: pointer;
+      color: #267FD7;
+    }
+    .iframeWrap .conditionHintPub .alertModal .mayResultSelect .sanjiao {
+      width: 18px;
+      height: 18px;
+      display: inline-block;
+      position: relative;
+      top: 3px;
+      background: url('../images/select.png') center center no-repeat;
+    }
+    .iframeWrap .conditionHintPub .treatPlan {
+      font-weight: bold;
+      font-size: 13px;
+      color: #000000;
+      float: left;
+      width: 85px;
+      text-align: right;
+      margin-right: 10px;
+    }
+    .iframeWrap .conditionHintPub .treatPlanWrap {
+      height: 20px;
+      overflow: hidden;
+      position: relative;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine {
+      margin-top: 10px;
+      height: 28px;
+      overflow: hidden;
+      position: relative;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicinePart {
+      /* margin: 8px 0; */
+      position: relative;
+      height: 20px;
+      overflow: hidden;
+      line-height: 20px;
+      margin: 0 0 8px 95px;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+  
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicine {
+      border-bottom: 1px solid #D1D1D1;
+      position: relative;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicine:hover {
+      color: #267FD7;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicine span {
+      display: none;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicine:hover span {
+      display: inline-block;
+      right: -20px;
+      background-color: #fff;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicineDis {
+      color: #D1D1D1;
+      border-bottom: 1px solid #D1D1D1;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicineWaring {
+      background-color: #f4c051;
+      color: #000;
+      font-size: 12px;
+      border-radius: 4px;
+      border: 1px solid #fff;
+      line-height: 18px;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicineWaringDis {
+      background-color: #fff;
+      color: #D1D1D1;
+      font-size: 12px;
+      border-radius: 4px;
+      line-height: 18px;
+      border: 1px solid #D1D1D1;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .medicineWaringDisMsg {
+      color: #D1D1D1;
+    }
+    .iframeWrap .conditionHintPub p {
+      line-height: 20px;
+    }
+    .iframeWrap .conditionHintPub p span {
+      display: inline-block;
+    }
+    .iframeWrap .conditionHintRecomDiag h4 {
+      color: #FF545B;
+    }
+    .iframeWrap .conditionHintRecomDiag h4 i {
+      background: url("../images/yszd.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintWz h4 {
+      color: #157FD5;
+    }
+    .iframeWrap .conditionHintWz h4 i {
+      background: url("../images/inquire.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintTg h4 {
+        color: #157FD5;
+    }
+    .iframeWrap .conditionHintTg h4 i {
+      background: url("../images/tgjc.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintInspect h4 {
+        color: #157FD5;
+    }
+    .iframeWrap .conditionHintInspect h4 i {
+      background: url("../images/inspect.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintMay h4 {
+      background-color: #FAEBEC;
+    }
+    .iframeWrap .conditionHintMay h4 i {
+      background: url("../images/yszd.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintWarings {
+      display: none;
+    }
+    .iframeWrap .conditionHintWarings h4 {
+      color: #FF545B;
+    }
+    .iframeWrap .conditionHintWarings h4 i {
+      background: url("../images/warings.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintWarings li {
+      float: left;
+      line-height: 20px;
+    }
+    .iframeWrap .conditionHintWarings li:hover {
+      color: #267FD7;
+    }
+    .iframeWrap .conditionHintKnzd {
+      display: none;
+    }
+    .iframeWrap .conditionHintKnzd h4 i {
+      background: url("../images/knzd.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintKnzd ul li {
+      float: left;
+      line-height: 20px;
+    }
+    .iframeWrap .conditionHintKnzd ul li:hover {
+      color: #267FD7;
+    }
+    .iframeWrap .conditionHintZhiliao h4 {
+      position: relative;
+      color: #1AB3A9;
+      margin-bottom: 8px;
+    }
+    .iframeWrap .conditionHintZhiliao h4 .treatPlan {
+      color: #1AB3A9;
+    }
+    .treatPlanBg {
+        position: absolute;
+        width: 95%;
+        height: 100%;
+        left: 18px;
+        top: 0;
+        background: #1AB3A9;
+        border-radius: 13px;
+        opacity: 0.1;
+        filter:alpha(opacity=10);
+        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=10);";
+    }
+    .iframeWrap .conditionHintZhiliao h4 i {
+      background: url("../images/zhiliao.png") center center no-repeat;
+    }
+    .iframeWrap .conditionHintTips .mayIllness {
+      padding-bottom: 5px;
+      float: left;
+    }
+    .iframeWrap .conditionHintTips .mayIllness:hover  span{
+      color: #267FD7;
+    } 
+    .iframeWrap .conditionHintTips .mayIllness span {
+      position: relative;
+      border-bottom: 1px solid #D1D1D1;
+    }
+    .iframeWrap .conditionHintTips .mayIllness span .infoMsg {
+      position: relative;
+      border-bottom: 0;
+      float: right;
+      cursor: pointer;
+      display: none;
+    }
+    .iframeWrap .conditionHintTips .mayIllness span:hover .infoMsg {
+      display: inline-block;
+    }
+    .iframeWrap .conditionHintTips .mayIllness a {
+      border-bottom: 1px solid #D1D1D1;
+    }
+    .iframeWrap .conditionHintTips h4 {
+      color: #E66225;
+    }
+    .iframeWrap .conditionHintTips h4 i {
+      background: url("../images/tips.png") center center no-repeat;
+    }
+    .iframeWrap .illnessTable {
+      color: #040428;
+      line-height: 20px;
+      cursor: pointer;
+    }
+    .iframeWrap .illnessTable::before {
+      color: #040428;
+      content: "【"
+    }
+    .iframeWrap .illnessTable::after {
+      color: #040428;
+      content: "】"
+    }
+    .iframeWrap h4 {
+      color: #000;
+      height: 20px;
+      line-height: 20px;
+      /* background-color: #FAEBEC; */
+      font-size: 13px;
+      font-weight: bold;
+      display: inline-block;
+      position: absolute;
+      left: 0;
+    }
+    .iframeWrap h4 i {
+      content: '';
+      width: 16px;
+      height: 16px;
+      float: left;
+      margin: 2px 8px 0 0;
+    }
+    .commonTreat,
+    .conditionHintKnzdLis,
+    .conditionHintWaringsLis,
+    .conditionHintWzLis,
+    .conditionHintTgLis,
+    .conditionHintInspectLis,
+    .conditionHintRecomDiagLis,
+    .conditionHintAssistLis {
+      /* position: relative; */
+      background: #fff;
+    }
+    .conditionHintInspectNull {
+      border-bottom: 1px solid #D1D1D1;
+      padding-bottom: 5px;
+      margin-bottom: 5px;
+    }
+    .conditionHintZhiliaoNull {
+      padding-left: 20px;
+      display: none;
+    }
+    .conditionHintAssistLis,
+    .conditionHintInspectLis {
+      /* padding: 5px 0; */
+    }
+    .conditionHintAssistLis .slideDown,
+    .conditionHintInspectLis .slideDown {
+      /* padding: 5px 0 5px 0px; */
+    }
+    .conditionHintAssistLis li:first-child,
+    .conditionHintInspectLis li:first-child {
+      padding-right: 5px;
+    }
+    .pushEmpty {
+      color: #ADADAD;
+    }
+    .medicinePartLimitHeight {
+      height:20px;
+      overflow: hidden;
+      position: relative;
+      margin-bottom: 8px;
+    }
+    .medicinePartLimitHeightSpec {
+      height: 75px;
+      overflow: hidden;
+      position: relative;
+    }
+    .slideDown {
+      background-color: #fff;
+      position: absolute;
+      top: 0px;
+      right: 12px;
+      color: #267FD7;
+      height: 20px;
+      line-height: 20px;
+      box-shadow: -2px 0px 15px 0px #fff;
+      cursor: pointer;
+    }
+    .slideDown i {
+      width: 16px;
+      height: 16px;
+      display: inline-block;
+      position: relative;
+      top: 2px;
+      background: url('../images/show.png') center center no-repeat;
+    }
+    .slideUp {
+      background-color: #fff;
+      position: absolute;
+      top: 0x;
+      right: 12px;
+      color: #267FD7;
+      height: 20px;
+      line-height: 20px;
+      box-shadow: -2px 0px 15px 0px #fff;
+      cursor: pointer;
+    }
+    .slideUp i {
+      width: 16px;
+      height: 16px;
+      display: inline-block;
+      position: relative;
+      top: 2px;
+      background: url('../images/collapse.png') center center no-repeat;
+    }
+    .disclaimer {
+      height: 100%;
+      width: 5%;
+      line-height: 20px;
+      text-align: center;
+      bottom: 0;
+      background-color: #efefef;
+      z-index: 98;
+      float: left;
+      cursor: pointer;
+    }
+    .disclaimer a {
+      display: block;
+    }
+    .infoMsg {
+      width: 20px;
+      height: 20px;
+      position: absolute;
+      top: 0;
+      right: 2px;
+      display: none;
+      background: url('../images/msg1.png') center center no-repeat;
+      cursor: pointer;
+    }
+    .infoMsg:hover {
+      background: url('../images/msg2.png') center center no-repeat;
+    }
+    .infoMsgParent {
+      position: relative;
+    }
+    .warning {
+      background: #FFEDEE;
+      color: #FF545B;
+      border-radius: 10px;
+      height: 20px;
+    }
+    .warningImg {
+      position: relative;
+      top: 2px;
+    }
+    .infoMsgParent:hover {
+      color: #267FD7;
+    }
+    .infoMsgParent:hover .infoMsg {
+      display: block;
+    }
+    .responsibility {
+      text-align: center;
+      font-size: 12px;
+      color: #979797;
+      padding-top: 15px;
+    }
+    .treat .conditionMain {
+      /* overflow: auto; */
+    }
+    .diseaseName {
+      color: #1AB3A9;;
+    }
+    .treat h4 {
+      display: block;
+      position: relative;
+    }
+    .treat .conditionHintPub .conditionMain {
+      margin: 0;
+      height: 80px;
+    }
+    .treat .slideDown {
+      right: 0;
+    }
+    .iframeWrap .conditionHintPub .treatMedicine .slideDown {
+      /* top: 28px; */
+    }
+    .disclaimerName {
+      float: left;
+      height: 72px;
+      position: relative;
+      top: 50%;
+      left: 50%;
+      margin: -36px 0 0 -14px;
+      line-height: 18px;
+      color: #9C9C9C;
+    }
+    .disclaimerTip {
+      margin-left: 0;
+      line-height: 14px;
+      height: 56px;
+      margin: -28px 0 0 0;
+    }
+    .titleIcon {
+      position: relative;
+      width: 18px;
+      top: 1px;
+      display: block;
+      float: left;
+      margin-right: 8px;
+    }
+    .treatPlan .titleIcon{
+      right: -11px;
+    }
+    .pushBox {
+      padding-right: 40px;
+      background: #fff
+    }
+    .pushBoxBorder {
+      border: 1px solid #3A73E1;
+      border-radius: 4px;
+    }
+    .warning i {
+      display: inline-block;
+      float: left;
+      width: 20px;
+      height: 20px;
+      background: url('../images/warning.png') center center no-repeat;
+    }

Разница между файлами не показана из-за своего большого размера
+ 74 - 0
src/html/landscapeMedical.html


+ 12 - 6
src/js/landscapeDom.js

@@ -1,6 +1,5 @@
 const $ = require("jquery")
 const { openNewWin } = require('./promise.js');
-let warningImg = require("\../images/warning.png") 
 
 function bqtsFun(data){//病情提示
   for(var k = 0;k < data.length;k++){
@@ -86,7 +85,6 @@ function tjzdFun(data, type) {
             </li>`
         }
     }
-    console.log('warningImg', warningImg)
     $(".conditionHintRecomDiagLis").append(tmpStr)
     
 }
@@ -106,12 +104,12 @@ function tjtgFun(data){
   $(".conditionHintTgLis").append(tmpStr)
   slideToggle($(".conditionHintTgLis"))  
 }
-function tjhyFun(data){
+function tjhyFun(data){ //化验
   var tmpStr = ''
   for(var i = 0;i < data.length;i++){
     tmpStr+='<li>'+data[i].name+'</li>'
   }
-  $(".conditionHintInspectLis").append('<li>化验 <i style="color:#ADADAD">|</i></li>'+tmpStr)
+  $(".conditionHintInspectLis").append(tmpStr)
   slideToggle($(".conditionHintInspectLis"))
 }
 function tjfjFun(data){
@@ -127,14 +125,22 @@ function slideToggle(domName){//展开收起
     domName.append('<span class="slideDown"><i></i></span>')
   }
   domName.on('click',".slideDown",function(){   //展开
+    const iframeWrapHeight = $('.iframeWrap').height()
+    const domNameTop = domName.offset().top
+    const BottomHeight = iframeWrapHeight - domNameTop
     $(".conditionHintPub").css({"zIndex": "1"});
     $(".push .conditionHintPub").find(".conditionMain").css({"height": "20px", "overflow": "hidden"});
     $('.pushBox').find('ul').css({"height": "20px", "overflow": "hidden"});
     $(".slideUp").removeClass("slideUp").addClass("slideDown")
     domName.append('<span class="slideUp"><i></i></span>')
-    domName.parent().parent().css({"height": "56px"});
     domName.parent().parent().parent().css({"zIndex": "2"});
-    $(this).parent().css({"height": "56px", "overflow": "auto"})
+    if(BottomHeight < 52) {
+      domName.parent().parent().css({"height": "30px"});
+      $(this).parent().css({"height": "30px", "overflow": "auto"})
+    } else {
+      domName.parent().parent().css({"height": "50px"});
+      $(this).parent().css({"height": "50px", "overflow": "auto"})
+    }
     $(".pushBoxBorder").removeClass("pushBoxBorder")
     $(this).parent().parent().parent().addClass("pushBoxBorder")
     $(this).remove()

+ 120 - 0
src/js/landscapeMedical.js

@@ -0,0 +1,120 @@
+require('./../css/landscapeMedical.css');
+require('./../css/reset.css');
+require('./../css/popup.css');
+require('./popup');
+const $ = require("jquery");
+const { post,config,getUrlArgObject, openNewWin } = require('./promise.js');
+
+const {bqtsFun,ybzlFun,cyywFun,tjwzFun,tjtgFun,tjhyFun,tjfjFun, tjzdFun, slideToggle} = require('./landscapeDom.js');
+//   symptom: "恶心呕吐腰痛", //胸痛,背痛,恶心,呕吐     //恶心呕吐腰痛   //牙周袋形成
+
+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') || ''
+}//推送相关信息
+
+window.msg = msg
+window.pushMessage = {}
+
+post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
+  var data = res.data
+  if(data.code == 0){
+    var result = data.data;
+    if(result.medicalIndications && result.medicalIndications.length>0){//病情提示
+      window.pushMessage = result.medicalIndications;//计算的需要的相关数据
+      bqtsFun(result.medicalIndications)
+    }
+    if(result.dis){
+      var proB = result.dis['可能诊断'] || []//可能
+      var proY = result.dis['确诊'] || []//确诊
+      var proWaring = result.dis['警惕'] || []
+      tjzdFun(proWaring, 'warning')
+      tjzdFun(proY)
+      tjzdFun(proB)
+      
+      slideToggle($(".conditionHintRecomDiagLis")) 
+      $(".infoMsgParent .infoMsg").on("click",function(){
+        const infoMsgName = $(this).parent().attr('data-name')
+        openNewWin(`information.html?type=7&position=2&name=${infoMsgName}`)
+      })
+      if(proY.length == 0 && proB.length == 0 && proWaring.length == 0){
+        $(".conditionHintRecomDiagLis").css("display","none")
+      }else{
+        $(".conditionHintRecomDiagLisNull").css("display","none")
+      }
+    }
+    if(result.symptom && result.symptom.length > 0){//推荐问诊症状
+      $(".conditionHintWzNull").css("display","none")
+      tjwzFun(result.symptom)
+    }
+    if(result.vital && result.vital.length > 0){//体格检查
+      $(".conditionHintTgNull").css("display","none")
+      tjtgFun(result.vital)
+    }
+    if(result.pacs.length > 0 && result.lab.length > 0){
+      $(".conditionHintAssistLis").css({
+        "border-top":"1px solid #D1D1D1"
+      })
+    }
+    if(result.lab && result.lab.length > 0){//化验
+      $(".conditionHintInspectNull").css("display","none")
+      $(".conditionHintAssistNull").css("display","none")
+      tjhyFun(result.lab)
+    }
+    if(result.pacs && result.pacs.length > 0){//辅检
+      $(".conditionHintInspectNull").css("display","none")
+      $(".conditionHintAssistNull").css("display","none")
+      tjfjFun(result.pacs)
+    }
+  }
+})
+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') || ''
+}//推送相关信息
+$(".disclaimer").on("click",function() {
+  openNewWin("disclaimer.html")
+})
+post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
+  var data = res.data
+  if(data.code == 0){
+    var result = data.data;
+    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)//常用药物
+    }
+    $(".conditionHintZhiliaoAp ").on('click',".slideDown",function(){
+      openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
+    })
+    if(num == 0){
+      $(".conditionHintZhiliaoNull").css("display","block")
+    }
+  }else{
+    $(".conditionHintZhiliaoNull").css("display","block")
+    $(".treatMedicine").css("display","none")
+  }
+})
+
+

+ 0 - 0
src/js/landscapeMedicalDom.js


+ 1 - 1
webpack.config.js

@@ -167,7 +167,7 @@ module.exports = {
       title: 'landscapeMedical',
       template: path.resolve(__dirname, 'src/html', 'landscapeMedical.html'),
       filename: 'landscapeMedical.html',
-      chunks: ['landscape', 'vendor', 'common'],
+      chunks: ['landscapeMedical', 'vendor', 'common'],
       inject: true,
       hash: true, //防止缓存
       minify: {