|
@@ -1,5 +1,5 @@
|
|
|
const $ = require("jquery");
|
|
|
-const { openNewWin } = require('./promise.js');
|
|
|
+const { openNewWin,imageUrlPrefix } = require('./promise.js');
|
|
|
const { bindTipsEvent } = require('./popupEdit.js');
|
|
|
|
|
|
function renderRecommendInfo(className,title,data, hasInfo, type, position) {
|
|
@@ -43,7 +43,7 @@ function renderMultRecommendInfo(className,title,data, hasInfo, type, position)
|
|
|
<h4><i></i>${title}</h4>
|
|
|
<div class="recommendInfoBox ${className + 'box'}"></div>
|
|
|
</div>`
|
|
|
- $('.recommendWrap').append(str)
|
|
|
+ $('.recommendInfoWrapper').append(str)
|
|
|
for(let i = 0; i < data.length; i++) {
|
|
|
let childrenNodeBoxStr = `<div class="labAndPacsBox ${data[i].className} clearfix"> </div>`
|
|
|
let childrenNodeStr = `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
|
|
@@ -60,6 +60,43 @@ function renderMultRecommendInfo(className,title,data, hasInfo, type, position)
|
|
|
|
|
|
}
|
|
|
|
|
|
+function renderTipsInfo(className,title, data) {
|
|
|
+ const str = `<div class="recommendInfoWrapper ${className}">
|
|
|
+ <h4><i></i>${title}</h4>
|
|
|
+ <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
|
|
|
+ </div>`
|
|
|
+ $('.recommendWrap').append(str)
|
|
|
+ if(data.name) {
|
|
|
+ renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
|
|
|
+ } else {
|
|
|
+ // renderTipsInfoMsg('tipsInfo', data.name, data.details, className+'box')
|
|
|
+ $('.' + className+'box').append('<p class="TipsInfoNull">暂无数据</p>')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function renderTipsInfoMsg(className,title,data, parentNode) {
|
|
|
+ const childrenNodeBoxStr = `
|
|
|
+ <div class = "treatItemBox ${className + 'box'}">
|
|
|
+ <p class="treatItemTitle">${title} <span class="moreInfo" data-name="${title}">详情</span></p>
|
|
|
+ <p class="${className + 'Info'} clearfix"></p>
|
|
|
+ </div>
|
|
|
+ `
|
|
|
+ $('.' + parentNode).append(childrenNodeBoxStr)
|
|
|
+ let dataStr = ``
|
|
|
+ if(data.length === 0) {
|
|
|
+ dataStr += `<p class="TipsInfoNull">暂无数据</p>
|
|
|
+ `
|
|
|
+ } else {
|
|
|
+ for(let i = 0; i < data.length; i++) {
|
|
|
+ dataStr += `<p>${data[i].title}</p>
|
|
|
+ ${data[i].content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}
|
|
|
+ `
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $('.' + className+'Info').html(dataStr)
|
|
|
+}
|
|
|
+
|
|
|
function renderTreat(className,title, data) {
|
|
|
const str = `<div class="recommendInfoWrapper ${className}">
|
|
|
<h4><i></i>${title}${msg.diag?'('+msg.diag+')':''}</h4>
|
|
@@ -292,5 +329,6 @@ module.exports = {
|
|
|
renderRecommendInfo,
|
|
|
renderMultRecommendInfo,
|
|
|
renderTreat,
|
|
|
- renderRecommendConditTips
|
|
|
+ renderRecommendConditTips,
|
|
|
+ renderTipsInfo
|
|
|
}
|