|
@@ -212,7 +212,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str = '<div class="scalebot">'
|
|
|
str += '<button class="but">结果</button><p class="score"></p>'
|
|
|
str += '</div>'
|
|
|
- str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><p id="result_title" class="result_title"></p></div><textarea id="inputs"></textarea></div></div>`
|
|
|
+ str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><p id="result_title" class="result_title"></p></div><textarea id="inputs"></textarea><p id="result_title_tip" class="result_title_tip">该量表需要入院当天评估一次,出院当天评估一次,每七天要评估一次</p></div></div>`
|
|
|
str += `<div class="foot"><div class="foot_box"><div class="printing"><img src="./../images/printing.png" class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
|
|
|
$(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
function addScrollEvent() {
|
|
@@ -238,16 +238,21 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
function getprinting() {
|
|
|
$('.printing').click(function () {
|
|
|
- $('.foot').hide()
|
|
|
- $('.scalebot').hide()
|
|
|
- $('#Print').css({
|
|
|
- 'height': 'auto', //高度自动
|
|
|
- }).print()
|
|
|
- $('.foot').show()
|
|
|
- $('.scalebot').show()
|
|
|
- $('#Print').css({
|
|
|
- 'height': '100%', //高度自动
|
|
|
- });
|
|
|
+ $('.printing').click(function () {
|
|
|
+ $('.foot').hide()
|
|
|
+ $('.scalebot').hide()
|
|
|
+ $('.result_title_tip').hide()
|
|
|
+
|
|
|
+ $('#Print').css({
|
|
|
+ 'height': 'auto', //高度自动
|
|
|
+ }).print();
|
|
|
+ $('.foot').show()
|
|
|
+ $('.scalebot').show()
|
|
|
+ $('.result_title_tip').show()
|
|
|
+ $('#Print').css({
|
|
|
+ 'height': '100%', //高度自动
|
|
|
+ });
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -407,12 +412,12 @@ function getResult(pushInfo, textType, constant) {
|
|
|
}
|
|
|
});
|
|
|
num = num + constant
|
|
|
- num = parseFloat(num).toFixed(2)
|
|
|
+ num = parseFloat(num)
|
|
|
tmp = arr.join(";");
|
|
|
if (pushInfo.length > 0) {
|
|
|
for (var i = 0; i < pushInfo.length; i++) {
|
|
|
if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && !tmp) {
|
|
|
- result = pushInfo[i].result + '(' + num + '分' + ')'
|
|
|
+ result = pushInfo[i].result + '(' + num.toFixed(2) + '分' + ')'
|
|
|
if (proposals.join(";")) {
|
|
|
proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
|
|
|
} else {
|
|
@@ -420,7 +425,7 @@ function getResult(pushInfo, textType, constant) {
|
|
|
}
|
|
|
break
|
|
|
} else if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && tmp) {
|
|
|
- result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
|
|
|
+ result = pushInfo[i].result + '(' + num.toFixed(2) + '分' + ')' + ';' + tmp
|
|
|
if (proposals.join(";")) {
|
|
|
proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
|
|
|
} else {
|
|
@@ -442,7 +447,7 @@ function getResult(pushInfo, textType, constant) {
|
|
|
});
|
|
|
$(".result_title").html('结果:' + result);
|
|
|
if (num >= 0 && numType) {
|
|
|
- $(".score").html('总分:' + num + '分');
|
|
|
+ $(".score").html('总分:' + num.toFixed(2) + '分');
|
|
|
}
|
|
|
$(".result").css('display', 'block')
|
|
|
$(".score").css('display', 'block')
|
|
@@ -450,7 +455,7 @@ function getResult(pushInfo, textType, constant) {
|
|
|
$(".foot").css('display', 'block')
|
|
|
} else {
|
|
|
if (num >= 0 && numType) {
|
|
|
- $(".score").html('总分:' + num + '分');
|
|
|
+ $(".score").html('总分:' + num.toFixed(2) + '分');
|
|
|
}
|
|
|
$(".score").css('display', 'block')
|
|
|
$(".copy").css('display', 'none')
|