1178232204@qq.com 3 anni fa
parent
commit
606a83f372

File diff suppressed because it is too large
+ 499 - 378
src/css/cdss.less


+ 115 - 32
src/css/cdssHorizontal.less

@@ -7,7 +7,7 @@
 }
 .versionWrapper {
   position: absolute;
-  top:0;
+  top: 0;
   right: 0;
   width: 45px;
   height: 100px;
@@ -31,7 +31,7 @@
   cursor: pointer;
   margin: 29px 0 0 3px;
 }
-.versionNew{
+.versionNew {
   width: 24px;
   height: 12px;
   background: url("../images/new1.png");
@@ -76,10 +76,10 @@
 .tab {
   width: 60px;
   height: 20px;
-  font-size:12px;
+  font-size: 12px;
   cursor: pointer;
   text-align: center;
-  margin:4px 5px;
+  margin: 4px 5px;
 }
 .tabName {
   text-align: center;
@@ -87,10 +87,10 @@
 .activeTab {
   font-weight: 500;
   color: @bgcBlue;
-  background:@pushBgColor;
+  background: @pushBgColor;
   position: relative;
-  &:after{
-    content: '';
+  &:after {
+    content: "";
     width: 5px;
     height: 11px;
     background: url("../images/ar.png") no-repeat;
@@ -101,7 +101,7 @@
   }
 }
 .contentBox {
-  margin:0 46px 0 72px;
+  margin: 0 46px 0 72px;
 }
 .moduleWrapper {
   /*position: absolute;
@@ -133,7 +133,7 @@
 .leftBox,
 .rightBox {
   position: relative;
-  p{
+  p {
     font-size: 12px;
   }
 }
@@ -144,12 +144,13 @@
   padding: 0 0 0 110px;
   box-sizing: border-box;
   line-height: 21px;
-  span,div{
+  span,
+  div {
     font-size: 12px;
   }
-  &:hover {
-    background: #f6f6f6;
-  }
+  // &:hover {
+  //   background: #f6f6f6;
+  // }
 }
 .moduleItemTitBox {
   display: inline-block;
@@ -344,7 +345,7 @@
   color: #2fc6c7;
   border-bottom: 1px solid #e6e6e6;
   font-weight: 600;
-  span{
+  span {
     font-size: 12px;
   }
 }
@@ -518,7 +519,7 @@
       height: 12px;
       margin-bottom: -1px;
     }
-    span{
+    span {
       font-size: 12px;
     }
   }
@@ -732,35 +733,35 @@
   box-sizing: border-box;
   overflow: auto;
 }
-.empty-box{
+.empty-box {
   text-align: center;
   display: none;
   padding-top: 8px;
-  .emptyImg{
+  .emptyImg {
     width: 100px;
   }
-  .emptyTxt{
+  .emptyTxt {
     font-size: 12px;
   }
 }
-.loading{
-   position: fixed;
-   width: 100%;
-   left: 0;
-   top: 44px;
-   z-index: 100;
-   display: none;
- }
-.loadingMask{
+.loading {
+  position: fixed;
+  width: 100%;
+  left: 0;
+  top: 44px;
+  z-index: 100;
+  display: none;
+}
+.loadingMask {
   position: absolute;
   width: 100%;
   height: 100%;
   background-color: #fff;
   opacity: 0.5;
-  filter:alpha(opacity=50);
+  filter: alpha(opacity=50);
   -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50);";
 }
-.loadingImg{
+.loadingImg {
   width: 30px;
   position: absolute;
   left: 50%;
@@ -768,7 +769,7 @@
   margin: -15px 0 0 -15px;
 }
 
-.bodyWrapHorizontal ::-webkit-scrollbar{
+.bodyWrapHorizontal ::-webkit-scrollbar {
   /*滚动条整体样式*/
   width: 4px;
   /*高宽分别对应横竖滚动条的尺寸*/
@@ -776,10 +777,92 @@
   background: #fff;
   -webkit-box-shadow: inset 1px 0 1px rgba(0, 0, 0, 0.2);
 }
-.bodyWrapHorizontal ::-webkit-scrollbar-thumb{
+.bodyWrapHorizontal ::-webkit-scrollbar-thumb {
   /*滚动条里面小方块*/
   width: 4px;
   height: 4px;
   border-radius: 3px;
   background: #ccc;
-}
+}
+.maydiagnose,
+.hasdiagnose {
+  .moduleBox {
+    .pushItemName {
+      min-width: 55px;
+      max-width: 65px;
+      height: 22px;
+      font-size: 12px;
+      font-weight: 400;
+      color: #333333;
+      line-height: 22px;
+      cursor: pointer;
+      background: #ebebeb;
+      display: inline-block;
+      text-align: center;
+      padding: 0 2px;
+      border-radius: 2px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
+  .item {
+    display: none;
+    padding: 0 12px;
+    border: 1px dashed #cbcbcb;
+  }
+}
+.active {
+  .pushItemName {
+    background: #deeeff !important;
+    color: #4f9ff3 !important;
+  }
+}
+.centerBox {
+  border-top: 1px dashed #d9d9d9;
+  ul {
+    padding: 9px 0;
+    overflow: hidden;
+
+    li {
+      float: left;
+      padding: 4px 2px;
+      background: #ffffff;
+      border-radius: 4px;
+      border: 1px solid #1677ff;
+      font-size: 12px;
+      font-weight: 400;
+      color: #1677ff;
+      line-height: 12px;
+      margin-right: 8px;
+      cursor: pointer;
+    }
+  }
+}
+.actives {
+  background: #1677ff !important;
+  color: #ffffff !important;
+}
+.generalItem,
+.medicineItem,
+.operationItem,
+.nurseItem {
+  display: none;
+}
+.onshow {
+  display: block;
+}
+.centerBoxItem {
+  padding-bottom: 4px;
+  border-bottom: 1px solid #d9d9d9;
+}
+.hasdiagnose {
+  margin-top: 5px;
+}
+.toast {
+  position: absolute;
+  left: 60px;
+  top: 0;
+  height: 22px;
+  z-index: 55;
+}

BIN
src/images/icon-diag.png


BIN
src/images/icon-hasdiagnose.png


BIN
src/images/icon-up.png


BIN
src/images/more.png


BIN
src/images/toast-1.png


BIN
src/images/toast-2.png


BIN
src/images/toast-3.png


+ 617 - 27
src/js/cdss.js

@@ -25,6 +25,7 @@ require('./../images/t2.png').replace(/^undefined/g, '')
 require('./../images/t3.png').replace(/^undefined/g, '')
 require('./../images/go.png').replace(/^undefined/g, '')
 require('./../images/g1.png').replace(/^undefined/g, '')
+
 // require('./popupEdit.js');
 
 let infoImg = require('./../images/icon_info.png').replace(/^undefined/g, '')
@@ -34,8 +35,11 @@ let iconArrowDown = require('./../images/icon_arrow_down.png').replace(/^undefin
 let iconMark = require('./../images/icon_mark.png').replace(/^undefined/g, '')
 let warnImg = require('./../images/icon_warning.png').replace(/^undefined/g, '')
 let warnImgWhite = require('./../images/icon_waring_white.png').replace(/^undefined/g, '')
-
-
+let down = require('./../images/d1.png').replace(/^undefined/g, '')
+let more = require('./../images/more.png').replace(/^undefined/g, '')
+let up = require('./../images/icon-up.png').replace(/^undefined/g, '')
+let maydiagnoseList = [], hasdiagnoseList = [];
+let maydiagnoseType = false, hasdiagnoseType = false;
 const $ = require("jquery");
 const { post, config, getUrlArgObject, openNewWin, titleConfig } = require('./promise.js');
 const { renderFollowUp, followEmpty } = require('./followUp.js');
@@ -56,6 +60,7 @@ let moduleConfig = {
 let allInterface = 0;  //需要调用的推送接口的个数
 let hasCompleteTnterface = 0;     //已返回的推送接口的个数
 let moduleNum = 0
+let indexNow
 let mrId = getUrlArgObject('mrId')
 let isTcm = getUrlArgObject('isTcm')
 let pushMrId = getUrlArgObject('pushMrId')
@@ -120,9 +125,19 @@ function getPushInfo() {
   return post(config.pushInner, Object.assign({}, msg, {
     featureType: '1,4,5,6,7,8,9,10,12,13',
     hospitalId: hospitalIdUrl || msg.hospitalId,
-    ruleType: config.ruleTypeMap['22']
+    ruleType: config.ruleTypeMap['22'],
+  }))
+}
+function pushByDisease(name, i) {
+  return post(config.pushInner, Object.assign({}, msg, {
+    featureType: '1,4,5,6,7,8,9,10,12,13',
+    hospitalId: hospitalIdUrl || msg.hospitalId,
+    ruleType: config.ruleTypeMap['22'],
+    diseaseName: {
+      name: name,
+      uniqueName: name
+    }
   }))
-
 }
 function getPusgWarning() {
   const indPush = pushMrId ? config.indicationPushCache : config.indicationPush;
@@ -294,6 +309,8 @@ function renderPushData() {
     hasCompleteTnterface++
     if (res.data.code == "0") {
       const result = res.data.data
+      let diagList = result.clickPosDis || [] //可能诊断
+      let AffList = result.clickAffDis || [] //已诊断疾病
       let diagPush = result.dis || {}
       let lisPush = result.lis || []
       let scalePush = result.scale || []
@@ -315,7 +332,6 @@ function renderPushData() {
       let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
       let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
 
-
       renderLis(lisPush, lisNum)
       renderScale(scalePush, scaleNum)
       renderPacs(pacsPush, pacsNum)
@@ -326,6 +342,8 @@ function renderPushData() {
       renderOperationPush(operationsPush, operationsNum)
       rendergeneraTreatPush(generaTreatPush)
       renderNurse(nursePush, nurseNum)
+      renderDiagList(diagList)
+      renderAffListList(AffList)
       bindOpenInfo()
       moreInfo()
       bindSlide();
@@ -333,6 +351,87 @@ function renderPushData() {
     empty();  //判断是否显示空状态
   })
 }
+function renderpushByMayDisease(name, i) {
+  return pushByDisease(name, i).then(res => {
+    $(".loading").hide();
+    hasCompleteTnterface++
+    if (res.data.code == "0") {
+      const result = res.data.data
+      let symptomPush = result.symptom || []
+      let vitalPush = result.vital || []
+      let lisPush = result.lis || []
+      let pacsPush = result.pacs || []
+      let scalePush = result.scale || []
+      let disPush = result.dis['大数据推送诊断'] || []
+      let treatPush = result.treat || []
+      let medicinesPush = result.medicines || []
+      let operationsPush = result.operations || []
+      let nursePush = result.nurse || []
+      if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && treatPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0) {
+        $.toast('toast1', '', 3000,'.maydiagnose',i);
+      } else if(maydiagnoseType){
+        $.toast('toast2', '', 3000,'.maydiagnose',i);
+      }else{
+        renderMaySymptomPush(symptomPush)
+        renderMayVitalPush(vitalPush)
+        renderMayLisPush(lisPush)
+        renderMayPacsPush(pacsPush)
+        renderMayScalePush(scalePush)
+        renderMayDisPush(disPush)
+        renderMayPush(treatPush, medicinesPush, operationsPush, nursePush)
+        bindOpenInfo()
+        moreInfo()
+        bindSlide();
+      }
+      // renderMaySymptomPush(symptomPush)
+      // renderMayVitalPush(vitalPush)
+      // renderMayLisPush(lisPush)
+      // renderMayPacsPush(pacsPush)
+      // renderMayScalePush(scalePush)
+      // renderMayDisPush(disPush)
+      // renderMayPush(treatPush, medicinesPush, operationsPush, nursePush)
+      // bindOpenInfo()
+      // moreInfo()
+      // bindSlide();
+    }
+  })
+}
+function renderpushByHasDisease(name, i) {
+  return pushByDisease(name, i).then(res => {
+    $(".loading").hide();
+    hasCompleteTnterface++
+    if (res.data.code == "0") {
+      const result = res.data.data
+      let symptomPush = result.symptom || []
+      let vitalPush = result.vital || []
+      let lisPush = result.lis || []
+      let pacsPush = result.pacs || []
+      let scalePush = result.scale || []
+      let disPush = result.dis['鉴别诊断'] || {}
+      let treatPush = result.treat || {}
+      let medicinesPush = result.medicines || {}
+      let operationsPush = result.operations || {}
+      let nursePush = result.nurse || {}
+      if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && treatPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0) {
+        $.toast('toast1', '', 3000,'.hasdiagnose',i);
+      } else if(hasdiagnoseType){
+        $.toast('toast2', '', 3000,'.maydiagnose',i);
+      }else {
+        renderHasSymptomPush(symptomPush)
+        renderHasVitalPush(vitalPush)
+        renderHasLisPush(lisPush)
+        renderHasPacsPush(pacsPush)
+        renderHasScalePush(scalePush)
+        renderHasDisPush(disPush)
+        renderHasPush(treatPush, medicinesPush, operationsPush, nursePush)
+        bindOpenInfo()
+        moreInfo()
+        bindSlide();
+      }
+
+    }
+  })
+}
 function adjustHei() {
   const iframeHei = $(".bodyWrap").height()
   $(".contentWrapper").css("height", iframeHei - 20 - 30 - 60 + 3 + 19 + 'px')
@@ -460,19 +559,19 @@ function renderBillingPush(list, name, code) {
   $("." + code).append(boxStr)
   $('.moduleItem.' + code).addClass("tips").css("display", "block")
   //输血后血常规提醒,传参给his
-  $(".otherremind .billingPushItem:contains('输血完成后,请及时复查血常规')").css("cursor","pointer").click(()=>{
+  $(".otherremind .billingPushItem:contains('输血完成后,请及时复查血常规')").css("cursor", "pointer").click(() => {
     window.parent.postMessage({
-	  "mrn": msg.mrn, //病历号  getMr返回-技术服务返回
-	  "series": msg.series, //就诊次数
-	  "orders": [
-		{
-		  "type": 1,
-		  "orders": [
-			'输血(血小板)'
-		  ]
-		}
-	  ]
-	},'*')
+      "mrn": msg.mrn, //病历号  getMr返回-技术服务返回
+      "series": msg.series, //就诊次数
+      "orders": [
+        {
+          "type": 1,
+          "orders": [
+            '输血(血小板)'
+          ]
+        }
+      ]
+    }, '*')
   })
 }
 
@@ -535,6 +634,87 @@ function renderWarningDiag(list, name, number) {
   }
 }
 
+function renderDiagList(list, showNum) {
+  if (list.length > 0 && $(".moduleItem.maydiagnose").length > 0) {
+    moduleNum++
+    let str = `<div class="item">`
+    $('.moduleItem.maydiagnose').append(titleStr("maydiagnosePush"))
+    for (var i = 0; i < list.length; i++) {
+      const item = list[i];
+      str +=
+        `<div class='box ${i > 2 ? `box-1` : ''}' data-index="${i}">
+          <p class='box-p goDetail' data-name="${item.name}" data-index="${i}"><span class='box-title'>${item.name}</span><img class="box-img" src=${down}/></p>
+          <div class="moduleCenter"></div>
+        </div>`
+    }
+    str += `${list.length > 3 ? `<p class="toogle">加载更多<img src=${more}/></p>` : ''} </div>`
+
+    $('.moduleItem.maydiagnose').append(str)
+    $('.moduleItem.maydiagnose').css("display", "block")
+    $('.maydiagnose .goDetail').on("click", function (e) {
+      e.preventDefault()
+      const name = $(this).attr('data-name');
+      const i = $(this).attr('data-index');
+      indexNow = i
+      const showList = $(".box[data-index=" + i + "]").find(".moduleCenter").css("display")
+      if (showList == "none" || !showList) {
+        $(".loading").show();
+        $(".maydiagnose .box[data-index=" + i + "]").find(".moduleCenter").html('')
+        $(".maydiagnose .box").find(".moduleCenter").css("display", "none")
+        $(".maydiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "block")
+        renderpushByMayDisease(name, i)
+      } else {
+        $(".maydiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "none")
+      }
+    });
+  }
+}
+function renderAffListList(list, showNum) {
+  if (list.length > 0 && $(".moduleItem.hasdiagnose").length > 0) {
+    moduleNum++
+    let str = `<div class="item">`
+    $('.moduleItem.hasdiagnose').append(titleStr("hasdiagnosePush"))
+    for (var i = 0; i < list.length; i++) {
+      const item = list[i];
+      str +=
+        `<div class='box ${i > 2 ? `box-1` : ''}' data-index="${i}">
+          <p class='box-p goDetail' data-name="${item.name}" data-index="${i}"><span class='box-title'>${item.name}</span><img class="box-img" src=${down}/></p>
+          <div class="moduleCenter"></div>
+        </div>`
+    }
+    str += `${list.length > 3 ? `<p class="toogle">加载更多<img src=${more}/></p>` : ''} </div>`
+
+    $('.moduleItem.hasdiagnose').append(str)
+    $('.moduleItem.hasdiagnose').css("display", "block")
+    $('.hasdiagnose .goDetail').on("click", function (e) {
+      e.preventDefault()
+      const name = $(this).attr('data-name');
+      const i = $(this).attr('data-index');
+      indexNow = i
+      const showList = $(".box[data-index=" + i + "]").find(".moduleCenter").css("display")
+      if (showList == "none" || !showList) {
+        $(".loading").show();
+        $(".hasdiagnose .box[data-index=" + i + "]").find(".moduleCenter").html('')
+        $(".hasdiagnose .box").find(".moduleCenter").css("display", "none")
+        $(".hasdiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "block")
+        renderpushByHasDisease(name, i)
+      } else {
+        $(".hasdiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "none")
+      }
+    });
+
+  }
+}
+function renderSymptomPush(list, showNum) {
+  $(".moduleItem.symptom").append(titleStr('symptomPush'))
+  if (list.length > 0 && $(".moduleItem.symptom").length > 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, showNum)
+    $(".moduleItem.symptom").append(shortStr).append(longStr)
+    $(".moduleItem.symptom").css("display", "block")
+  }
+
+}
 function renderLis(list, showNum) {
   if (list.length > 0 && $(".moduleItem.lis").length > 0) {
     moduleNum++
@@ -583,17 +763,390 @@ function renderCheckup(list, showNum) {
     $('.moduleItem.vital').css("display", "block")
   }
 }
-function renderSymptomPush(list, showNum) {
-  $(".moduleItem.symptom").append(titleStr('symptomPush'))
+function renderMaySymptomPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maysymptom') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append(`<div class='maysymptom'></div>`)
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .maysymptom").append(shortStr).append(longStr)
+  }
 
-  if (list.length > 0 && $(".moduleItem.symptom").length > 0) {
+}
+function renderHasSymptomPush(list,) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hassymptom') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
     moduleNum++
-    let { shortStr, longStr } = renderItemWrapper(list, showNum)
-    $(".moduleItem.symptom").append(shortStr).append(longStr)
-    $(".moduleItem.symptom").css("display", "block")
+    let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append(`<div class='hassymptom'></div>`)
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .hassymptom").append(shortStr).append(longStr)
+  }
+
+}
+function renderMayVitalPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayvital') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '体征')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='mayvital'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .mayvital").append(shortStr).append(longStr)
+  }
+
+}
+function renderHasVitalPush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'mayvital') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '体征')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='hasvital'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .hasvital").append(shortStr).append(longStr)
+  }
+
+}
+function renderMayLisPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maylis') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='maylis'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .maylis").append(shortStr).append(longStr)
   }
 
 }
+function renderHasLisPush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'haslis') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='haslis'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .haslis").append(shortStr).append(longStr)
+  }
+
+}
+function renderMayPacsPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maypacs') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='maypacs'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .maypacs").append(shortStr).append(longStr)
+  }
+}
+function renderHasPacsPush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'haspacs') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='haspacs'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .haspacs").append(shortStr).append(longStr)
+  }
+}
+function renderMayScalePush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayevaluation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='mayevaluation'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .mayevaluation").append(shortStr).append(longStr)
+  }
+}
+function renderHasScalePush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasevaluation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='hasevaluation'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .hasevaluation").append(shortStr).append(longStr)
+  }
+}
+function renderMayDisPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayantidias') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    console.log(123);
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='mayantidias'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .mayantidias").append(shortStr).append(longStr)
+  }
+}
+function renderHasDisPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'hasantidias') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='hasantidias'></div>")
+    $(".box[data-index=" + indexNow + "]").find(".moduleCenter .hasantidias").append(shortStr).append(longStr)
+  }
+}
+function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush) {
+  $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='centerBox'></div>")
+  let str = `<ul>
+    ${treatPush.length > 0 ? `<li class="general">一般治疗</li>` : ''}
+    ${medicinesPush.length > 0 ? `<li class="medicine">推荐用药</li>` : ''}
+    ${operationsPush.length > 0 ? `<li class="operation">推荐手术/操作</li>` : ''}
+    ${nursePush.length > 0 ? `<li class="nurse">推荐护理</li>` : ''}
+  </ul>
+  <div class="centerBoxItem">
+    ${treatPush.length > 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
+    ${medicinesPush.length > 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
+    ${operationsPush.length > 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
+    ${nursePush.length > 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
+  </div>`
+  $(".maydiagnose  .box[data-index=" + indexNow + "]").find(".moduleCenter .centerBox").append(str)
+  renderMayTreatPush(treatPush)
+  renderMayMedicPush(medicinesPush)
+  renderMayOperationsPush(operationsPush)
+  renderMayNursePush(nursePush)
+  $('.maydiagnose .centerBox ul li').click(function () {
+    var i = $(this).index();
+    if ($(this).hasClass('active')) {
+      $(this).removeClass('active');
+      $(".maydiagnose .checkBox[data-index=" + i + "]").removeClass('onshow');
+    } else {
+      $(this).addClass('active').siblings().removeClass('active');
+      $(".maydiagnose .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
+    }
+  });
+}
+function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush) {
+  $(".hasdiagnose .box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='centerBox'></div>")
+  let str = `<ul>
+    ${treatPush.length > 0 ? `<li class="general">一般治疗</li>` : ''}
+    ${medicinesPush.length > 0 ? `<li class="medicine">推荐用药</li>` : ''}
+    ${operationsPush.length > 0 ? `<li class="operation">推荐手术/操作</li>` : ''}
+    ${nursePush.length > 0 ? `<li class="nurse">推荐护理</li>` : ''}
+  </ul>
+  <div class="centerBoxItem">
+    ${treatPush.length > 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
+    ${medicinesPush.length > 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
+    ${operationsPush.length > 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
+    ${nursePush.length > 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
+  </div>`
+  $(".hasdiagnose .box[data-index=" + indexNow + "]").find(".moduleCenter .centerBox").append(str)
+  renderHasTreatPush(treatPush)
+  renderHasMedicPush(medicinesPush)
+  renderHasOperationsPush(operationsPush)
+  renderHasNursePush(nursePush)
+  $('.hasdiagnose .centerBox ul li').click(function () {
+    var i = $(this).index();
+    if ($(this).hasClass('active')) {
+      $(this).removeClass('active');
+      $(".hasdiagnose .checkBox[data-index=" + i + "]").removeClass('onshow');
+    } else {
+      $(this).addClass('active').siblings().removeClass('active');
+      $(".hasdiagnose .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
+    }
+
+  });
+}
+function renderMayTreatPush(list) {
+  let state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maygeneral') {
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    let str = ''
+    for (let i = 0; i < list.length; i++) {
+      const item = list[i];
+      str = `${item.generaTreat}`
+    }
+    $(".maygeneral").append(str)
+  }
+}
+function renderHasTreatPush(list) {
+  let state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasgeneral') {
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    let str = ''
+    for (let i = 0; i < list.length; i++) {
+      const item = list[i];
+      str = `${item.generaTreat}`
+    }
+    $(".hasgeneral").append(str)
+  }
+}
+function renderMayMedicPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maymedicine') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".maymedicine").append(shortStr).append(longStr)
+  }
+}
+function renderHasMedicPush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasmedicine') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".hasmedicine").append(shortStr).append(longStr)
+  }
+}
+function renderMayOperationsPush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayoperation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".mayoperation").append(shortStr).append(longStr)
+  }
+}
+function renderHasOperationsPush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasoperation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".hasoperation").append(shortStr).append(longStr)
+  }
+}
+function renderMayNursePush(list) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maynurse') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".maynurse").append(shortStr).append(longStr)
+  }
+}
+function renderHasNursePush(list) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasnurse') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".hasnurse").append(shortStr).append(longStr)
+  }
+}
 function rendergeneraTreatPush(list) {
   if (list && $(".moduleItem.general").length > 0) {
     $(".moduleItem.general").append(titleStr('generaTreatPush'))
@@ -633,7 +1186,7 @@ function renderOperationPush(list, showNum) {
 }
 
 
-function renderItemWrapper(list, showNum) {
+function renderItemWrapper(list, showNum, name) {
   let showNum1 = showNum || 5
   let shortStr = '', longStr = ''
   for (let i = 0; i < list.length; i++) {
@@ -644,15 +1197,15 @@ function renderItemWrapper(list, showNum) {
   }
   if (showNum1 >= list.length) {
     return {
-      shortStr: `<div class="shortBox">${shortStr}</div>`,
+      shortStr: `<div class="shortBox">${name ? name + ':' : ''}${shortStr}</div>`,
       longStr: ''
     }
   } else {
     shortStr += `<span class="showMore"><img class="iconArrowImg" src="${iconArrowDown}"></span>`
     longStr += `<span class="showLess"><img class="iconArrowImg"  src="${iconArrowUp}"></span>`
     return {
-      shortStr: `<div class="shortBox">${shortStr}</div>`,
-      longStr: `<div class="longBox">${longStr}</div>`
+      shortStr: `<div class="shortBox">${name ? name + ':' : ''}${shortStr}</div>`,
+      longStr: `<div class="longBox">${name ? name + ':' : ''}${longStr}</div></div>`
     }
   }
 }
@@ -694,6 +1247,28 @@ function renderModuleWrapper(moduleList) {
       if (moduleList[i].code == 'critical') {
         moduleStr += `<div class="moduleItem warning"  data-num="${moduleList[i].number}" style="display:none"></div>`
         // moduleStr += `<div class="moduleItem tips"  data-num="${moduleList[i].number}" style="display:none"></div>`
+      } else if (moduleList[i].code == 'maydiagnose') {
+        maydiagnoseList = moduleList[i].planDetails
+        moduleStr += `<div class="moduleItem ${moduleList[i].code}"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        let arr = []
+        for (let j = 0; j <  moduleList[i].planDetails.length; j++) {
+          let item = moduleList[i].planDetails[j]
+          arr.push(item.status)
+        }
+        if(arr.indexOf('1') == -1){
+          maydiagnoseType = true
+        }
+      } else if (moduleList[i].code == 'hasdiagnose') {
+        hasdiagnoseList = moduleList[i].planDetails
+        moduleStr += `<div class="moduleItem ${moduleList[i].code}"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        let arr = []
+        for (let j = 0; j <  moduleList[i].planDetails.length; j++) {
+          let item = moduleList[i].planDetails[j]
+          arr.push(item.status)
+        }
+        if(arr.indexOf('1') == -1){
+          hasdiagnoseType = true
+        }
       } else {
         moduleStr += `<div class="moduleItem ${moduleList[i].code}"  data-num="${moduleList[i].number}" style="display:none"></div>`
       }
@@ -860,3 +1435,18 @@ $(function () {
     adjustHei()
   })
 });
+//展开更多
+$(document).on("click", ".toogle", (e) => {
+  if ($(e.target).is(".up")) {
+    $(e.target).removeClass("up").html("加载更多").append(`<img class="arrow" src=${more} alt="下拉">`);
+    $(e.target).parents(".item").find(".box-1").css("display", 'none');
+    return;
+  }
+  $(".item").each(function (i) {
+    $(this).find('.toogle').removeClass("up")
+    $(this).find(".box-1").css("display", 'none');
+    $(this).find('.toogle').html("加载更多").append(`<img class="arrow" src=${more} alt="下拉">`);
+  });
+  $(e.target).addClass("up").html("收起").append(`<img class="arrow" src=${up} alt="下拉">`);
+  $(e.target).parents(".item").find(".box-1").css("display", 'block');
+});

+ 683 - 67
src/js/cdssHorizontal.js

@@ -7,6 +7,7 @@ if (!Promise) {
   })
 }
 const $ = require("jquery");
+require('./util.js');
 require('./../css/reset.css');
 require('./../css/cdssHorizontal.less');
 require('./../css/popup.css');
@@ -25,6 +26,8 @@ let iconArrowDown = require('./../images/icon_arrow_down.png').replace(/^undefin
 let showImg = require('./../images/show2.png').replace(/^undefined/g, '')
 let collapseImg = require('./../images/collapse2.png').replace(/^undefined/g, '')
 let treatDisName, treatUniqueName
+let maydiagnoseList = [], hasdiagnoseList = []
+let maydiagnoseType = false, hasdiagnoseType = false;
 let generalTreatInfo
 const { renderFollowUp } = require('./followUp.js');
 const { getTcmMr } = require('./tcmiss.js');
@@ -63,6 +66,17 @@ function getPushInfo() {
   }))
 
 }
