|
@@ -18,6 +18,7 @@ function renderPage(data){
|
|
|
const operaItemName = operaItem.item || {}
|
|
|
const operaItemDetail = operaItem.pushPlanDetails || []
|
|
|
renderName(operaItemName)
|
|
|
+
|
|
|
renderBtn(operaItemDetail)
|
|
|
renderDetail(operaItemDetail)
|
|
|
|
|
@@ -25,18 +26,50 @@ function renderPage(data){
|
|
|
function renderName(data){
|
|
|
const operationTime = data.dateValue&&getTime(data.dateValue)
|
|
|
const operationName = data.name || ""
|
|
|
- const str = `<div class="operaNameWrap"><div class="operaNameBox">患者于${operationTime}进行${operationName}。根据临床路径要求,特制订检验检查计划如下。</div></div>`
|
|
|
+ const str = `<div class="operaNameWrap"><div class="operaNameBox">患者于<span class="operaNameBold">${operationTime}</span>进行<span class="operaNameBold">${operationName}</span>。根据临床路径要求,特制订检验检查计划如下。</div></div>`
|
|
|
$(".followUpWrap").append(str)
|
|
|
}
|
|
|
function renderDetail(data){
|
|
|
- const hasBtn = data[0]&&data[0].history&&data[0].history !== 0
|
|
|
+ let str = ``
|
|
|
+ for(let i = 0; i < data.length; i++){
|
|
|
+ const item = data[i]
|
|
|
+ const lisArr = item.lis || []
|
|
|
+ const pacsArr = item.pacs || []
|
|
|
+ let lisStr=``
|
|
|
+ let pacsStr=``
|
|
|
+ let title = `<p>${getTime(item.examineDate)}${item.description&&(item.description)}</p>`
|
|
|
+ for(let i = 0; i < lisArr.length; i++){
|
|
|
+ lisStr += `<div><span class="circle"></span>${lisArr[i]}</div>`
|
|
|
+ }
|
|
|
+ for(let i = 0; i < pacsArr.length; i++){
|
|
|
+ pacsStr += `<div><span class="circle"></span>${pacsArr[i]}</div>`
|
|
|
+ }
|
|
|
+ str += `<div class="infoBox">
|
|
|
+ ${title}
|
|
|
+ <div class="lisBox">${lisStr}</div>
|
|
|
+ <div class="pacsBox">${pacsStr}</div>
|
|
|
+ </div>`
|
|
|
+ }
|
|
|
+ $(".followUpWrap").append(`<div class="infoWrap">${str}</div>`)
|
|
|
+ setTimeout(function(){
|
|
|
+ adjustHeight()
|
|
|
+ },4000)
|
|
|
+}
|
|
|
+function renderBtn(data){
|
|
|
+ const hasBtn = data[0]&&data[0].history&&data[0].history === 0
|
|
|
if(!hasBtn){
|
|
|
return
|
|
|
}
|
|
|
- const str = `<div class="btnBox"><span></span></div>`
|
|
|
+ const str = `<div class="btnBox"><span class="btnName">显示历史计划</span></div>`
|
|
|
+ $(".followUpWrap").append(str)
|
|
|
+
|
|
|
}
|
|
|
-function renderBtn(data){
|
|
|
-
|
|
|
+function adjustHeight() {
|
|
|
+ var containerHt = $(".contentWrapper").height()
|
|
|
+ var ht1 = $(".operaNameWrap").height()
|
|
|
+ var ht2 = $(".btnBox").height()
|
|
|
+ $(".followUpWrap .infoWrap").height(containerHt -ht1- ht2 + "px");
|
|
|
+ $(".infoWrap").preventScroll();
|
|
|
}
|
|
|
function getTime(date){
|
|
|
if(!date){
|
|
@@ -47,6 +80,10 @@ function getTime(date){
|
|
|
const day = new Date(date).getDate()
|
|
|
return `${year}年${month}月${day}日`
|
|
|
}
|
|
|
+$(window).on('resize', function(){
|
|
|
+ adjustHeight()
|
|
|
+})
|
|
|
+
|
|
|
module.exports ={
|
|
|
renderFollowUp
|
|
|
}
|