|
@@ -14,6 +14,7 @@ if(is8Ie) {
|
|
|
|
|
|
//推荐诊断等单种类型的
|
|
|
function renderRecommendInfo(showNum, icon, className,title,data, hasInfo, type, position) {
|
|
|
+ let showNumCopy = showNum || 5
|
|
|
const dataLen = data.length
|
|
|
const str = `<div class="recommendInfoWrapper ${className} clearfix">
|
|
|
<h4><img src=${icon} title="${title}" class="icon">${title}:</h4>
|
|
@@ -24,8 +25,8 @@ function renderRecommendInfo(showNum, icon, className,title,data, hasInfo, type,
|
|
|
</div>`
|
|
|
$('.push').append(str)
|
|
|
let dataShort
|
|
|
- if(showNum&& dataLen > showNum) {
|
|
|
- dataShort = data.slice(0, showNum)
|
|
|
+ if(showNumCopy&& dataLen > showNumCopy) {
|
|
|
+ dataShort = data.slice(0, showNumCopy)
|
|
|
} else {
|
|
|
dataShort = data
|
|
|
}
|
|
@@ -77,7 +78,7 @@ function renderRecommendInfo(showNum, icon, className,title,data, hasInfo, type,
|
|
|
const infoMsgName = $(this).attr('data-name')
|
|
|
openNewWin(`information.html?type=${type}&position=${position}&name=${infoMsgName}`)
|
|
|
})
|
|
|
- slideToggle("."+className+"box", showNum, dataLen)
|
|
|
+ slideToggle("."+className+"box", showNumCopy, dataLen)
|
|
|
|
|
|
}
|
|
|
|
|
@@ -91,7 +92,7 @@ function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasI
|
|
|
$('.push').append(str)
|
|
|
|
|
|
for(let i = 0; i < data.length; i++) {
|
|
|
- const showNum = data[i].showNum
|
|
|
+ const showNum = data[i].showNum || 5
|
|
|
const dataLen = data[i].data.length
|
|
|
let childrenNodeBoxStr = `<div class="labAndPacsWrapper ${data[i].className+'wrapper'}">
|
|
|
<div class="labAndPacsBox ${data[i].className+'box'} clearfix">
|