|
@@ -212,7 +212,7 @@ function moreInfo() {
|
|
|
const type = $(this).parents(".pushItemBox").attr('data-type')
|
|
|
openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&mrId=${encodeURIComponent(mrId)}`)
|
|
|
})
|
|
|
- $('.evaluationtitle .item-name').off("click").click(function () {
|
|
|
+ $('.evaluationtitle').off("click").click(function () {
|
|
|
const name = $(this).parents(".pushItemBox").attr('data-name')
|
|
|
const type = $(this).parents(".pushItemBox").attr('data-type')
|
|
|
openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&mrId=${encodeURIComponent(mrId)}&gauge=gauge`)
|
|
@@ -619,14 +619,14 @@ function renderMedicinesPush(obj, showNum) {
|
|
|
let mshortStr1 = "";
|
|
|
let mlongStr1 = "";
|
|
|
let keys = Object.keys(obj);
|
|
|
- let cateNames = Array.from(keys);
|
|
|
+ let cateNames = Array.from(keys);
|
|
|
if (cateNames.length > 0 && $(".moduleItem.medicine").length > 0) {
|
|
|
moduleNum++;
|
|
|
for (let i = 0; i < cateNames.length; i++) {
|
|
|
let drugs = obj[cateNames[i]];
|
|
|
let { shortStr, longStr } = renderItemWrapper(drugs, showNum);
|
|
|
console.log("long", shortStr);
|
|
|
-
|
|
|
+
|
|
|
if (i < showNum1) {
|
|
|
mshortStr1 += ` ${i + 1}.${cateNames[i]}<br>`;
|
|
|
mshortStr1 += shortStr;
|
|
@@ -634,15 +634,15 @@ function renderMedicinesPush(obj, showNum) {
|
|
|
// // 添加药品分类和短内容
|
|
|
// mshortStr1 += ` ${i + 1}.${cateNames[i]}<br>`;
|
|
|
// mshortStr1 += shortStr;
|
|
|
-
|
|
|
+
|
|
|
// 添加药品分类和长内容
|
|
|
mlongStr1 += ` ${i + 1}.${cateNames[i]}<br>`;
|
|
|
|
|
|
mlongStr1 += longStr;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
// 判断显示逻辑
|
|
|
- if (showNum1 >cateNames.length) {
|
|
|
+ if (showNum1 > cateNames.length) {
|
|
|
$(".moduleItem.medicine").append(`<div class="shortBox">${mshortStr1}</div>`);
|
|
|
} else {
|
|
|
mshortStr1 += `<span class="showMore"><img class="iconArrowImg" src="${iconArrowDown}"></span>`;
|
|
@@ -650,7 +650,7 @@ function renderMedicinesPush(obj, showNum) {
|
|
|
$(".moduleItem.medicine").append(`<div class="shortBox">${mshortStr1}</div>`);
|
|
|
$(".moduleItem.medicine").append(`<div class="longBox">${mlongStr1}</div>`);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$(".moduleItem.medicine").css("display", "block");
|
|
|
}
|
|
|
}
|
|
@@ -682,7 +682,7 @@ function renderCasesPush(list, showNum) {
|
|
|
console.log($(".moduleItem.classiccase").length);
|
|
|
if (list.length > 0 && $(".moduleItem.classiccase").length > 0) {
|
|
|
moduleNum++
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum, "经典病例")
|
|
|
$(".moduleItem.classiccase").append(shortStr).append(longStr)
|
|
|
$(".moduleItem.classiccase").css("display", "block")
|
|
|
}
|
|
@@ -746,7 +746,13 @@ function renderPushItem(item, name, index, totalItems) {
|
|
|
}
|
|
|
}
|
|
|
str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
|
|
|
- str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
|
|
|
+
|
|
|
+ if (name === "经典病例") {
|
|
|
+ str += `<span class="pushItemName ${item.hasInfo == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
|
|
|
+ } else {
|
|
|
+ str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
|
|
|
+ }
|
|
|
+
|
|
|
str += `</span>`;
|
|
|
// $(".pushItemBox").css("display", "flex")
|
|
|
return str;
|