|
@@ -84,16 +84,21 @@ function renderRecommendInfo(showNum, icon, className,title,data, hasInfo, type,
|
|
|
|
|
|
//化验和辅检等多种类型
|
|
//化验和辅检等多种类型
|
|
function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasInfo, type, position) {
|
|
function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasInfo, type, position) {
|
|
- console.log(labsAndPacMode)
|
|
|
|
const str = `<div class="recommendInfoWrapper ${className} clearfix">
|
|
const str = `<div class="recommendInfoWrapper ${className} clearfix">
|
|
<h4 class ="${+labsAndPacMode === 1 ? 'showTopTitle':'showRightTitle'}"><img src=${icon} title="${title}" class="icon">${title}:</h4>
|
|
<h4 class ="${+labsAndPacMode === 1 ? 'showTopTitle':'showRightTitle'}"><img src=${icon} title="${title}" class="icon">${title}:</h4>
|
|
<div class="recommendInfoBox ${className + 'box'} ${+labsAndPacMode === 1 ? 'showTopInfo':'showRightInfo'}"></div>
|
|
<div class="recommendInfoBox ${className + 'box'} ${+labsAndPacMode === 1 ? 'showTopInfo':'showRightInfo'}"></div>
|
|
</div>`
|
|
</div>`
|
|
$('.push').append(str)
|
|
$('.push').append(str)
|
|
-
|
|
|
|
|
|
+ let hanContentNum = 0
|
|
for(let i = 0; i < data.length; i++) {
|
|
for(let i = 0; i < data.length; i++) {
|
|
|
|
+ if(data[i].data === 0) {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
const showNum = data[i].showNum || 5
|
|
const showNum = data[i].showNum || 5
|
|
const dataLen = data[i].data.length
|
|
const dataLen = data[i].data.length
|
|
|
|
+ if(dataLen === 0) {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
let childrenNodeBoxStr = `<div class="labAndPacsWrapper ${data[i].className+'wrapper'}">
|
|
let childrenNodeBoxStr = `<div class="labAndPacsWrapper ${data[i].className+'wrapper'}">
|
|
<div class="labAndPacsBox ${data[i].className+'box'} clearfix">
|
|
<div class="labAndPacsBox ${data[i].className+'box'} clearfix">
|
|
</div>
|
|
</div>
|
|
@@ -134,14 +139,14 @@ function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasI
|
|
function renderTreat(icon, className,title, data) {
|
|
function renderTreat(icon, className,title, data) {
|
|
$('.infoTabBox').append(`<span class="infoTab treatTab boldFont" data-box="${className}">${title}</span>`)
|
|
$('.infoTabBox').append(`<span class="infoTab treatTab boldFont" data-box="${className}">${title}</span>`)
|
|
const str = `<div class="informationBox recommendInfoWrapper ${className} clearfix">
|
|
const str = `<div class="informationBox recommendInfoWrapper ${className} clearfix">
|
|
- <span class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</span>
|
|
|
|
|
|
+ <p class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</p>
|
|
<div class="recommendInfoBox clearfix ${className + 'box'}"></div>
|
|
<div class="recommendInfoBox clearfix ${className + 'box'}"></div>
|
|
</div>`
|
|
</div>`
|
|
$('.infomationBox').append(str)
|
|
$('.infomationBox').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')
|
|
}
|
|
}
|
|
function renderKnowledgeInfo(icon, className,title, data) {
|
|
function renderKnowledgeInfo(icon, className,title, data) {
|
|
$('.infoTabBox').append(`<span class="infoTab tipsTab boldFont" data-box="${className}">${title}</span>`)
|
|
$('.infoTabBox').append(`<span class="infoTab tipsTab boldFont" data-box="${className}">${title}</span>`)
|
|
@@ -190,7 +195,7 @@ function renderTreatText(className,title,data, parentNode) {
|
|
function renderTreatDrug(className,title,data, parentNode) {
|
|
function renderTreatDrug(className,title,data, parentNode) {
|
|
const childrenNodeBoxStr = `
|
|
const childrenNodeBoxStr = `
|
|
<div class = "treatItemBox ${className + 'box'}">
|
|
<div class = "treatItemBox ${className + 'box'}">
|
|
- <p class="treatItemTitle">${title}:</p>
|
|
|
|
|
|
+ <p class="treatItemTitle">${title}: ${data.length ==0 ? '':'<span class="more">更多</span>'}</p>
|
|
<div class="treatDrugBox">
|
|
<div class="treatDrugBox">
|
|
<p class="${className + 'Info'}"></p>
|
|
<p class="${className + 'Info'}"></p>
|
|
</div>
|
|
</div>
|
|
@@ -200,42 +205,54 @@ 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' : '' )}">${data[i].medicitionsList[j].medicitionName}`
|
|
|
|
- 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 += ','
|
|
|
|
|
|
+ for(let i = 0; i < data.length; i++) {
|
|
|
|
+ let childrenNodeStr =`<div class = "drugTreatmentInfoItemBox">
|
|
|
|
+ <p class="diagTitle ellipsis"><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="diaDescription">${data[i].meditionDetails[j].description}</p>`
|
|
|
|
+ // }
|
|
// }
|
|
// }
|
|
- }
|
|
|
|
- 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}`)
|
|
|
|
- })
|
|
|
|
|
|
+ // 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' : '' )}">${data[i].medicitionsList[j].medicitionName}`
|
|
|
|
+ // 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 drugTreatmentHeight = $(".drugTreatmentInfo").height()
|
|
|
|
- if(drugTreatmentHeight > 75){
|
|
|
|
- $(".treatDrugBox").append('<span class="more">更多</span>')
|
|
|
|
- } else if(drugTreatmentHeight > 30) {
|
|
|
|
- $(".drugTreatmentInfo").append('<span class="more">更多</span>')
|
|
|
|
- }
|
|
|
|
|
|
+ // var drugTreatmentHeight = $(".drugTreatmentInfo").height()
|
|
|
|
+ // if(drugTreatmentHeight > 75){
|
|
|
|
+ // $(".treatDrugBox").append('<span class="more">更多</span>')
|
|
|
|
+ // } else if(drugTreatmentHeight > 30) {
|
|
|
|
+ // $(".drugTreatmentInfo").append('<span class="more">更多</span>')
|
|
|
|
+ // }
|
|
$(".infomationBox .drugTreatmentbox").on('click',".more",function(){
|
|
$(".infomationBox .drugTreatmentbox").on('click',".more",function(){
|
|
openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
|
|
openNewWin(`treatplan.html?msg=${encodeURIComponent(JSON.stringify(msg))}`)
|
|
// openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diseaseName=${msg.diseaseName}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
|
|
// openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diseaseName=${msg.diseaseName}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
|
|
@@ -357,7 +374,7 @@ function renderRecommendConditTips(icon, className,title,data) {
|
|
for(var m = 0;m < tmpBq.details.length;m++){
|
|
for(var m = 0;m < tmpBq.details.length;m++){
|
|
var tmpBqDetail = tmpBq.details[m]
|
|
var tmpBqDetail = tmpBq.details[m]
|
|
if(tmpBqDetail.type == 1){
|
|
if(tmpBqDetail.type == 1){
|
|
- tmpBqDetailStr+=`<span data-url=scale.html?featureType=21&sex=${msg.sex}&lis=${JSON.stringify(msg.lis)}&diag=${msg.diag}&diseaseName=${msg.diseaseName}&scaleName=${tmpBqDetail.content.name}&symptom=${msg.symptom}&other=${msg.other}&pacs=${msg.pacs}&vital=${msg.vital}&age=${msg.age}&scaleId=${tmpBqDetail.content.id} class="illnessTable">【${tmpBqDetail.content.name}】</span>`
|
|
|
|
|
|
+ tmpBqDetailStr+=`<span data-scaleName=${tmpBqDetail.content.name} class="illnessTable">【${tmpBqDetail.content.name}】</span>`
|
|
}
|
|
}
|
|
if(tmpBqDetail.type == 4){
|
|
if(tmpBqDetail.type == 4){
|
|
// tmpBqDetailStr+=`<span class="sriticalinfo"> ${tmpBqDetail.content.name}(诊断要点)</span>`
|
|
// tmpBqDetailStr+=`<span class="sriticalinfo"> ${tmpBqDetail.content.name}(诊断要点)</span>`
|
|
@@ -374,8 +391,10 @@ function renderRecommendConditTips(icon, className,title,data) {
|
|
openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
|
|
openNewWin(`information.html?type=22&position=2&name=${infoMsgName}`)
|
|
})
|
|
})
|
|
$('.alertModal .illnessTable').on('click', function(){
|
|
$('.alertModal .illnessTable').on('click', function(){
|
|
- const infoMsgUrl = $(this).attr('data-url')
|
|
|
|
- openNewWin(infoMsgUrl)
|
|
|
|
|
|
+ const msg1 = JSON.parse(JSON.stringify(msg))
|
|
|
|
+ msg1.scaleName = $(this).attr('data-scaleName')
|
|
|
|
+ msg1.featureType = 21
|
|
|
|
+ openNewWin(`scale.html?msg=${encodeURIComponent(JSON.stringify(msg1))}`)
|
|
})
|
|
})
|
|
$(".conditTipsbox").on('click',".more",function(){
|
|
$(".conditTipsbox").on('click',".more",function(){
|
|
// openNewWin(`illness.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${JSON.stringify(msg.lis)}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&diseaseName=${msg.diseaseName}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}&msg=${JSON.stringify(msg)}`)
|
|
// openNewWin(`illness.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${JSON.stringify(msg.lis)}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&diseaseName=${msg.diseaseName}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}&msg=${JSON.stringify(msg)}`)
|