1178232204@qq.com 3 лет назад
Родитель
Сommit
67081bc583
3 измененных файлов с 30 добавлено и 6 удалено
  1. 8 1
      src/css/cdssHorizontal.less
  2. 22 4
      src/js/cdssHorizontal.js
  3. 0 1
      src/js/util.js

+ 8 - 1
src/css/cdssHorizontal.less

@@ -864,7 +864,7 @@
 }
 .toast {
   position: absolute;
-  left: 60px;
+  left: 100px;
   top: 0;
   height: 22px;
   z-index: 55;
@@ -896,3 +896,10 @@
     margin-left: 5px;
   }
 }
+.disable{
+  .pushItemName{
+    background: #EBEBEB!important;
+    color: #B9B9B9!important;
+  }
+  
+}

+ 22 - 4
src/js/cdssHorizontal.js

@@ -414,7 +414,7 @@ function renderPushData() {
     $(".loading").hide()
   })
 }
-function renderpushByMayDisease(name, i, inx) {
+function renderpushByMayDisease(name, i, inx,e) {
   return pushByDisease(name, i).then(res => {
     $(".loading").hide();
     hasCompleteTnterface++
@@ -440,6 +440,8 @@ function renderpushByMayDisease(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) {
         $.toast('toast3', '', 3000, '.maydiagnose', i);
         $(".maydiagnose .item").css("display", "none")
+        $(e.target).parents('.pushItemBox').addClass('disable');
+        $(e.target).parents('.pushItemBox').removeClass('active');
       } else if (maydiagnoseType) {
         $.toast('toast3', '', 3000, '.maydiagnose', i);
         $(".maydiagnose .item").css("display", "none")
@@ -464,7 +466,7 @@ function renderpushByMayDisease(name, i, inx) {
     empty();  //判断是否显示空状态
   })
 }
-function renderpushByHasDisease(name, i, inx) {
+function renderpushByHasDisease(name, i, inx,e) {
   return pushByDisease(name, i).then(res => {
     $(".loading").hide();
     hasCompleteTnterface++
@@ -490,6 +492,8 @@ 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) {
         $.toast('toast3', '', 3000, '.hasdiagnose', i);
         $(".hasdiagnose .item").css("display", "none")
+        $(e.target).parents('.pushItemBox').addClass('disable');
+        $(e.target).parents('.pushItemBox').removeClass('active');
       } else if (hasdiagnoseType) {
         $.toast('toast4', '', 3000, '.hasdiagnose', i);
         $(".hasdiagnose .item").css("display", "none")
@@ -547,8 +551,15 @@ function renderDiagList(list) {
 
   $('.maydiagnose .pushItemBox').on("click", function (e) {
     e.preventDefault()
+    $('.leftWrapper').scrollTop($(this).offset().top+28);
     const name = $(this).attr('data-name');
     const i = $(this).attr('data-index');
+    if ($(this).hasClass('disable')) {
+      $.toast('toast3', '', 3000, '.maydiagnose', i);
+      $(".maydiagnose .item").css("display", "none")
+      $(this).siblings().removeClass('active');
+      return
+    } 
     if ($(this).hasClass('active')) {
       $(this).removeClass('active');
     } else {
@@ -562,7 +573,7 @@ function renderDiagList(list) {
       $(".maydiagnose .item").css("display", "none")
       $(this).parent().parent().next().css("display", "block")
       $(this).parent().parent().next().attr('data-i', i)
-      renderpushByMayDisease(name, i, 1)
+      renderpushByMayDisease(name, i, 1,e)
     } else {
       $(".maydiagnose .item").css("display", "none")
     }
@@ -586,8 +597,15 @@ function renderAffListList(list) {
 
   $('.hasdiagnose .pushItemBox').on("click", function (e) {
     e.preventDefault()
+    $('.leftWrapper').scrollTop($(this).offset().top+28);
     const name = $(this).attr('data-name');
     const i = $(this).attr('data-index');
+    if ($(this).hasClass('disable')) {
+      $.toast('toast3', '', 3000, '.hasdiagnose', i);
+      $(".hasdiagnose .item").css("display", "none")
+      $(this).siblings().removeClass('active');
+      return
+    } 
     if ($(this).hasClass('active')) {
       $(this).removeClass('active');
     } else {
@@ -601,7 +619,7 @@ function renderAffListList(list) {
       $(".hasdiagnose .item").css("display", "none")
       $(this).parent().parent().next().css("display", "block")
       $(this).parent().parent().next().attr('data-i', i)
-      renderpushByHasDisease(name, i, 2)
+      renderpushByHasDisease(name, i, 2,e)
     } else {
       $(".hasdiagnose .item").css("display", "none")
     }

+ 0 - 1
src/js/util.js

@@ -84,7 +84,6 @@ function toggleWarnBox(text) {
             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 () {