瀏覽代碼

消息数字显示、诊断横版更多展示bug

zhouna 3 年之前
父節點
當前提交
7e04b850e9
共有 2 個文件被更改,包括 10 次插入17 次删除
  1. 2 5
      src/js/cdss.js
  2. 8 12
      src/js/cdssHorizontal.js

+ 2 - 5
src/js/cdss.js

@@ -444,13 +444,10 @@ function renderBillingPush(list,name,code){
 
 //更新消息个数
 function updatePopNum(){
-    /*const num = $(".tabList .numPop").text();
-    if(+num!==0){
-
-    }*/
-    const warnNum = $(".tips-cont .billingPushItem,.casewriting .billingPushItem").length;console.trace(12,warnNum)
+    const warnNum = $(".tips-cont .billingPushItem,.casewriting .billingPushItem").length;
     if(warnNum===0){
         $(".tabList .numPop").hide();
+        return;
     }
     $(".tabList .numPop").text(warnNum).show()
 }

+ 8 - 12
src/js/cdssHorizontal.js

@@ -447,9 +447,6 @@ function renderDiag(diagPush) {
   let warnNumber = $('.moduleItem.warning').attr("data-num") || 5
 
   $('.moduleItem.diag .moduleItemTitBox').append(titleStr("diagPush"))
-  // let warningDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
-  // let firstDiagPush =  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
-  // let identifyDiagPush = diagPush["鉴别诊断"] ||  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
   renderDiagItem(possibleDiagPush, "可能诊断", number)
   renderDiagItem(firstDiagPush, "既往诊断", number)
   renderDiagItem(identifyDiagPush, "鉴别诊断", number)
@@ -461,7 +458,7 @@ function renderDiagItem(list, name, number) {
     return
   }
   let titleStr = `<span class="moduleBoxName">${name}</span>`
-  let { shortStr, longStr } = renderItemWrapper(list, number, 1, true)
+  let { shortStr, longStr } = renderItemWrapper(list, number)
   let boxStr = `<div class="moduleBox">
         ${titleStr}
         ${shortStr}
@@ -474,7 +471,7 @@ function renderWarningDiag(list, name, showNum) {
   if (list.length > 0 && $(".moduleItem.warning").length > 0) {
     moduleNum++
     $('.moduleItem.warning .moduleItemTitBox').append(titleStr("vigilancePush"))
-    let { shortStr, longStr } = renderItemWrapper(list, showNum, 1, true)
+    let { shortStr, longStr } = renderItemWrapper(list, showNum)
     $('.moduleItem.warning').append(shortStr)
     $('.moduleItem.warning').css("display", "block")
   }
@@ -609,14 +606,15 @@ function titleStr(type) {
   return titleStr
 }
 function bindSlide() {
-  $(".showMore").on("click", function () {
+  $(".showMore").off("click").on("click", function () {
+    const longBox = $(this).parent().next().length?$(this).parent().next():$(this).parent().parent().next();
     $(".longStrBox").css("display", "none")
-    $(this).parents(".moduleItem ").find(".longStrBox").css("display", "block")
-    let location = $(this).parents(".moduleItem ").find(".longStrBox").attr("data-location")
+      longBox.css("display", "block")
+    let location = longBox.attr("data-location")
     let scrollTop = getLongTop(location)
-    $(this).parents(".moduleItem ").find(".longStrBox").css("top", 5 + Number(scrollTop) + "px")
+      longBox.css("top", 5 + Number(scrollTop) + "px")
   })
-  $(".showLess").on("click", function () {
+  $(".showLess").off("click").on("click", function () {
     $(this).parent().parent().css("display", "none")
   })
   addScrollEvent()
@@ -658,10 +656,8 @@ function moreInfo() {
     openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
   })
   $('.evaluationtitle').off("click").click(function () {
-    console.log(11)
     const name = $(this).parent().attr('data-name')
     const type = $(this).parent().attr('data-type')
-    console.log(name)
     openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&gauge=gauge`)
   })