|
@@ -389,7 +389,6 @@ function renderPushData() {
|
|
width: "100%"
|
|
width: "100%"
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- console.log(123);
|
|
|
|
rendergeneraTreatPush(generaTreatPush)
|
|
rendergeneraTreatPush(generaTreatPush)
|
|
renderMedicinesPush(medicinesPush, medicinesNum)
|
|
renderMedicinesPush(medicinesPush, medicinesNum)
|
|
renderOperationPush(operationsPush, operationsNum)
|
|
renderOperationPush(operationsPush, operationsNum)
|
|
@@ -423,7 +422,7 @@ function renderpushByMayDisease(name, i, inx) {
|
|
$.toast('toast3', '', 3000, '.maydiagnose', i);
|
|
$.toast('toast3', '', 3000, '.maydiagnose', i);
|
|
$(".maydiagnose .item").css("display", "none")
|
|
$(".maydiagnose .item").css("display", "none")
|
|
} else if (maydiagnoseType) {
|
|
} else if (maydiagnoseType) {
|
|
- $.toast('toast3', '', 3000, '.maydiagnose', i);
|
|
|
|
|
|
+ $.toast('toast4', '', 3000, '.maydiagnose', i);
|
|
$(".maydiagnose .item").css("display", "none")
|
|
$(".maydiagnose .item").css("display", "none")
|
|
} else {
|
|
} else {
|
|
renderMaySymptomPush(symptomPush, inx)
|
|
renderMaySymptomPush(symptomPush, inx)
|
|
@@ -461,7 +460,7 @@ function renderpushByHasDisease(name, i, inx) {
|
|
$.toast('toast3', '', 3000, '.hasdiagnose', i);
|
|
$.toast('toast3', '', 3000, '.hasdiagnose', i);
|
|
$(".hasdiagnose .item").css("display", "none")
|
|
$(".hasdiagnose .item").css("display", "none")
|
|
} else if (hasdiagnoseType) {
|
|
} else if (hasdiagnoseType) {
|
|
- $.toast('toast3', '', 3000, '.hasdiagnose', i);
|
|
|
|
|
|
+ $.toast('toast4', '', 3000, '.hasdiagnose', i);
|
|
$(".hasdiagnose .item").css("display", "none")
|
|
$(".hasdiagnose .item").css("display", "none")
|
|
} else {
|
|
} else {
|
|
renderHasSymptomPush(symptomPush, inx)
|
|
renderHasSymptomPush(symptomPush, inx)
|
|
@@ -501,7 +500,7 @@ function renderDiagList(list, showNum) {
|
|
}
|
|
}
|
|
$('.moduleItem.maydiagnose .moduleItemTitBox').append(titleStr("maydiagnosePush"))
|
|
$('.moduleItem.maydiagnose .moduleItemTitBox').append(titleStr("maydiagnosePush"))
|
|
let str = ``
|
|
let str = ``
|
|
- let { shortStr, longStr } = renderItemWrapper(list, 10)
|
|
|
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, 10, '', 1)
|
|
let boxStr = `<div class="moduleBox">
|
|
let boxStr = `<div class="moduleBox">
|
|
${str}
|
|
${str}
|
|
${shortStr}
|
|
${shortStr}
|
|
@@ -540,7 +539,7 @@ function renderAffListList(list, showNum) {
|
|
}
|
|
}
|
|
$('.moduleItem.hasdiagnose .moduleItemTitBox').append(titleStr("hasdiagnosePush"))
|
|
$('.moduleItem.hasdiagnose .moduleItemTitBox').append(titleStr("hasdiagnosePush"))
|
|
let str = ``
|
|
let str = ``
|
|
- let { shortStr, longStr } = renderItemWrapper(list, 10)
|
|
|
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, 10, '', 1)
|
|
let boxStr = `<div class="moduleBox">
|
|
let boxStr = `<div class="moduleBox">
|
|
${str}
|
|
${str}
|
|
${shortStr}
|
|
${shortStr}
|
|
@@ -792,24 +791,40 @@ function renderHasDisPush(list, inx) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
|
|
function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
|
|
|
|
+ let generalstate, medicinestate, operationstate, nursestate, medicinenum, operationnum, nursenum
|
|
|
|
+ for (let i = 0; i < maydiagnoseList.length; i++) {
|
|
|
|
+ const item = maydiagnoseList[i];
|
|
|
|
+ if (item.code == 'maygeneral') {
|
|
|
|
+ generalstate = item.status
|
|
|
|
+ } else if (item.code == 'maymedicine') {
|
|
|
|
+ medicinestate = item.status
|
|
|
|
+ medicinenum = item.number
|
|
|
|
+ } else if (item.code == 'mayoperation') {
|
|
|
|
+ operationstate = item.status
|
|
|
|
+ operationnum = item.number
|
|
|
|
+ } else if (item.code == 'maynurse') {
|
|
|
|
+ nursestate = item.status
|
|
|
|
+ nursenum = item.number
|
|
|
|
+ }
|
|
|
|
+ }
|
|
$(".maydiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
|
|
$(".maydiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
|
|
let str = `<ul>
|
|
let str = `<ul>
|
|
- ${treatPush.length > 0 ? `<li class="general">一般治疗</li>` : ''}
|
|
|
|
- ${medicinesPush.length > 0 ? `<li class="medicine">推荐用药</li>` : ''}
|
|
|
|
- ${operationsPush.length > 0 ? `<li class="operation">推荐手术/操作</li>` : ''}
|
|
|
|
- ${nursePush.length > 0 ? `<li class="nurse">推荐护理</li>` : ''}
|
|
|
|
|
|
+ ${treatPush.length > 0 && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
|
|
|
|
+ ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
|
|
|
|
+ ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
|
|
|
|
+ ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
|
|
</ul>
|
|
</ul>
|
|
<div class="centerBoxItem">
|
|
<div class="centerBoxItem">
|
|
- ${treatPush.length > 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
|
|
|
|
- ${medicinesPush.length > 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
|
|
|
|
- ${operationsPush.length > 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
|
|
|
|
- ${nursePush.length > 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
|
|
|
|
|
|
+ ${treatPush.length > 0 && generalstate != 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
|
|
|
|
+ ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
|
|
|
|
+ ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
|
|
|
|
+ ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
|
|
</div>`
|
|
</div>`
|
|
$(".maydiagnose .item[data-index=" + inx + "] .centerBox").append(str)
|
|
$(".maydiagnose .item[data-index=" + inx + "] .centerBox").append(str)
|
|
renderMayTreatPush(treatPush, inx)
|
|
renderMayTreatPush(treatPush, inx)
|
|
- renderMayMedicinesPush(medicinesPush, inx)
|
|
|
|
- renderMayOperationsPush(operationsPush, inx)
|
|
|
|
- renderMayNursePush(nursePush, inx)
|
|
|
|
|
|
+ renderMayMedicinesPush(medicinesPush, inx, medicinenum)
|
|
|
|
+ renderMayOperationsPush(operationsPush, inx, operationnum)
|
|
|
|
+ renderMayNursePush(nursePush, inx, nursenum)
|
|
$(".maydiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
|
|
$(".maydiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
|
|
var i = $(this).index();
|
|
var i = $(this).index();
|
|
if ($(this).hasClass('actives')) {
|
|
if ($(this).hasClass('actives')) {
|
|
@@ -823,26 +838,42 @@ function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
|
|
function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
|
|
|
|
+ let generalstate, medicinestate, operationstate, nursestate, medicinenum, operationnum, nursenum
|
|
|
|
+ for (let i = 0; i < maydiagnoseList.length; i++) {
|
|
|
|
+ const item = maydiagnoseList[i];
|
|
|
|
+ if (item.code == 'maygeneral') {
|
|
|
|
+ generalstate = item.status
|
|
|
|
+ } else if (item.code == 'maymedicine') {
|
|
|
|
+ medicinestate = item.status
|
|
|
|
+ medicinenum = item.number
|
|
|
|
+ } else if (item.code == 'mayoperation') {
|
|
|
|
+ operationstate = item.status
|
|
|
|
+ operationnum = item.number
|
|
|
|
+ } else if (item.code == 'maynurse') {
|
|
|
|
+ nursestate = item.status
|
|
|
|
+ nursenum = item.number
|
|
|
|
+ }
|
|
|
|
+ }
|
|
$(".hasdiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
|
|
$(".hasdiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
|
|
let str = `<ul>
|
|
let str = `<ul>
|
|
- ${treatPush.length > 0 ? `<li class="general">一般治疗</li>` : ''}
|
|
|
|
- ${medicinesPush.length > 0 ? `<li class="medicine">推荐用药</li>` : ''}
|
|
|
|
- ${operationsPush.length > 0 ? `<li class="operation">推荐手术/操作</li>` : ''}
|
|
|
|
- ${nursePush.length > 0 ? `<li class="nurse">推荐护理</li>` : ''}
|
|
|
|
|
|
+ ${treatPush.length > 0 && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
|
|
|
|
+ ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
|
|
|
|
+ ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
|
|
|
|
+ ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
|
|
</ul>
|
|
</ul>
|
|
<div class="centerBoxItem">
|
|
<div class="centerBoxItem">
|
|
- ${treatPush.length > 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
|
|
|
|
- ${medicinesPush.length > 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
|
|
|
|
- ${operationsPush.length > 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
|
|
|
|
- ${nursePush.length > 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
|
|
|
|
|
|
+ ${treatPush.length > 0 && generalstate != 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
|
|
|
|
+ ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
|
|
|
|
+ ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
|
|
|
|
+ ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
|
|
</div>`
|
|
</div>`
|
|
$(".hasdiagnose .item[data-index=" + inx + "] .centerBox").append(str)
|
|
$(".hasdiagnose .item[data-index=" + inx + "] .centerBox").append(str)
|
|
renderHasTreatPush(treatPush, inx)
|
|
renderHasTreatPush(treatPush, inx)
|
|
- renderHasMedicinesPush(medicinesPush, inx)
|
|
|
|
- renderHasOperationsPush(operationsPush, inx)
|
|
|
|
- renderHasNursePush(nursePush, inx)
|
|
|
|
|
|
+ renderHasMedicinesPush(medicinesPush, inx, medicinenum)
|
|
|
|
+ renderHasOperationsPush(operationsPush, inx, operationnum)
|
|
|
|
+ renderHasNursePush(nursePush, inx, nursenum)
|
|
$(".hasdiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
|
|
$(".hasdiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
|
|
- var i = $(this).index();
|
|
|
|
|
|
+ var i = $(this).attr('data-index');
|
|
if ($(this).hasClass('actives')) {
|
|
if ($(this).hasClass('actives')) {
|
|
$(this).removeClass('actives');
|
|
$(this).removeClass('actives');
|
|
$(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
|
|
$(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
|
|
@@ -867,7 +898,7 @@ function renderMayTreatPush(list, inx) {
|
|
let str = ''
|
|
let str = ''
|
|
for (let i = 0; i < list.length; i++) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
const item = list[i];
|
|
const item = list[i];
|
|
- str = `${item.generaTreat}`
|
|
|
|
|
|
+ str = `${item.generaTreat || ''}`
|
|
}
|
|
}
|
|
$(".moduleItem .item[data-index=" + inx + "] .maygeneral").append(str)
|
|
$(".moduleItem .item[data-index=" + inx + "] .maygeneral").append(str)
|
|
}
|
|
}
|
|
@@ -885,21 +916,13 @@ function renderHasTreatPush(list, inx) {
|
|
if (list.length > 0 && state != 0) {
|
|
if (list.length > 0 && state != 0) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
const item = list[i];
|
|
const item = list[i];
|
|
- str = `${item.generaTreat}`
|
|
|
|
|
|
+ str = `${item.generaTreat || ''}`
|
|
}
|
|
}
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasgeneral").append(str)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasgeneral").append(str)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-function renderMayMedicinesPush(list, inx) {
|
|
|
|
- let num, state
|
|
|
|
- for (let i = 0; i < maydiagnoseList.length; i++) {
|
|
|
|
- const item = maydiagnoseList[i];
|
|
|
|
- if (item.code == 'maymedicine') {
|
|
|
|
- num = item.number
|
|
|
|
- state = item.status
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (list.length > 0 && state != 0) {
|
|
|
|
|
|
+function renderMayMedicinesPush(list, inx, num) {
|
|
|
|
+ if (list.length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
console.log($(".moduleItem .item[data-index=" + inx + "] .maymedicine"));
|
|
console.log($(".moduleItem .item[data-index=" + inx + "] .maymedicine"));
|
|
@@ -907,48 +930,24 @@ function renderMayMedicinesPush(list, inx) {
|
|
$(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
$(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-function renderHasMedicinesPush(list, inx) {
|
|
|
|
- let num, state
|
|
|
|
- for (let i = 0; i < hasdiagnoseList.length; i++) {
|
|
|
|
- const item = hasdiagnoseList[i];
|
|
|
|
- if (item.code == 'hasmedicine') {
|
|
|
|
- num = item.number
|
|
|
|
- state = item.status
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (list.length > 0 && state != 0) {
|
|
|
|
|
|
+function renderHasMedicinesPush(list, inx, num) {
|
|
|
|
+ if (list.length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-function renderMayOperationsPush(list, inx) {
|
|
|
|
- let num, state
|
|
|
|
- for (let i = 0; i < maydiagnoseList.length; i++) {
|
|
|
|
- const item = maydiagnoseList[i];
|
|
|
|
- if (item.code == 'mayoperation') {
|
|
|
|
- num = item.number
|
|
|
|
- state = item.status
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (list.length > 0 && state != 0) {
|
|
|
|
|
|
+function renderMayOperationsPush(list, inx, num) {
|
|
|
|
+ if (list.length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
$(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
|
|
$(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-function renderHasOperationsPush(list, inx) {
|
|
|
|
- let num, state
|
|
|
|
- for (let i = 0; i < hasdiagnoseList.length; i++) {
|
|
|
|
- const item = hasdiagnoseList[i];
|
|
|
|
- if (item.code == 'hasoperation') {
|
|
|
|
- num = item.number
|
|
|
|
- state = item.status
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (list.length > 0 && state != 0) {
|
|
|
|
|
|
+function renderHasOperationsPush(list, inx, num) {
|
|
|
|
+ if (list.length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(shortStr)
|
|
@@ -956,32 +955,16 @@ function renderHasOperationsPush(list, inx) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-function renderMayNursePush(list, inx) {
|
|
|
|
- let num, state
|
|
|
|
- for (let i = 0; i < maydiagnoseList.length; i++) {
|
|
|
|
- const item = maydiagnoseList[i];
|
|
|
|
- if (item.code == 'maynurse') {
|
|
|
|
- num = item.number
|
|
|
|
- state = item.status
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (list.length > 0 && state != 0) {
|
|
|
|
|
|
+function renderMayNursePush(list, inx, num) {
|
|
|
|
+ if (list.length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
$(".moduleItem .item[data-index=" + inx + "] .maynurse").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .maynurse").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .maynurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
|
|
$(".moduleItem .item[data-index=" + inx + "] .maynurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-function renderHasNursePush(list, inx) {
|
|
|
|
- let num, state
|
|
|
|
- for (let i = 0; i < hasdiagnoseList.length; i++) {
|
|
|
|
- const item = hasdiagnoseList[i];
|
|
|
|
- if (item.code == 'hasnurse') {
|
|
|
|
- num = item.number
|
|
|
|
- state = item.status
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (list.length > 0 && state != 0) {
|
|
|
|
|
|
+function renderHasNursePush(list, inx, num) {
|
|
|
|
+ if (list.length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
let { shortStr, longStr } = renderItemWrapper(list, num)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(shortStr)
|
|
$(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(shortStr)
|
|
@@ -1044,18 +1027,18 @@ function renderSymptomPush(list, showNum) {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
-// function renderMedicinesPush(list, showNum) {
|
|
|
|
|
|
+function renderMedicinesPush(list, showNum) {
|
|
|
|
|
|
-// if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
|
|
|
|
-// moduleNum++
|
|
|
|
-// $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
|
|
|
|
-// let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
|
-// $(".moduleItem.medicine").append(shortStr)
|
|
|
|
-// $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
|
|
-// $(".moduleItem.medicine").css("display", "block")
|
|
|
|
-// }
|
|
|
|
|
|
+ if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
|
|
|
|
+ moduleNum++
|
|
|
|
+ $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
|
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
|
+ $(".moduleItem.medicine").append(shortStr)
|
|
|
|
+ $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
|
|
+ $(".moduleItem.medicine").css("display", "block")
|
|
|
|
+ }
|
|
|
|
|
|
-// }
|
|
|
|
|
|
+}
|
|
function renderOperationPush(list, showNum) {
|
|
function renderOperationPush(list, showNum) {
|
|
if (list.length > 0 && $(".moduleItem.operation").length > 0) {
|
|
if (list.length > 0 && $(".moduleItem.operation").length > 0) {
|
|
moduleNum++
|
|
moduleNum++
|
|
@@ -1225,15 +1208,14 @@ function renderLongStr(name, longStr, location) {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-function renderItemWrapper(list, showNum, name) {
|
|
|
|
- console.log(name);
|
|
|
|
|
|
+function renderItemWrapper(list, showNum, name, type) {
|
|
let showNum1 = showNum || 5
|
|
let showNum1 = showNum || 5
|
|
let shortStr = '', longStr = ''
|
|
let shortStr = '', longStr = ''
|
|
for (let i = 0; i < list.length; i++) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
if (i <= showNum1 - 1) {
|
|
if (i <= showNum1 - 1) {
|
|
- shortStr += renderPushItem(list[i], i)
|
|
|
|
|
|
+ shortStr += type == 1 || type == 2 ? renderPushItem2(list[i], i) : renderPushItem(list[i], i)
|
|
}
|
|
}
|
|
- longStr += renderPushItem(list[i], i)
|
|
|
|
|
|
+ longStr += type || type == 2 ? renderPushItem2(list[i], i) : renderPushItem(list[i], i)
|
|
}
|
|
}
|
|
|
|
|
|
if (showNum1 >= list.length) {
|
|
if (showNum1 >= list.length) {
|
|
@@ -1257,6 +1239,13 @@ function renderPushItem(item, i) {
|
|
str += '</span >'
|
|
str += '</span >'
|
|
return str
|
|
return str
|
|
}
|
|
}
|
|
|
|
+function renderPushItem2(item, i) {
|
|
|
|
+ str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}" data-index="${i}">`
|
|
|
|
+ str += `${item.hasScale == "0" ? `<span class="pushItemName" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
|
|
|
|
+ str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
|
|
|
|
+ str += '</span >'
|
|
|
|
+ return str
|
|
|
|
+}
|
|
function bindOpenInfo() {
|
|
function bindOpenInfo() {
|
|
$(".infoImg").on("mouseenter", function () {
|
|
$(".infoImg").on("mouseenter", function () {
|
|
$(this).attr("src", infoImgOn)
|
|
$(this).attr("src", infoImgOn)
|