1178232204@qq.com 3 лет назад
Родитель
Сommit
411e32e4b4
4 измененных файлов с 62 добавлено и 46 удалено
  1. 2 0
      src/css/cdss.less
  2. 17 24
      src/js/cdss.js
  3. 25 22
      src/js/cdssHorizontal.js
  4. 18 0
      src/js/promise.js

+ 2 - 0
src/css/cdss.less

@@ -765,6 +765,8 @@ body {
   color: #000;
 }
 .shortBox-tit {
+  width: 70px;
+  text-align: right;
   color: #333;
   float: left;
 }

+ 17 - 24
src/js/cdss.js

@@ -25,7 +25,10 @@ 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('./../images/toast-1.png').replace(/^undefined/g, '')
+require('./../images/toast-2.png').replace(/^undefined/g, '')
+require('./../images/toast-3.png').replace(/^undefined/g, '')
+require('./../images/toast-4.png').replace(/^undefined/g, '')
 // require('./popupEdit.js');
 
 let infoImg = require('./../images/icon_info.png').replace(/^undefined/g, '')
@@ -378,15 +381,6 @@ function renderpushByMayDisease(name, i) {
           isShow = true
         }
       }
-      console.log(symptomPush.length);
-      console.log(vitalPush.length);
-      console.log(lisPush.length);
-      console.log(pacsPush.length);
-      console.log(scalePush.length);
-      console.log(disPush.length);
-      console.log(medicinesPush.length);
-      console.log(operationsPush.length);
-      console.log(nursePush.length);
       if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0 && !isShow) {
         $.toast('toast1', '', 3000, '.maydiagnose', i);
       } else if (maydiagnoseType) {
@@ -427,11 +421,11 @@ function renderpushByHasDisease(name, i) {
       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 || {}
+      let disPush = result.dis['鉴别诊断'] || []
+      let treatPush = result.treat || []
+      let medicinesPush = result.medicines || []
+      let operationsPush = result.operations || []
+      let nursePush = result.nurse || []
       let isShow = false
       for (let i = 0; i < treatPush.length; i++) {
         const it = treatPush[i];
@@ -695,7 +689,7 @@ function renderDiagList(list, showNum) {
       const item = list[i];
       str +=
         `<div class='box ${i > showNum ? `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>
+          <p class='box-p goDetail' data-name="${item.name}" data-index="${i}">${item.name}<img class="box-img" src=${down} /></p>
           <div class="moduleCenter"></div>
         </div>`
     }
@@ -715,11 +709,11 @@ function renderDiagList(list, showNum) {
         $(".maydiagnose .box").find(".moduleCenter").css("display", "none")
         $(".maydiagnose .box").find(".box-img").attr('src', down)
         $(".maydiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "block")
-        $(e.target).find(".box-img").attr('src', ups)
+        $(e.target).parents('.box').find(".box-img").attr('src', ups)
         renderpushByMayDisease(name, i)
       } else {
         $(".maydiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "none")
-        $(e.target).find(".box-img").attr('src', down)
+        $(e.target).parents('.box').find(".box-img").attr('src', down)
       }
     });
   }
@@ -753,14 +747,13 @@ function renderAffListList(list, showNum) {
         $(".hasdiagnose .box").find(".moduleCenter").css("display", "none")
         $(".hasdiagnose .box").find(".box-img").attr('src', down)
         $(".hasdiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "block")
-        $(e.target).find(".box-img").attr('src', ups)
+        $(e.target).parents('.box').find(".box-img").attr('src', ups)
         renderpushByHasDisease(name, i)
       } else {
         $(".hasdiagnose .box[data-index=" + i + "]").find(".moduleCenter").css("display", "none")
-        $(e.target).find(".box-img").attr('src', down)
+        $(e.target).parents('.box').find(".box-img").attr('src', down)
       }
     });
-
   }
 }
 function renderSymptomPush(list, showNum) {
@@ -1231,15 +1224,15 @@ function renderItemWrapper(list, showNum, name) {
   }
   if (showNum1 >= list.length) {
     return {
-      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${shortStr}</div></div>`,
+      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断' || name == '推荐量表'?'shortBox-tit1' : 'shortBox-tit1'}` : ''}">${shortStr}</div></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"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${shortStr}</div></div>`,
-      longStr: `<div class="longBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${longStr}</div></div></div>`
+      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断' || name == '推荐量表'?'shortBox-tit1' : 'shortBox-tit1'}` : ''}">${shortStr}</div></div>`,
+      longStr: `<div class="longBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断' || name == '推荐量表'?'shortBox-tit1' : 'shortBox-tit1'}` : ''}">${longStr}</div></div></div>`
     }
   }
 }

+ 25 - 22
src/js/cdssHorizontal.js

@@ -20,6 +20,10 @@ let emptyImg = require('./../images/empty3.png').replace(/^undefined/g, '')
 require('./../images/new2.png').replace(/^undefined/g, '')
 require('./../images/dots.png').replace(/^undefined/g, '')
 require('./../images/dot.png').replace(/^undefined/g, '')
+require('./../images/toast-1.png').replace(/^undefined/g, '')
+require('./../images/toast-2.png').replace(/^undefined/g, '')
+require('./../images/toast-3.png').replace(/^undefined/g, '')
+require('./../images/toast-4.png').replace(/^undefined/g, '')
 const { post, config, getUrlArgObject, openNewWin, titleConfigH, throttle, } = require('./promise.js');
 let infoImg = require('./../images/icon_info.png').replace(/^undefined/g, '')
 let infoImgOn = require('./../images/icon_info_on.png').replace(/^undefined/g, '')
