|
@@ -68,33 +68,41 @@ function renderMultRecommendInfo(icon, className,title,data, hasInfo, type, posi
|
|
|
<div class="recommendInfoBox ${className + 'box'}"></div>
|
|
|
</div>`
|
|
|
$('.push').append(str)
|
|
|
-
|
|
|
+ let hanContentNum = 0
|
|
|
for(let i = 0; i < data.length; i++) {
|
|
|
- let childrenNodeBoxStr = `<div class="labAndPacsWrapper ${data[i].className+'wrapper'}">
|
|
|
+ if(data[i].data.length > 0) {
|
|
|
+ hanContentNum++
|
|
|
+ let childrenNodeBoxStr = `<div class="labAndPacsWrapper ${data[i].className+'wrapper'}">
|
|
|
<div class="labAndPacsBox ${data[i].className+'box'} clearfix">
|
|
|
</div>
|
|
|
</div>`
|
|
|
- let childrenNodeStr = `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
|
|
|
- let childrenNodeItemStrAll = '' //更多展开框中的字符串
|
|
|
- for(let j = 0; j < data[i].data.length; j++) {
|
|
|
- childrenNodeStr += `<span class="labAndPacsItem">${data[i].data[j].name}</span>`
|
|
|
- childrenNodeItemStrAll += `<span class="labAndPacsItem">${data[i].data[j].name}</span>`
|
|
|
- }
|
|
|
- if(data[i].data.length == 0) {
|
|
|
- childrenNodeStr +='<span class="recommendNull">暂无推荐</span>'
|
|
|
- }
|
|
|
- $('.'+className + 'box').append(childrenNodeBoxStr)
|
|
|
- $('.'+data[i].className+'box').append(childrenNodeStr)
|
|
|
- let childrenNodeStrAll = `<div class="${data[i].className+'boxAll'} itemAllBox">
|
|
|
- <h4>${data[i].title}:</h4>
|
|
|
- <div class="itemAll">
|
|
|
- ${childrenNodeItemStrAll}
|
|
|
- <span class="slideup"><img src="${collapseImg}"></span>
|
|
|
- </div>
|
|
|
- </div>`
|
|
|
+ let childrenNodeStr = `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
|
|
|
+ let childrenNodeItemStrAll = '' //更多展开框中的字符串
|
|
|
+ for(let j = 0; j < data[i].data.length; j++) {
|
|
|
+ childrenNodeStr += `<span class="labAndPacsItem">${data[i].data[j].name}</span>`
|
|
|
+ childrenNodeItemStrAll += `<span class="labAndPacsItem">${data[i].data[j].name}</span>`
|
|
|
+ }
|
|
|
+ if(data[i].data.length == 0) {
|
|
|
+ childrenNodeStr +='<span class="recommendNull">暂无推荐</span>'
|
|
|
+ }
|
|
|
+ $('.'+className + 'box').append(childrenNodeBoxStr)
|
|
|
+ $('.'+data[i].className+'box').append(childrenNodeStr)
|
|
|
+ let childrenNodeStrAll = `<div class="${data[i].className+'boxAll'} itemAllBox">
|
|
|
+ <h4>${data[i].title}:</h4>
|
|
|
+ <div class="itemAll">
|
|
|
+ ${childrenNodeItemStrAll}
|
|
|
+ <span class="slideup"><img src="${collapseImg}"></span>
|
|
|
+ </div>
|
|
|
+ </div>`
|
|
|
+
|
|
|
+ $('.push').append(childrenNodeStrAll)
|
|
|
+ slideToggle("."+data[i].className+"box")
|
|
|
|
|
|
- $('.push').append(childrenNodeStrAll)
|
|
|
- slideToggle("."+data[i].className+"box")
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(hanContentNum > 0) {
|
|
|
+ $('.push .labAndPacsRecommend').css('height', hanContentNum*25 +'px')
|
|
|
}
|
|
|
|
|
|
}
|