+function pushByDisease(name, i) {
+  return post(config.pushInner, Object.assign({}, msg, {
+    featureType: '1,4,5,6,7,8,9,10,12,13',
+    hospitalId: hospitalIdUrl || msg.hospitalId,
+    ruleType: config.ruleTypeMap['22'],
+    diseaseName: {
+      name: name,
+      uniqueName: name
+    }
+  }))
+}
 function getPusgWarning() {
   const indPush = pushMrId ? config.indicationPushCache : config.indicationPush;
   return post(indPush, Object.assign({}, msg, { ruleType: '1,2,3,4', mrId: pushMrId || mrId }))
@@ -106,27 +120,27 @@ function renderPage(pageSet) {
   const hasTcm = hasTab("中医辅助", pageSet.sysSetInfo)
 
   //所有模块都未开启配置,显示功能未开启(无tab)
-  if(hasAuxiliary.status===0&&hasMedical.status===0&&hasFollowUp.status===0&&hasTcm.status===0){
-      const nullTxt = `<div class="empty-box" style="left: -20px;display: block;">
+  if (hasAuxiliary.status === 0 && hasMedical.status === 0 && hasFollowUp.status === 0 && hasTcm.status === 0) {
+    const nullTxt = `<div class="empty-box" style="left: -20px;display: block;">
                 <img class="emptyImg" src="../images/icon_admin.png" alt="空">
                 <p class="emptyTxt">功能未开启</p>
             </div>`
-      $(".recommendWrap").html(nullTxt).show();
-      return;
+    $(".recommendWrap").html(nullTxt).show();
+    return;
   }
   if (hasTcm) {
     getTcmMr(mrId, hasTcm);
   }
 
   if (hasFollowUp) {
-      renderFollowUp(msg, 1)
+    renderFollowUp(msg, 1)
   }
   const planDetail = hasAuxiliary.planDetails;
-  const configs = planDetail.filter((it)=>it.status!==0)||[];
-  if(!configs[0]){         //没有开启辅助信息各项配置
-      $('.empty-box,.leftWrapper').hide();
-      $('.recommendWrap .empty-right').show();
-      return;
+  const configs = planDetail.filter((it) => it.status !== 0) || [];
+  if (!configs[0]) {         //没有开启辅助信息各项配置
+    $('.empty-box,.leftWrapper').hide();
+    $('.recommendWrap .empty-right').show();
+    return;
   }
   //有数据再设置宽度
   //setWidth()
@@ -160,7 +174,11 @@ function renderTab(tabList) {
       TabNum++
       tabStr += `<div class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span></div>`
     }
-
+    if (tabList[i].code == 'maydiagnose') {
+      maydiagnoseList = moduleList[i].planDetails
+    } else if (tabList[i].code == 'hasdiagnose') {
+      hasdiagnoseList = tabList[i].planDetails
+    }
   }
   $(".tabList").append(tabStr)
   $(".tabList .tab").eq(0).addClass("activeTab")
@@ -192,6 +210,28 @@ function renderModuleWrapper(moduleList) {
       } else if (moduleList[i].code == 'critical') {
         moduleStr += `<div class="moduleItem warning"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
         // moduleStr += `<div class="moduleItem tips"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
+      } else if (moduleList[i].code == 'maydiagnose') {
+        maydiagnoseList = moduleList[i].planDetails
+        moduleStr += `<div class="moduleItem ${moduleList[i].code}"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
+        let arr = []
+        for (let j = 0; j < moduleList[i].planDetails.length; j++) {
+          let item = moduleList[i].planDetails[j]
+          arr.push(item.status)
+        }
+        if (arr.indexOf(1) == -1) {
+          maydiagnoseType = true
+        }
+      } else if (moduleList[i].code == 'hasdiagnose') {
+        hasdiagnoseList = moduleList[i].planDetails
+        moduleStr += `<div class="moduleItem ${moduleList[i].code}"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
+        let arr = []
+        for (let j = 0; j < moduleList[i].planDetails.length; j++) {
+          let item = moduleList[i].planDetails[j]
+          arr.push(item.status)
+        }
+        if (arr.indexOf(1) == -1) {
+          hasdiagnoseType = true
+        }
       } else {
         moduleStr += `<div class="moduleItem ${moduleList[i].code}"  data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
       }
@@ -206,7 +246,7 @@ function renderModuleWrapper(moduleList) {
 
 }
 function isNeedPush(list) {
-  let pushCode = ['critical',"diag", "lis", "pacs", "symptom", "vital","treat","medicines",'evaluation','general','medicine','operation','nurse']
+  let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse']
   for (let i = 0; i < list.length; i++) {
     if (pushCode.indexOf(list[i].code) > -1) {
       if (list[i].status == "1") {
@@ -277,8 +317,8 @@ function renderCaseWrite() {
         }
       }
     }
-  }).catch(()=>{
-      $(".loading").hide()
+  }).catch(() => {
+    $(".loading").hide()
   })
 }
 function renderPushData() {
@@ -312,32 +352,36 @@ function renderPushData() {
       let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
       let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
       let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
-
+      let diagList = result.clickPosDis || [] //可能诊断
+      let AffList = result.clickAffDis || [] //已诊断疾病
       renderLis(lisPush, lisNum)
       renderScale(scalePush, scaleNum)
       renderPacs(pacsPush, pacsNum)
       renderCheckup(checkupPush, checkupNum)
       renderSymptomPush(symptomPush, symptomNum)
       renderDiag(diagPush)
+      renderDiagList(diagList)
+      renderAffListList(AffList)
       if (medicinesPush.length > 0 || operationsPush.length > 0 || generaTreatPush || nursePush.length > 0) {
         let str = `<img class="treatIcon" src = ${titleConfigH["treat"].icon} /><span>${titleConfigH["treat"].name}</span>`
         $(".rightBoxTitle").append(str)
         renderDisName()
         $(".empty-box").hide();
         $(".rightWrapper").css("display", "block")
-        if($(".leftBox .moduleItem:visible").length===0){   //左侧没有数据,右侧有数据时,右侧往左移
-          $(".leftWrapper").css({"width":'0','padding':'0'});
-          $(".rightWrapper").css("width",'100%');
+        if ($(".leftBox .moduleItem:visible").length === 0) {   //左侧没有数据,右侧有数据时,右侧往左移
+          $(".leftWrapper").css({ "width": '0', 'padding': '0' });
+          $(".rightWrapper").css("width", '100%');
         }
-      } else if($(".leftWrapper .moduleItem:visible").length!==0) {console.log(2)
+      } else if ($(".leftWrapper .moduleItem:visible").length !== 0) {
+        console.log(2)
         $(".empty-box").hide();
         $(".leftWrapper").css({
           borderRight: "0px",
           width: "100%"
         })
       }
-      if ($(".moduleItem.general,.moduleItem.medicine,.moduleItem.operation,.moduleItem.nurse").length === 0&&$(".leftWrapper .moduleItem:visible").length!==0) {
-          console.log(3)
+      if ($(".moduleItem.general,.moduleItem.medicine,.moduleItem.operation,.moduleItem.nurse").length === 0 && $(".leftWrapper .moduleItem:visible").length !== 0) {
+        console.log(3)
         $(".rightWrapper").css("display", "none")
         $(".empty-box").hide();
         $(".leftWrapper").css({
@@ -345,7 +389,7 @@ function renderPushData() {
           width: "100%"
         })
       }
-
+      console.log(123);
       rendergeneraTreatPush(generaTreatPush)
       renderMedicinesPush(medicinesPush, medicinesNum)
       renderOperationPush(operationsPush, operationsNum)
@@ -355,24 +399,593 @@ function renderPushData() {
       moreInfo()
       empty()
     }
-  }).catch(()=>{
-      $(".loading").hide()
+  }).catch(() => {
+    $(".loading").hide()
   })
 }
-function empty(){   //显示空状态
-  setTimeout(function(){console.log(!$(".rightWrapper .rightBoxTitle").html(),$(".leftWrapper .moduleItem:visible").length===0)
-      if((!$(".rightWrapper .rightBoxTitle").html())&&$(".leftWrapper .moduleItem:visible").length!==0){console.log(4)
-          $(".leftWrapper").css({
-              borderRight: "0px",
-              width: "100%"
-          })
+function renderpushByMayDisease(name, i, inx) {
+  return pushByDisease(name, i).then(res => {
+    $(".loading").hide();
+    hasCompleteTnterface++
+    if (res.data.code == "0") {
+      const result = res.data.data
+      let symptomPush = result.symptom || []
+      let vitalPush = result.vital || []
+      let lisPush = result.lis || []
+      let pacsPush = result.pacs || []
+      let scalePush = result.scale || []
+      let disPush = result.dis['大数据推送诊断'] || {}
+      let treatPush = result.treat || {}
+      let medicinesPush = result.medicines || {}
+      let operationsPush = result.operations || {}
+      let nursePush = result.nurse || {}
+      if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && treatPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0) {
+        $.toast('toast3', '', 3000, '.maydiagnose', i);
+      } else if (maydiagnoseType) {
+        $.toast('toast3', '', 3000, '.maydiagnose', i);
+      } else {
+        renderMaySymptomPush(symptomPush, inx)
+        renderMayVitalPush(vitalPush, inx)
+        renderMayLisPush(lisPush, inx)
+        renderMayPacsPush(pacsPush, inx)
+        renderMayScalePush(scalePush, inx)
+        renderMayDisPush(disPush, inx)
+        renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
+        bindOpenInfo()
+        moreInfo()
+        bindSlide();
       }
-      if($(".tabList .tab:first-child").is(".activeTab")&&$(".empty-right:visible").length===0&&$(".moduleItem:visible").length===0){
-          $(".empty-box,.leftWrapper").hide();
-          $(".empty-null").show();
+    }
+    empty();  //判断是否显示空状态
+  })
+}
+function renderpushByHasDisease(name, i, inx) {
+  return pushByDisease(name, i).then(res => {
+    $(".loading").hide();
+    hasCompleteTnterface++
+    if (res.data.code == "0") {
+      const result = res.data.data
+      let symptomPush = result.symptom || []
+      let vitalPush = result.vital || []
+      let lisPush = result.lis || []
+      let pacsPush = result.pacs || []
+      let scalePush = result.scale || []
+      let disPush = result.dis['鉴别诊断'] || {}
+      let treatPush = result.treat || {}
+      let medicinesPush = result.medicines || {}
+      let operationsPush = result.operations || {}
+      let nursePush = result.nurse || {}
+      if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && treatPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0) {
+        $.toast('toast3', '', 3000, '.hasdiagnose', i);
+      } else if (hasdiagnoseType) {
+        $.toast('toast3', '', 3000, '.hasdiagnose', i);
+      } else {
+        renderHasSymptomPush(symptomPush, inx)
+        renderHasVitalPush(vitalPush, inx)
+        renderHasLisPush(lisPush, inx)
+        renderHasPacsPush(pacsPush, inx)
+        renderHasScalePush(scalePush, inx)
+        renderHasDisPush(disPush, inx)
+        renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
+        bindOpenInfo()
+        moreInfo()
+        bindSlide();
       }
-  },300);
+
+    }
+    empty();  //判断是否显示空状态
+  })
+}
+function empty() {   //显示空状态
+  setTimeout(function () {
+    if ((!$(".rightWrapper .rightBoxTitle").html()) && $(".leftWrapper .moduleItem:visible").length !== 0) {
+      console.log(4)
+      $(".leftWrapper").css({
+        borderRight: "0px",
+        width: "100%"
+      })
+    }
+    if ($(".tabList .tab:first-child").is(".activeTab") && $(".empty-right:visible").length === 0 && $(".moduleItem:visible").length === 0) {
+      $(".empty-box,.leftWrapper").hide();
+      $(".empty-null").show();
+    }
+  }, 300);
+}
+function renderDiagList(list, showNum) {
+  if (list.length === 0) {
+    return
+  }
+  $('.moduleItem.maydiagnose .moduleItemTitBox').append(titleStr("maydiagnosePush"))
+  let str = ``
+  let { shortStr, longStr } = renderItemWrapper(list, 10)
+  let boxStr = `<div class="moduleBox">
+        ${str}
+        ${shortStr}
+      </div>`
+  $(".moduleItem.maydiagnose").append(boxStr)
+  $(".moduleItem.maydiagnose").append("<div class='item' data-index='1'></div>")
+  $(".moduleItem.maydiagnose.moduleItemTitBox").append(renderLongStr(name, longStr, "left"))
+  $('.moduleItem.maydiagnose').css("display", "block")
+
+  $('.maydiagnose .pushItemBox').on("click", function (e) {
+    e.preventDefault()
+    const name = $(this).attr('data-name');
+    const i = $(this).attr('data-index');
+    if ($(this).hasClass('active')) {
+      $(this).removeClass('active');
+    } else {
+      $(this).addClass('active').siblings().removeClass('active');
+    }
+    const index = $(this).parent().parent().next().attr('data-i')
+    const showList = $(".maydiagnose .item").css("display")
+    if (showList == "none" || index != i) {
+      $(".loading").show();
+      $(".maydiagnose .item").html('')
+      $(".maydiagnose .item").css("display", "none")
+      $(this).parent().parent().next().css("display", "block")
+      $(this).parent().parent().next().attr('data-i', i)
+      renderpushByMayDisease(name, i, 1)
+    } else {
+      $(this).find(".item").css("display", "block")
+    }
+  });
+}
+function renderAffListList(list, showNum) {
+  if (list.length === 0) {
+    return
+  }
+  $('.moduleItem.hasdiagnose .moduleItemTitBox').append(titleStr("hasdiagnosePush"))
+  let str = ``
+  let { shortStr, longStr } = renderItemWrapper(list, 10)
+  let boxStr = `<div class="moduleBox">
+        ${str}
+        ${shortStr}
+      </div>`
+  $(".moduleItem.hasdiagnose").append(boxStr)
+  $(".moduleItem.hasdiagnose").append("<div class='item' data-index='2'></div>")
+  $(".moduleItem.hasdiagnose.moduleItemTitBox").append(renderLongStr(name, longStr, "left"))
+  $('.moduleItem.hasdiagnose').css("display", "block")
+
+  $('.hasdiagnose .pushItemBox').on("click", function (e) {
+    e.preventDefault()
+    const name = $(this).attr('data-name');
+    const i = $(this).attr('data-index');
+    if ($(this).hasClass('active')) {
+      $(this).removeClass('active');
+    } else {
+      $(this).addClass('active').siblings().removeClass('active');
+    }
+    const index = $(this).parent().parent().next().attr('data-i')
+    const showList = $(".hasdiagnose .item").css("display")
+    if (showList == "none" || index != i) {
+      $(".loading").show();
+      $(".hasdiagnose .item").html('')
+      $(".hasdiagnose .item").css("display", "none")
+      $(this).parent().parent().next().css("display", "block")
+      $(this).parent().parent().next().attr('data-i', i)
+      renderpushByHasDisease(name, i, 2)
+    } else {
+      $(this).find(".item").css("display", "block")
+    }
+  });
+}
+function renderMayVitalPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayvital') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr } = renderItemWrapper(list, num, '体征')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayvital'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .mayvital").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .mayvital").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .mayvital").css("display", "block")
+  }
+
+}
+function renderHasVitalPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasvital') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr } = renderItemWrapper(list, num, '体征')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasvital'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .hasvital").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hasvital").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .hasvital").css("display", "block")
+  }
+
+}
+function renderMaySymptomPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maysymptom') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    console.log(778);
+    let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maysymptom'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .maysymptom").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .maysymptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .maysymptom").css("display", "block")
+  }
+}
+function renderHasSymptomPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hassymptom') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hassymptom'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .hassymptom").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hassymptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .hassymptom").css("display", "block")
+  }
+}
+function renderMayLisPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maylis') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maylis'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .maylis").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .maylis").append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .maylis").css("display", "block")
+  }
 }
+function renderHasLisPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'maylis') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='haslis'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .haslis").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .haslis").append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .haslis").css("display", "block")
+  }
+}
+function renderMayPacsPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maypacs') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maypacs'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .maypacs").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .maypacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .maypacs").css("display", "block")
+  }
+}
+function renderHasPacsPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'haspacs') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='haspacs'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .haspacs").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .haspacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .haspacs").css("display", "block")
+  }
+}
+function renderMayScalePush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayevaluation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayevaluation'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").css("display", "block")
+  }
+}
+function renderHasScalePush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasevaluation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasevaluation'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").css("display", "block")
+  }
+}
+function renderMayDisPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayantidias') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayantidias'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .mayantidias").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .mayantidias").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .mayantidias").css("display", "block")
+  }
+}
+function renderHasDisPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasantidias') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
+    $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasantidias'></div>")
+    $(".moduleItem .item[data-index=" + inx + "] .hasantidias").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hasantidias").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
+    $(".moduleItem .item[data-index=" + inx + "] .hasantidias").css("display", "block")
+  }
+}
+function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
+  $(".maydiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
+  let str = `<ul>
+    ${treatPush.length > 0 ? `<li class="general">一般治疗</li>` : ''}
+    ${medicinesPush.length > 0 ? `<li class="medicine">推荐用药</li>` : ''}
+    ${operationsPush.length > 0 ? `<li class="operation">推荐手术/操作</li>` : ''}
+    ${nursePush.length > 0 ? `<li class="nurse">推荐护理</li>` : ''}
+  </ul>
+  <div class="centerBoxItem">
+    ${treatPush.length > 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
+    ${medicinesPush.length > 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
+    ${operationsPush.length > 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
+    ${nursePush.length > 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
+  </div>`
+  $(".maydiagnose .item[data-index=" + inx + "] .centerBox").append(str)
+  renderMayTreatPush(treatPush, inx)
+  renderMayMedicinesPush(medicinesPush, inx)
+  renderMayOperationsPush(operationsPush, inx)
+  renderMayNursePush(nursePush, inx)
+  $(".maydiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
+    var i = $(this).index();
+    if ($(this).hasClass('actives')) {
+      $(this).removeClass('actives');
+      $(".maydiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
+    } else {
+      $(this).addClass('actives').siblings().removeClass('actives');
+      $(".maydiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
+    }
+
+  });
+}
+function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
+  $(".hasdiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
+  let str = `<ul>
+    ${treatPush.length > 0 ? `<li class="general">一般治疗</li>` : ''}
+    ${medicinesPush.length > 0 ? `<li class="medicine">推荐用药</li>` : ''}
+    ${operationsPush.length > 0 ? `<li class="operation">推荐手术/操作</li>` : ''}
+    ${nursePush.length > 0 ? `<li class="nurse">推荐护理</li>` : ''}
+  </ul>
+  <div class="centerBoxItem">
+    ${treatPush.length > 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
+    ${medicinesPush.length > 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
+    ${operationsPush.length > 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
+    ${nursePush.length > 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
+  </div>`
+  $(".hasdiagnose .item[data-index=" + inx + "] .centerBox").append(str)
+  renderHasTreatPush(treatPush, inx)
+  renderHasMedicinesPush(medicinesPush, inx)
+  renderHasOperationsPush(operationsPush, inx)
+  renderHasNursePush(nursePush, inx)
+  $(".hasdiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
+    var i = $(this).index();
+    console.log(123);
+    if ($(this).hasClass('actives')) {
+      $(this).removeClass('actives');
+      $(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
+    } else {
+      $(this).addClass('actives').siblings().removeClass('actives');
+      $(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
+      console.log(i);
+    }
+
+  });
+}
+function renderMayTreatPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maygeneral') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    let str = ''
+    for (let i = 0; i < list.length; i++) {
+      const item = list[i];
+      str = `${item.generaTreat}`
+    }
+    $(".moduleItem .item[data-index=" + inx + "] .maygeneral").append(str)
+  }
+}
+function renderHasTreatPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasgeneral') {
+      num = item.number
+      state = item.status
+    }
+  }
+  let str = ''
+  if (list.length > 0 && state != 0) {
+    for (let i = 0; i < list.length; i++) {
+      const item = list[i];
+      str = `${item.generaTreat}`
+    }
+    $(".moduleItem .item[data-index=" + inx + "] .hasgeneral").append(str)
+  }
+}
+function renderMayMedicinesPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maymedicine') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    console.log($(".moduleItem .item[data-index=" + inx + "] .maymedicine"));
+    $(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
+  }
+}
+function renderHasMedicinesPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasmedicine') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
+  }
+}
+function renderMayOperationsPush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'mayoperation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
+  }
+}
+function renderHasOperationsPush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasoperation') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
+  }
+}
+
+function renderMayNursePush(list, inx) {
+  let num, state
+  for (let i = 0; i < maydiagnoseList.length; i++) {
+    const item = maydiagnoseList[i];
+    if (item.code == 'maynurse') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
+  }
+}
+function renderHasNursePush(list, inx) {
+  let num, state
+  for (let i = 0; i < hasdiagnoseList.length; i++) {
+    const item = hasdiagnoseList[i];
+    if (item.code == 'hasnurse') {
+      num = item.number
+      state = item.status
+    }
+  }
+  if (list.length > 0 && state != 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, num)
+    $(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(shortStr)
+    $(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
+  }
+}
+
 function renderLis(list, showNum) {
   if (list.length > 0 && $(".moduleItem.lis").length > 0) {
     moduleNum++
@@ -428,18 +1041,18 @@ function renderSymptomPush(list, showNum) {
   }
 
 }
-function renderMedicinesPush(list, showNum) {
+// function renderMedicinesPush(list, showNum) {
 
-  if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
-    moduleNum++
-    $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
-    let { shortStr, longStr } = renderItemWrapper(list, showNum)
-    $(".moduleItem.medicine").append(shortStr)
-    $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
-    $(".moduleItem.medicine").css("display", "block")
-  }
+//   if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
+//     moduleNum++
+//     $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
+//     let { shortStr, longStr } = renderItemWrapper(list, showNum)
+//     $(".moduleItem.medicine").append(shortStr)
+//     $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
+//     $(".moduleItem.medicine").css("display", "block")
+//   }
 
-}
+// }
 function renderOperationPush(list, showNum) {
   if (list.length > 0 && $(".moduleItem.operation").length > 0) {
     moduleNum++
@@ -457,7 +1070,6 @@ function renderDisName() {
 function rendergeneraTreatPush(list) {
   if (list && list.length > 0 && $(".moduleItem.general").length > 0) {
     moduleNum++
-
     $('.moduleItem.general .moduleItemTitBox').append(titleStr("generaTreatPush"))
     let str = `<div class="generalTreatInfo clearfix isOverFlow">${list}</div>`
     $(".moduleItem.general").append(str)
@@ -470,7 +1082,7 @@ function rendergeneraTreatPush(list) {
       }
     })
 
-      console.log($(".generalTreatInfo").text())
+    console.log($(".generalTreatInfo").text())
     $(".moduleItem.general").css("display", "block")
   }
 }
@@ -576,8 +1188,8 @@ function renderPushWarning() {
     }
     empty()
 
-  }).catch(()=>{
-      $(".loading").hide()
+  }).catch(() => {
+    $(".loading").hide()
   })
 }
 function renderBillingPush(list, name, code) {
@@ -610,32 +1222,33 @@ function renderLongStr(name, longStr, location) {
 }
 
 
-function renderItemWrapper(list, showNum) {
+function renderItemWrapper(list, showNum, name) {
+  console.log(name);
   let showNum1 = showNum || 5
   let shortStr = '', longStr = ''
   for (let i = 0; i < list.length; i++) {
     if (i <= showNum1 - 1) {
-      shortStr += renderPushItem(list[i])
+      shortStr += renderPushItem(list[i], i)
     }
-    longStr += renderPushItem(list[i])
+    longStr += renderPushItem(list[i], i)
   }
 
   if (showNum1 >= list.length) {
     return {
-      shortStr: `<div class="shortBox">${shortStr}</div>`,
+      shortStr: `<div class="shortBox"><span>${name ? name + ':' : ''}</span>${shortStr}</div>`,
       longStr: ''
     }
   } else {
     shortStr += `<span class="showMore"> <img class="iconArrowImg" src="${showImg}"></span>`
     longStr += `<span class="showLess"><img class="iconArrowImg"  src="${collapseImg}"></span>`
     return {
-      shortStr: `<div class="shortBox clearfix">${shortStr}</div>`,
-      longStr: `<div class="longBox clearfix">${longStr}</div>`
+      shortStr: `<div class="shortBox clearfix"><span>${name ? name + ':' : ''}</span>${shortStr}</div>`,
+      longStr: `<div class="longBox clearfix"<span>${name ? name + ':' : ''}</span>${longStr}</div>`
     }
   }
 }
-function renderPushItem(item) {
-  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
+function renderPushItem(item, i) {
+  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}" data-index="${i}">`
   str += `${item.hasScale == "0" ? `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
   str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
   str += '</span >'
@@ -651,19 +1264,22 @@ function bindOpenInfo() {
 
 
 function titleStr(type) {
+  console.log(type);
   let titleStr = ''
+  console.log(titleConfigH[type].icon);
   titleStr += `<div class="moduleTitle"><img class="titleIcon" src=${titleConfigH[type].icon}>${titleConfigH[type].name}:</div>`
   return titleStr
 }
 function bindSlide() {
   $(".showMore").off("click").on("click", function () {
-    const longBox = $(this).parent().next().length?$(this).parent().next():$(this).parent().parent().next();
+    const longBox = $(this).parent().next().length ? $(this).parent().next() : $(this).parent().parent().next();
+    console.log(longBox);
     $(".longStrBox").css("display", "none")
-      longBox.css("display", "block")
+    longBox.css("display", "block")
     let location = longBox.attr("data-location")
     let scrollTop = getLongTop(location)
-      const n = Number(scrollTop)-2>-1?Number(scrollTop)-2:0;
-      longBox.css("top", n + "px")
+    const n = Number(scrollTop) - 2 > -1 ? Number(scrollTop) - 2 : 0;
+    longBox.css("top", n + "px")
   })
   $(".showLess").off("click").on("click", function () {
     $(this).parent().parent().css("display", "none")
@@ -748,21 +1364,21 @@ function addScrollEvent() {
   $(`.leftWrapper`).off("scroll").scroll(throttle(function () {
 
     if ($(".leftWrapper .longStrBox:visible").length) {
-        const n = Number(getLongTop("left")) -10>-1?(Number(getLongTop("left")) -10):0;
-      $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) -2 + "px")
+      const n = Number(getLongTop("left")) - 10 > -1 ? (Number(getLongTop("left")) - 10) : 0;
+      $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) - 2 + "px")
     }
   }, 100));
   $(`.rightWrapper`).off("scroll").scroll(throttle(function () {
     if ($(".rightWrapper .longStrBox:visible").css("display") === "block") {
-      const n = Number(getLongTop("right"))>-1?(Number(getLongTop("right"))):0;
+      const n = Number(getLongTop("right")) > -1 ? (Number(getLongTop("right"))) : 0;
       $(".rightWrapper .longStrBox:visible").css("top", n + "px")
     }
   }, 100));
 }
 $(function () {//隐藏logo
-    if(getUrlArgObject("hideLg")){
-        $(".versionTop .logoTxt").hide();
-    }
+  if (getUrlArgObject("hideLg")) {
+    $(".versionTop .logoTxt").hide();
+  }
   getVersion()
   $(".versionTop").on("click", function () {
     openNewWin("disclaimer.html")

+ 139 - 113
src/js/promise.js

@@ -25,8 +25,8 @@ let iconTreatMedicine = require('./../images/treat_icon.png').replace(/^undefine
 let iconCaseWrite = require('./../images/icon_case_write.png').replace(/^undefined/g, '')
 let intelligentDiagnosis = require('./../images/intelligentDiagnosis.png').replace(/^undefined/g, '')
 let therapeuticSchedule = require('./../images/therapeuticSchedule.png').replace(/^undefined/g, '')
-
-
+let maydiagnosePush = require('./../images/icon-diag.png').replace(/^undefined/g, '')
+let hasdiagnosePush = require('./../images/icon-hasdiagnose.png').replace(/^undefined/g, '')
 
 
 //重写assign方法imgR
@@ -60,12 +60,12 @@ window.console = window.console || (function () {
 
 const config = {
   pushInner: '/sys/push/push',
-  indicationPush:'/sys/push/indicationPush',
-    indicationPushCache: '/sys/mr/getIndicationMr',
+  indicationPush: '/sys/push/indicationPush',
+  indicationPushCache: '/sys/mr/getIndicationMr',
   calculate: '/api/data/calc/calculate',
   disclaimer: '/sys/disclaimerInfo/getDisclaimerInfo',
   information: '/kl/conceptInfo/getStaticKnowledge',
-  getStaticKnowledgeForHIS:'/kl/conceptInfo/getStaticKnowledgeForHIS', //对接一对多
+  getStaticKnowledgeForHIS: '/kl/conceptInfo/getStaticKnowledgeForHIS', //对接一对多
   informationMore: '/api/data/conceptDetail/getConceptDetails',
   pushScale: '/api/data/push/pushScale',
   getSysSetInfoDatas: '/sys/plan/getSysPlanInfoDatas',
@@ -75,20 +75,23 @@ const config = {
   getStaticKnowledge: '/kl/conceptInfo/staticKnowledgeIndex',//静态知识检索
   getStaticScale: '/api/data/search/getScale',
   dictionaryInfo: '/sys/dictionaryInfo/getList', //字典信息
-  getPushSet:'/sys/plan/getSysPlanInfoDatas', //获取推送配置
-  analyse:'/api/data/mrqc/analyse',
-  getHosptDeptUsal:'/api/data/concept/getHosptDeptUsal', //获取科室常用标签
-  caseWritingPrompt:'/sys/mrqc/caseWritingPrompt',//病历书写规范提示
-  followUp:'/sys/push/pushPlan', //随访计划
-  ruleTypeMap:{     //大数据推送参数featureType对应
-    '22':'1,2',
-    '11':'3',
-    '8':'4,5'
+  getPushSet: '/sys/plan/getSysPlanInfoDatas', //获取推送配置
+  analyse: '/api/data/mrqc/analyse',
+  getHosptDeptUsal: '/api/data/concept/getHosptDeptUsal', //获取科室常用标签
+  caseWritingPrompt: '/sys/mrqc/caseWritingPrompt',//病历书写规范提示
+  followUp: '/sys/push/pushPlan', //随访计划
+  ruleTypeMap: {     //大数据推送参数featureType对应
+    '22': '1,2',
+    '11': '3',
+    '8': '4,5'
   },
-  staticSearch:'/kl/conceptInfo/staticIndexPage', //检索静态知识
+  staticSearch: '/kl/conceptInfo/staticIndexPage', //检索静态知识
+  pushByDisease: ' /sys/push/pushByDisease', //诊断推送
+
+
 }
-const isLocal = window.location.hostname.indexOf('localhost') !=-1;
-const imageUrlPrefix = isLocal ?'http://172.17.14.242:82':'http://192.168.2.121:82';//'http://223.93.170.82:12282';
+const isLocal = window.location.hostname.indexOf('localhost') != -1;
+const imageUrlPrefix = isLocal ? 'http://172.17.14.242:82' : 'http://192.168.2.121:82';//'http://223.93.170.82:12282';
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));
@@ -110,24 +113,24 @@ const getUrlArgObject = function getQueryString(name) {
 }
 
 const get = function (url, data) {
-    return new Promise((resolve, reject) => {
-        $.ajax({
-            method: 'get',
-            url: url,
-            //data: 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});
-            },
-            error: function (error) {
-                reject(error);
-            },
-        });
+  return new Promise((resolve, reject) => {
+    $.ajax({
+      method: 'get',
+      url: url,
+      //data: 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 });
+      },
+      error: function (error) {
+        reject(error);
+      },
     });
+  });
 }
 const post = function (url, data) {
   return new Promise((resolve, reject) => {
@@ -197,171 +200,194 @@ const throttle = function (fn, threshhold) {
     }
   }
 }
-const colorMap={
-  warnColor:'#FFE8DD', //智能警示等tab颜色
-  suggerColor:'#E3F0FF', //推荐提示tab颜色
-  treatColor:'#E3FEFE',  //治疗等tab颜色
+const colorMap = {
+  warnColor: '#FFE8DD', //智能警示等tab颜色
+  suggerColor: '#E3F0FF', //推荐提示tab颜色
+  treatColor: '#E3FEFE',  //治疗等tab颜色
 }
 const titleConfig = {
-  warning:{
+  warning: {
     background: colorMap.warnColor,
     icon: iconWarning1,
-    name:"智能警示"
+    name: "智能警示"
   },
-  symptomPush:{
+  symptomPush: {
     background: colorMap.suggerColor,
     icon: iconSymptomPush,
-    name:"推荐症状"
+    name: "推荐症状"
   },
-  diagPush:{
+  diagPush: {
     background: colorMap.suggerColor,
     icon: iconDiagPush2,
-    name:"智能诊断"
+    name: "智能诊断"
   },
-  checkupPush:{
+  checkupPush: {
     background: colorMap.suggerColor,
     icon: iconCheckupPush,
-    name:"推荐体格检查"
+    name: "推荐体格检查"
   },
-  scalePush:{
+  scalePush: {
     background: colorMap.suggerColor,
     icon: iconScalePush,
-    name:"推荐量表"
+    name: "推荐量表"
   },
-  lisPush:{
+  lisPush: {
     background: colorMap.suggerColor,
     icon: iconLisPush,
-    name:"推荐检验"
+    name: "推荐检验"
   },
-  pacsPush:{
+  pacsPush: {
     background: colorMap.suggerColor,
     icon: iconPacsPush,
-    name:"推荐检查"
+    name: "推荐检查"
   },
-  drugPush:{
+  drugPush: {
     background: colorMap.treatColor,
     icon: iconDrugPush,
-    name:"推荐用药"
+    name: "推荐用药"
   },
   nursePush: {
     background: colorMap.treatColor,
     icon: iconNursePush,
     name: "推荐护理"
   },
-  operationPush:{
+  operationPush: {
     background: colorMap.treatColor,
     icon: iconOperationPush,
-    name:"推荐手术及操作"
+    name: "推荐手术及操作"
   },
-  generaTreatPush:{
+  generaTreatPush: {
     background: colorMap.treatColor,
     icon: iconTreat,
-    name:"一般治疗"
+    name: "一般治疗"
   },
-  casewritingPush:{
+  casewritingPush: {
     background: colorMap.warnColor,
     icon: iconCaseWrite,
-    name:"病历书写规范提示"
+    name: "病历书写规范提示"
+  },
+  maydiagnosePush: {
+    background: colorMap.suggerColor,
+    icon: maydiagnosePush,
+    name: "可能诊断"
+  },
+  hasdiagnosePush: {
+    background: colorMap.suggerColor,
+    icon: hasdiagnosePush,
+    name: "已诊断疾病"
   }
+
 }
 const titleConfigH = {
-  warning:{
+  warning: {
     background: "#FFE8DD",
     icon: iconWarning1,
-    name:"智能警示",
-    location:"left"
+    name: "智能警示",
+    location: "left"
   },
-  symptomPush:{
+  symptomPush: {
     background: "#EEF5FD",
     icon: iconSymptomPush,
-    name:"推荐症状",
-    location:"left"
+    name: "推荐症状",
+    location: "left"
   },
-  diagPush:{
+  diagPush: {
     background: "#FAECED",
     icon: intelligentDiagnosis,
-    name:"智能诊断",
-    location:"left"
+    name: "智能诊断",
+    location: "left"
   },
-  checkupPush:{
+  checkupPush: {
     background: "#EEF5FD",
     icon: iconCheckupPush,
-    name:"体格检查",
-    location:"left"
+    name: "体格检查",
+    location: "left"
   },
-  scalePush:{
+  scalePush: {
     background: "#EEF5FD",
     icon: iconScalePush,
-    name:"推荐量表",
-    location:"left"
+    name: "推荐量表",
+    location: "left"
   },
-  lisPush:{
+  lisPush: {
     background: "#ECF4FC",
     icon: iconLisPush,
-    name:"推荐检验",
-    location:"left"
+    name: "推荐检验",
+    location: "left"
   },
-  pacsPush:{
+  pacsPush: {
     background: "#ECF4FC",
     icon: iconPacsPush,
-    name:"推荐检查",
-    location:"left"
+    name: "推荐检查",
+    location: "left"
   },
-  generaTreatPush:{
+  generaTreatPush: {
     background: "#E3FEFE",
     icon: iconTreat,
-    name:"一般治疗",
-    location:"right"
+    name: "一般治疗",
+    location: "right"
   },
-  drugPush:{
+  drugPush: {
     background: "#E3FEFE",
     icon: iconDrugPush,
-    name:"推荐用药",
-    location:"right"
+    name: "推荐用药",
+    location: "right"
   },
-  operationPush:{
+  operationPush: {
     background: "#E3FEFE",
     icon: iconOperationPush,
-    name:"手术/操作",
-    location:"right"
+    name: "手术/操作",
+    location: "right"
   },
-    nursePush: {
-        background: "#E3FEFE",
-        icon: iconNursePush,
-        name: "推荐护理",
-        location: "right"
-    },
-  vigilancePush:{
+  nursePush: {
+    background: "#E3FEFE",
+    icon: iconNursePush,
+    name: "推荐护理",
+    location: "right"
+  },
+  vigilancePush: {
     background: "#FFE8DD",
     icon: iconWarning,
-    name:"警惕",
-    location:"left"
+    name: "警惕",
+    location: "left"
   },
-  treat:{
+  treat: {
     background: "#FFE8DD",
     icon: therapeuticSchedule,
-    name:"治疗方案"
+    name: "治疗方案"
   },
-  casewritingPush:{
+  casewritingPush: {
     background: "#FFE8DD",
     icon: writingNorms,
-    name:"病历书写规范提示",
-    location:"left"
+    name: "病历书写规范提示",
+    location: "left"
+  },
+  maydiagnosePush: {
+    background: "#E3FEFE",
+    icon: maydiagnosePush,
+    name: "可能诊断",
+    location: "right"
+  },
+  hasdiagnosePush: {
+    background: "#E3FEFE",
+    icon: hasdiagnosePush,
+    name: "已诊断疾病",
+    location: "right"
   }
 }
-const Toast = function (msg, duration,type) {
+const Toast = function (msg, duration, type) {
   duration = isNaN(duration) ? 3000 : duration;
   var m = document.createElement('div');
-  if(type == 'warn'){
-    m.innerHTML = '<div style="margin:auto"><img class="warn" style="margin-right:14px;float:left" src="./../images/icon-warning.png" /><span>'+msg+'</span></div>'
+  if (type == 'warn') {
+    m.innerHTML = '<div style="margin:auto"><img class="warn" style="margin-right:14px;float:left" src="./../images/icon-warning.png" /><span>' + msg + '</span></div>'
     m.style.cssText = "margin:auto;width:250px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
-  }else if(type == 'success'){
-    m.innerHTML = '<div style="margin:auto;width:120px"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg +'</span></div>'
+  } else if (type == 'success') {
+    m.innerHTML = '<div style="margin:auto;width:120px"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg + '</span></div>'
     m.style.cssText = "margin:auto;width:120px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
   }
-  
-  
-  $('.warn').css('margin-top','10px')
+
+
+  $('.warn').css('margin-top', '10px')
   document.body.appendChild(m);
   setTimeout(function () {
     var d = 0.5;
@@ -372,7 +398,7 @@ const Toast = function (msg, duration,type) {
 }
 module.exports = {
   config,
-    get,
+  get,
   post,
   getUrlArgObject,
   imageUrlPrefix,

+ 42 - 9
src/js/util.js

@@ -1,4 +1,6 @@
-const transConf = function(arr) {
+let toast = require('./../images/toast-1.png').replace(/^undefined/g, '')
+let toast2 = require('./../images/toast-1.png').replace(/^undefined/g, '')
+const transConf = function (arr) {
     window.arr = arr;
     // var arr = [
     //     {hospitalCode: "A001", sysType: 16, name: "推荐诊断", code: "diagnose_show", value: 1},
@@ -22,13 +24,13 @@ const transConf = function(arr) {
     //     {hospitalCode: "A001", sysType: 16, name: "警惕诊断", code: "vigilant_no", value: 3}
     // ]
     const reg = /_show$/g;
-    let newArr = arr.filter(item => item.code.match(reg) && +item.value === 1 )
-    for(let i = 0; i < newArr.length; i++) {
+    let newArr = arr.filter(item => item.code.match(reg) && +item.value === 1)
+    for (let i = 0; i < newArr.length; i++) {
         for (let j = 0; j < arr.length; j++) {
-            if(arr[j].code.match(/_no$/g) && arr[j].code.replace('_no', ' ') === newArr[i].code.replace('_show', ' ')) {
+            if (arr[j].code.match(/_no$/g) && arr[j].code.replace('_no', ' ') === newArr[i].code.replace('_show', ' ')) {
                 newArr[i].orderNo = +arr[j].value
             }
-            if(arr[j].code.match(/_num$/g) && arr[j].code.replace('_num', ' ') === newArr[i].code.replace('_show', ' ')) {
+            if (arr[j].code.match(/_num$/g) && arr[j].code.replace('_num', ' ') === newArr[i].code.replace('_show', ' ')) {
                 newArr[i].showNum = +arr[j].value
             }
         }
@@ -37,9 +39,9 @@ const transConf = function(arr) {
         return a.orderNo - b.orderNo
     })
     let showLabsNum, showPacsNum, labsAndPacMode
-    showLabsNum = arr.filter(item => item.code === 'inspeclis_num')[0]&&arr.filter(item => item.code === 'inspeclis_num')[0].value
-    showPacsNum = arr.filter(item => item.code === 'inspecpacs_num')[0]&&arr.filter(item => item.code === 'inspecpacs_num')[0].value
-    labsAndPacMode = arr.filter(item => item.code === 'lispacs_place')[0]&&arr.filter(item => item.code === 'lispacs_place')[0].value
+    showLabsNum = arr.filter(item => item.code === 'inspeclis_num')[0] && arr.filter(item => item.code === 'inspeclis_num')[0].value
+    showPacsNum = arr.filter(item => item.code === 'inspecpacs_num')[0] && arr.filter(item => item.code === 'inspecpacs_num')[0].value
+    labsAndPacMode = arr.filter(item => item.code === 'lispacs_place')[0] && arr.filter(item => item.code === 'lispacs_place')[0].value
     return {
         confArr: newArr,
         showLabsNum,
@@ -57,7 +59,38 @@ function toggleWarnBox(text) {
         $(".warning-box").hide();
     }
 }
-
+(function () {
+    $.extend({
+        /****
+         * toast提示
+         * 入参:type如下注释,必填;
+         * text显示的提示语,必填,
+         * time几毫秒秒后消失,可选,默认2000
+         * 用法:$.toast('error','请求出错',3000);
+         * ***/
+        "toast": function (type, text, time = 3000, name,i) {
+            if ($('#toast:visible').length) {
+                $("#toast").remove()
+            }
+            var typeClass = {
+                'toast1': require('./../images/toast-1.png').replace(/^undefined/g, ''),
+                'toast2': require('./../images/toast-2.png').replace(/^undefined/g, ''),
+                'toast3': require('./../images/toast-3.png').replace(/^undefined/g, ''),
+              };
+              console.log(type);
+              if(type == 'toast1' || type == 'toast2'){
+                $(name).find(".box[data-index=" + i + "] ").find(".moduleCenter").append(`<img id="toast" class="toast" src=${typeClass[type]}/>`)
+              }else{
+                  console.log(123);
+                $(name).find(".moduleBox ").find(".pushItemBox[data-index=" + i + "] ").append(`<img id="toast" class="toast" src=${typeClass[type]}/>`)
+              }
+            
+            $("#toast").fadeOut(time, function () {
+                $("#toast").remove()
+            });
+        },
+    });
+})();
 module.exports = {
     transConf,
     toggleWarnBox

+ 1 - 1
webpack.config.js

@@ -4,7 +4,7 @@ const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
-const proxyHost = "http://192.168.2.241:6060";
+const proxyHost = "http://192.168.2.236:6060";
 module.exports = {
   entry: {
     //index: path.resolve(__dirname, 'src/js', 'index.js'),