@@ -475,7 +479,6 @@ function renderpushByHasDisease(name, i, inx) {
         }
       }
       if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0 && !isShow) {
-        console.log(123);
         $.toast('toast3', '', 3000, '.hasdiagnose', i);
         $(".hasdiagnose .item").css("display", "none")
       } else if (hasdiagnoseType) {
@@ -604,7 +607,7 @@ function renderMayVitalPush(list, inx) {
     let { shortStr, longStr } = 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").append(renderLongStr(titleConfigH["mayvitalPush"].name, longStr, titleConfigH["mayvitalPush"].location))
     $(".moduleItem .item[data-index=" + inx + "] .mayvital").css("display", "block")
   }
 
@@ -623,7 +626,7 @@ function renderHasVitalPush(list, inx) {
     let { shortStr, longStr } = 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").append(renderLongStr(titleConfigH["mayvitalPush"].name, longStr, titleConfigH["mayvitalPush"].location))
     $(".moduleItem .item[data-index=" + inx + "] .hasvital").css("display", "block")
   }
 
@@ -641,7 +644,7 @@ function renderMaySymptomPush(list, inx) {
     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").append(renderLongStr(titleConfigH["symptomPush2"].name, longStr, titleConfigH["symptomPush2"].location))
     $(".moduleItem .item[data-index=" + inx + "] .maysymptom").css("display", "block")
   }
 }
@@ -659,7 +662,7 @@ function renderHasSymptomPush(list, inx) {
     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").append(renderLongStr(titleConfigH["symptomPush2"].name, longStr, titleConfigH["symptomPush2"].location))
     $(".moduleItem .item[data-index=" + inx + "] .hassymptom").css("display", "block")
   }
 }
@@ -785,7 +788,7 @@ function renderMayDisPush(list, inx) {
     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").append(renderLongStr(titleConfigH["diasPush"].name, longStr, titleConfigH["diasPush"].location))
     $(".moduleItem .item[data-index=" + inx + "] .mayantidias").css("display", "block")
   }
 }
@@ -803,7 +806,7 @@ function renderHasDisPush(list, inx) {
     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").append(renderLongStr(titleConfigH["diasPush"].name, longStr, titleConfigH["diasPush"].location))
     $(".moduleItem .item[data-index=" + inx + "] .hasantidias").css("display", "block")
   }
 }
@@ -841,10 +844,10 @@ function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
   ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
   </div>`
   $(".maydiagnose .item[data-index=" + inx + "] .centerBox").append(str)
-  renderMayTreatPush(treatPush)
-  renderMayMedicinesPush(medicinesPush)
-  renderMayOperationsPush(operationsPush)
-  renderMayNursePush(nursePush)
+  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')) {
@@ -891,10 +894,10 @@ function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
     ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
   </div>`
   $(".hasdiagnose .item[data-index=" + inx + "] .centerBox").append(str)
-  renderHasTreatPush(treatPush)
-  renderHasMedicinesPush(medicinesPush)
-  renderHasOperationsPush(operationsPush)
-  renderHasNursePush(nursePush)
+  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).attr('data-index');
     if ($(this).hasClass('actives')) {
@@ -943,16 +946,16 @@ function renderHasTreatPush(list, inx) {
     $(".moduleItem .item[data-index=" + inx + "] .hasgeneral").append(str)
   }
 }
-function renderMayMedicinesPush(list) {
+function renderMayMedicinesPush(list, inx) {
   if (list.length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, 10)
-    console.log($(".moduleItem .item[data-index=" + inx + "] .maymedicine"),112);
+    console.log($(".moduleItem .item[data-index=" + inx + "] .maymedicine"), 112);
     $(".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) {
+function renderHasMedicinesPush(list, inx) {
   if (list.length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, 10)
@@ -960,7 +963,7 @@ function renderHasMedicinesPush(list) {
     $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
   }
 }
-function renderMayOperationsPush(list) {
+function renderMayOperationsPush(list, inx) {
   if (list.length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, 10)
@@ -968,7 +971,7 @@ function renderMayOperationsPush(list) {
     $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
   }
 }
-function renderHasOperationsPush(list) {
+function renderHasOperationsPush(list, inx) {
   if (list.length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, 10)
@@ -977,7 +980,7 @@ function renderHasOperationsPush(list) {
   }
 }
 
-function renderMayNursePush(list) {
+function renderMayNursePush(list, inx) {
   if (list.length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, 10)
@@ -985,7 +988,7 @@ function renderMayNursePush(list) {
     $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
   }
 }
-function renderHasNursePush(list) {
+function renderHasNursePush(list, inx) {
   if (list.length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, 10)

+ 18 - 0
src/js/promise.js

@@ -291,6 +291,18 @@ const titleConfigH = {
     name: "推荐症状",
     location: "left"
   },
+  symptomPush2: {
+    background: "#EEF5FD",
+    icon: iconSymptomPush,
+    name: "症状",
+    location: "left"
+  },
+  mayvitalPush: {
+    background: "#EEF5FD",
+    icon: iconSymptomPush,
+    name: "体征",
+    location: "left"
+  },
   diagPush: {
     background: "#FAECED",
     icon: intelligentDiagnosis,
@@ -362,6 +374,12 @@ const titleConfigH = {
     name: "病历书写规范提示",
     location: "left"
   },
+  diasPush: {
+    background: "#E3FEFE",
+    icon: maydiagnosePush,
+    name: "鉴别诊断",
+    location: "right"
+  },
   maydiagnosePush: {
     background: "#E3FEFE",
     icon: maydiagnosePush,