|
@@ -176,7 +176,7 @@ function renderTreat(className,title, data) {
|
|
|
const commonTreatmentInfo = data.commonTreatment&&data.commonTreatment.content || ""
|
|
|
const treatmentList = data.treatmentPlan || []
|
|
|
renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, className+'box')
|
|
|
- renderTreatDrug('drugTreatment', '常用药物治疗', treatmentList, className+'box')
|
|
|
+ renderTreatDrug('drugTreatment', '推荐药物', treatmentList, className+'box')
|
|
|
}
|
|
|
|
|
|
function renderTreatText(className,title,data, parentNode) {
|
|
@@ -196,18 +196,13 @@ function renderTreatText(className,title,data, parentNode) {
|
|
|
$(".commonTreatmentInfo").addClass('commonTreatmentInfoLimit').append('<span class="slideDown">更多 <i></i></span>')
|
|
|
}
|
|
|
$(".treatItemBox").on('click',".slideDown",function(){
|
|
|
- $(this).parents(".commonTreatmentInfo").removeClass("commonTreatmentInfoLimit").append('<span class="slideup">收起 <i></i></span>')
|
|
|
- $(this).remove()
|
|
|
- })
|
|
|
- $(".treatItemBox").on('click',".slideup",function(){
|
|
|
- $(this).parents(".commonTreatmentInfo").addClass("commonTreatmentInfoLimit").append('<span class="slideDown">更多 <i></i></span>')
|
|
|
- $(this).remove()
|
|
|
+ openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
|
|
|
})
|
|
|
}
|
|
|
function renderTreatDrug(className,title,data, parentNode) {
|
|
|
const childrenNodeBoxStr = `
|
|
|
<div class = "treatItemBox ${className + 'box'}">
|
|
|
- <p class="treatItemTitle">${title}</p>
|
|
|
+ <p class="treatItemTitle">${title} ${data.length ==0 ?'':'<span class="slideDown">更多 <i></i></span>'}</p>
|
|
|
<p class="${className + 'Info'}"></p>
|
|
|
</div>
|
|
|
`
|
|
@@ -226,6 +221,9 @@ function renderTreatDrug(className,title,data, parentNode) {
|
|
|
childrenNodeStr +=`</div>`
|
|
|
$('.' + className+'Info').append(childrenNodeStr)
|
|
|
}
|
|
|
+ $(".treatItemTitle").on('click',".slideDown",function(){
|
|
|
+ openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
|
|
|
+ })
|
|
|
// for(let i = 0; i < data.length; i++) {
|
|
|
// let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
|
|
|
// ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
|