فهرست منبع

滚动条样式修改、气泡数字

zhouna 3 سال پیش
والد
کامیت
647a882af3
2فایلهای تغییر یافته به همراه43 افزوده شده و 9 حذف شده
  1. 23 0
      src/css/common.less
  2. 20 9
      src/js/cdss.js

+ 23 - 0
src/css/common.less

@@ -183,3 +183,26 @@
   }
 
 }
+
+::-webkit-scrollbar, ::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 8px;
+  height: 100px;
+  /*高宽分别对应横竖滚动条的尺寸*/
+  background: #ebeef5;
+  -webkit-box-shadow: inset 1px 0 1px rgba(0, 0, 0, 0.2);
+}
+
+::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb {
+  /*滚动条里面小方块*/
+  width: 8px;
+  border-radius: 5px;
+  background: @bgcBlue;
+}
+
+::-webkit-scrollbar-track, ::-webkit-scrollbar-track {
+  /*滚动条里面轨道*/
+  border-radius: 5px;
+  background: #f0f2f5;
+  opacity: .2;
+}

+ 20 - 9
src/js/cdss.js

@@ -342,7 +342,7 @@ function isNeedPushWarning(list){
   }
   return false
 }
-let popNum = 0;//气泡显示数字
+//let popNum = 0;//气泡显示数字
 function renderPushWarning(){
   return getPusgWarning().then(res =>{
     hasCompleteTnterface++
@@ -362,8 +362,9 @@ function renderPushWarning(){
       renderBillingPush(otherList,'其他提醒','otherremind')
       //moreInfo()
       $(".moduleItem.tips").wrapAll("<div class='tips-cont'></div>");
+        updatePopNum();
       $(titleStr('warning')).insertBefore('.tips-cont .moduleItem:first-child')
-      popNum = billMsgList.length+highRiskList.length+criticalValList.length+otherList.length;
+      //popNum = billMsgList.length+highRiskList.length+criticalValList.length+otherList.length;
       // renderBillingPush(dubugStr,'注意调试信息')
      
     }
@@ -383,14 +384,11 @@ 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()
       }
     }
   })
@@ -421,6 +419,7 @@ function  renderwriteStandardPage(list,casewritingNum){
       $(".longStrBox .billingPushItem").eq( $(".longStrBox .billingPushItem").length -1).append(`<span class="showLessCaseWriting"><img class="iconArrowImg" src="${iconArrowUp}"></span>`)
     }
     $('.moduleItem.casewriting').css("display","block")
+    updatePopNum();
     bindSlideCaseWriting()
   }
 }
@@ -440,9 +439,21 @@ function renderBillingPush(list,name,code){
       </div>`
     $("."+code).append(boxStr)
     $('.moduleItem.'+code).addClass("tips").css("display", "block")
+
 }
 
+//更新消息个数
+function updatePopNum(){
+    /*const num = $(".tabList .numPop").text();
+    if(+num!==0){
 
+    }*/
+    const warnNum = $(".tips-cont .billingPushItem,.casewriting .billingPushItem").length;console.trace(12,warnNum)
+    if(warnNum===0){
+        $(".tabList .numPop").hide();
+    }
+    $(".tabList .numPop").text(warnNum).show()
+}
 function renderDiag(diagPush){
   let possibleDiagPush = diagPush["可能诊断"] || []
   let previousDiagPush = diagPush["既往诊断"] || []
@@ -803,17 +814,17 @@ $(function(){
     }  
   });  
   // $(".iframeWrap").preventScroll();  
-    $(".iframeWrap").preventScroll();
+   /* $(".iframeWrap").preventScroll();
     $(".recommendWrap").preventScroll();
     $(".tcmWarp").preventScroll();
     $(".infoWrap").preventScroll();
-  $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();  
+  $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll(); */
   $(window).on("resize", function(){
-    $(".iframeWrap").preventScroll();  
+    /*$(".iframeWrap").preventScroll();
     $(".recommendWrap").preventScroll();
       $(".tcmWarp").preventScroll();
  
-    $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll(); 
+    $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll(); */
     adjustHei() 
   })
 });