zhouna 3 роки тому
батько
коміт
f24078ed87
2 змінених файлів з 21 додано та 3 видалено
  1. 15 0
      src/css/cdss.less
  2. 6 3
      src/js/cdss.js

+ 15 - 0
src/css/cdss.less

@@ -304,8 +304,23 @@ body{
 }
 .tabList{
   margin-bottom: 8px;
+  position: relative;
   height: 100%;
   background: @bgcBlue;
+  .numPop{
+    display: none;
+    position: absolute;
+    top:0;
+    left: 2px;
+    border-radius:8px;
+    width: 15px;
+    height: 15px;
+    background: #FDBE26;
+    box-shadow: 0px 1px 1px 0px #816522;
+    font-size: 12px;
+    text-align: center;
+    color: #fff;
+  }
 }
 .tab{
   width: 10px;

+ 6 - 3
src/js/cdss.js

@@ -342,7 +342,7 @@ function isNeedPushWarning(list){
   }
   return false
 }
-
+let popNum = 0;//气泡显示数字
 function renderPushWarning(){
   return getPusgWarning().then(res =>{
     hasCompleteTnterface++
@@ -363,8 +363,8 @@ function renderPushWarning(){
       //moreInfo()
       $(".moduleItem.tips").wrapAll("<div class='tips-cont'></div>");
       $(titleStr('warning')).insertBefore('.tips-cont .moduleItem:first-child')
+      popNum = billMsgList.length+highRiskList.length+criticalValList.length+otherList.length;
       // renderBillingPush(dubugStr,'注意调试信息')
-     
     }
     if(hasCompleteTnterface === allInterface){
       $('.loading').css("display","none")
@@ -382,11 +382,14 @@ function renderWriteStandard(){
       const list = res.data.data || {}
       let casewritingNum = $(".moduleItem.casewriting").attr("data-num") || 5
       renderwriteStandardPage(list,casewritingNum)
+      const warnNum = popNum + Object.keys(list).length;
+      $(".tabList .numPop").text(warnNum).show()
     }
     if(hasCompleteTnterface === allInterface){
       $('.loading').css("display","none")
       if(moduleNum === 0){
         empty()
+        $(".tabList .numPop").hide()
       }
     }
   })
@@ -679,7 +682,7 @@ function renderTab(tabList){
       }
       
     }
-    tabStr += `</ul>`;
+    tabStr += `</ul><div class="numPop"></div>`;
     $(".tabList").append(tabStr)
     let tabNum = 0;
     if(isTcm=='true'){