|
@@ -174,7 +174,7 @@ function renderTreat(className,title, data) {
|
|
</div>`
|
|
</div>`
|
|
$('.recommendWrap').append(str)
|
|
$('.recommendWrap').append(str)
|
|
const commonTreatmentInfo = data.commonTreatment&&data.commonTreatment.content || ""
|
|
const commonTreatmentInfo = data.commonTreatment&&data.commonTreatment.content || ""
|
|
- const treatmentList = data.treatment || []
|
|
|
|
|
|
+ const treatmentList = data.treatmentPlan || []
|
|
renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, className+'box')
|
|
renderTreatText('commonTreatment', '一般治疗', commonTreatmentInfo, className+'box')
|
|
renderTreatDrug('drugTreatment', '常用药物治疗', treatmentList, className+'box')
|
|
renderTreatDrug('drugTreatment', '常用药物治疗', treatmentList, className+'box')
|
|
}
|
|
}
|
|
@@ -215,50 +215,61 @@ function renderTreatDrug(className,title,data, parentNode) {
|
|
if(data.length ==0) {
|
|
if(data.length ==0) {
|
|
$('.' + className+'Info').append('<span class="recommendNull">暂无推荐</span>')
|
|
$('.' + className+'Info').append('<span class="recommendNull">暂无推荐</span>')
|
|
}
|
|
}
|
|
- for(let i = 0; i < data.length; i++) {
|
|
|
|
- let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
|
|
|
|
- ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
|
|
|
|
- for (let j = 0; j < data[i].medicitionsList.length; j++) {
|
|
|
|
- childrenNodeStr += `<span class="durgNameBox ${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}"><span class="durgName">${data[i].medicitionsList[j].medicitionName}</span>`
|
|
|
|
- if(data[i].medicitionsList[j].forbidden == '1') {
|
|
|
|
- childrenNodeStr += `<span class="medicineWaring">慎用</span>`
|
|
|
|
- } else if(data[i].medicitionsList[j].forbidden == '2') {
|
|
|
|
- childrenNodeStr += `<span class="medicineWaringDisMsg">禁用</span>`
|
|
|
|
- }
|
|
|
|
- childrenNodeStr += `<span title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>`
|
|
|
|
- if(j !== data[i].medicitionsList.length-1) {
|
|
|
|
- childrenNodeStr += ','
|
|
|
|
|
|
+ for(let i = 0; i < data.length; i++) {
|
|
|
|
+ let childrenNodeStr =`<div class = "drugTreatmentInfoItemBox">
|
|
|
|
+ <p class="diagTitle"><i></i>${data[i].title}</p>`
|
|
|
|
+ for(let j = 0; j < data[i].meditionDetails.length; j++) {
|
|
|
|
+ if(data[i].meditionDetails[j].description) {
|
|
|
|
+ childrenNodeStr += `<p class="diagDescription">${data[i].meditionDetails[j].description}</p>`
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- childrenNodeStr += '</span></span>'
|
|
|
|
- //隐藏使用率
|
|
|
|
- // childrenNodeStr += `<span class="${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}">使用率${data[i].medicitionsList[j].rate}</span>`
|
|
|
|
- // if(j === data[i].medicitionsList.length-1) {
|
|
|
|
- // childrenNodeStr += ';'
|
|
|
|
- // } else {
|
|
|
|
- // childrenNodeStr += ','
|
|
|
|
- // }
|
|
|
|
- }
|
|
|
|
- childrenNodeStr += ` </p>`
|
|
|
|
|
|
+ childrenNodeStr +=`</div>`
|
|
$('.' + className+'Info').append(childrenNodeStr)
|
|
$('.' + className+'Info').append(childrenNodeStr)
|
|
}
|
|
}
|
|
- $('.' + className+'Info'+ ' .infoMsg').on('click', function(){
|
|
|
|
- const infoMsgName = $(this).attr('data-name')
|
|
|
|
- openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
|
|
|
|
- })
|
|
|
|
- var treatList = $(".drugTreatmentInfo").find(".drugTreatmentInfoItemBox")
|
|
|
|
- for(var h = 0;h < treatList.length;h++){
|
|
|
|
- if($(treatList[h]).height() > 25){
|
|
|
|
- $(treatList[h]).addClass('recommendInfoItemBoxLimit').append('<span class="slideDown">更多 <i></i></span>')
|
|
|
|
- }
|
|
|
|
- $(".drugTreatmentInfo").on('click',".slideDown",function(){
|
|
|
|
- $(this).parents(".drugTreatmentInfoItemBox ").removeClass("recommendInfoItemBoxLimit").append('<span class="slideup">收起 <i></i></span>')
|
|
|
|
- $(this).remove()
|
|
|
|
- })
|
|
|
|
- $(".drugTreatmentInfo").on('click',".slideup",function(){
|
|
|
|
- $(this).parents(".drugTreatmentInfoItemBox ").addClass("recommendInfoItemBoxLimit").append('<span class="slideDown">更多 <i></i></span>')
|
|
|
|
- $(this).remove()
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // for(let i = 0; i < data.length; i++) {
|
|
|
|
+ // let childrenNodeStr = `<p class="drugTreatmentInfoItemBox">
|
|
|
|
+ // ${i+1}.${data[i].bigdrugsName}${data[i].subdrugsName&&"("+data[i].subdrugsName+")"}:`
|
|
|
|
+ // for (let j = 0; j < data[i].medicitionsList.length; j++) {
|
|
|
|
+ // childrenNodeStr += `<span class="durgNameBox ${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}"><span class="durgName">${data[i].medicitionsList[j].medicitionName}</span>`
|
|
|
|
+ // if(data[i].medicitionsList[j].forbidden == '1') {
|
|
|
|
+ // childrenNodeStr += `<span class="medicineWaring">慎用</span>`
|
|
|
|
+ // } else if(data[i].medicitionsList[j].forbidden == '2') {
|
|
|
|
+ // childrenNodeStr += `<span class="medicineWaringDisMsg">禁用</span>`
|
|
|
|
+ // }
|
|
|
|
+ // childrenNodeStr += `<span title="点击i图标可查看详细说明" class="infoMsg" data-name=${data[i].medicitionsList[j].medicitionName}></span>`
|
|
|
|
+ // if(j !== data[i].medicitionsList.length-1) {
|
|
|
|
+ // childrenNodeStr += ','
|
|
|
|
+ // }
|
|
|
|
+ // childrenNodeStr += '</span></span>'
|
|
|
|
+ // //隐藏使用率
|
|
|
|
+ // // childrenNodeStr += `<span class="${(data[i].medicitionsList[j].forbidden == '2' ? 'medicineWaringDis' : '' )}">使用率${data[i].medicitionsList[j].rate}</span>`
|
|
|
|
+ // // if(j === data[i].medicitionsList.length-1) {
|
|
|
|
+ // // childrenNodeStr += ';'
|
|
|
|
+ // // } else {
|
|
|
|
+ // // childrenNodeStr += ','
|
|
|
|
+ // // }
|
|
|
|
+ // }
|
|
|
|
+ // childrenNodeStr += ` </p>`
|
|
|
|
+ // $('.' + className+'Info').append(childrenNodeStr)
|
|
|
|
+ // }
|
|
|
|
+ // $('.' + className+'Info'+ ' .infoMsg').on('click', function(){
|
|
|
|
+ // const infoMsgName = $(this).attr('data-name')
|
|
|
|
+ // openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
|
|
|
|
+ // })
|
|
|
|
+ // var treatList = $(".drugTreatmentInfo").find(".drugTreatmentInfoItemBox")
|
|
|
|
+ // for(var h = 0;h < treatList.length;h++){
|
|
|
|
+ // if($(treatList[h]).height() > 25){
|
|
|
|
+ // $(treatList[h]).addClass('recommendInfoItemBoxLimit').append('<span class="slideDown">更多 <i></i></span>')
|
|
|
|
+ // }
|
|
|
|
+ // $(".drugTreatmentInfo").on('click',".slideDown",function(){
|
|
|
|
+ // $(this).parents(".drugTreatmentInfoItemBox ").removeClass("recommendInfoItemBoxLimit").append('<span class="slideup">收起 <i></i></span>')
|
|
|
|
+ // $(this).remove()
|
|
|
|
+ // })
|
|
|
|
+ // $(".drugTreatmentInfo").on('click',".slideup",function(){
|
|
|
|
+ // $(this).parents(".drugTreatmentInfoItemBox ").addClass("recommendInfoItemBoxLimit").append('<span class="slideDown">更多 <i></i></span>')
|
|
|
|
+ // $(this).remove()
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
function renderRecommendConditTips(className,title,data) {
|
|
function renderRecommendConditTips(className,title,data) {
|