|
@@ -26,7 +26,7 @@ let printing2 = require('./../images/printing2.png');
|
|
|
let recommend = require('./../images/recommend.png');
|
|
|
let hel = require('./../images/icon-hel.png');
|
|
|
|
|
|
-let showName, noticeName, clinicalPathwayName, isclick
|
|
|
+let showName, noticeName, clinicalPathwayName, isclick,top = 0
|
|
|
function myBrowser() {
|
|
|
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
|
|
|
var isOpera = userAgent.indexOf("Opera") > -1;
|
|
@@ -132,7 +132,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
if (item.resultType == 1) {
|
|
|
constant += parseFloat(item.constant)
|
|
|
}
|
|
|
- if (item.textType == 11) {
|
|
|
+ if (item.textType == 11) {
|
|
|
item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
|
|
|
'">'
|
|
@@ -244,12 +244,20 @@ function getprinting() {
|
|
|
$('.scalebot').hide()
|
|
|
$('#Print').css({
|
|
|
'height': 'auto', //高度自动
|
|
|
- }).print();
|
|
|
+ }).print({
|
|
|
+ globalStyles: true,
|
|
|
+ mediaPrint: false,
|
|
|
+ iframe: false,
|
|
|
+ noPrintSelector: ".avoid-this",
|
|
|
+ prepend: "",
|
|
|
+ append: "",
|
|
|
+ deferred: $.Deferred().done(function () { $("title").html("合同预览") })
|
|
|
+ });
|
|
|
$('.foot').show()
|
|
|
$('.scalebot').show()
|
|
|
$('#Print').css({
|
|
|
'height': '100%', //高度自动
|
|
|
- });
|
|
|
+ });
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -318,7 +326,9 @@ function getcheck() {
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+$('#Print').on('scroll', function () {
|
|
|
+ top = $('#Print').scrollTop()
|
|
|
+})
|
|
|
function copy(name) {
|
|
|
$(".copy").click(function () {
|
|
|
var texts = document.getElementById("result_title").innerText;
|
|
@@ -380,15 +390,14 @@ function getResult(pushInfo, textType, constant) {
|
|
|
}
|
|
|
scrollTop.push($(this).eq(0).find(".chColor").offset())
|
|
|
});
|
|
|
-
|
|
|
for (var i = 0; i < scrollTop.length; i++) {
|
|
|
- if (scrollTop[i] != undefined){
|
|
|
+ if (scrollTop[i] != undefined) {
|
|
|
v = scrollTop[i]
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
if (v) {
|
|
|
- $(`.scale .infos`).scrollTop(v.top + 346)
|
|
|
+ $(`.scale .infos`).scrollTop(v.top + top-160)
|
|
|
}
|
|
|
if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
|
|
|
$('input[type="radio"]:checked').each(function () {
|
|
@@ -405,16 +414,25 @@ function getResult(pushInfo, textType, constant) {
|
|
|
} else {
|
|
|
arr.push($(this).attr("data_obj"))
|
|
|
proposals.push($(this).attr("proposal"))
|
|
|
- }
|
|
|
+ }
|
|
|
});
|
|
|
+ num = num + constant
|
|
|
+ var dot = JSON.stringify(num).indexOf(".");
|
|
|
+ if (dot != -1) {
|
|
|
+ var dotCnt = JSON.stringify(num).substring(dot + 1, num.length);
|
|
|
+ if (dotCnt.length > 1) {
|
|
|
+ num = parseFloat(num).toFixed(1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
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 + '分' + ')'
|
|
|
- if (proposals.join(";")){
|
|
|
+ if (proposals.join(";")) {
|
|
|
proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
proposal = pushInfo[i].pushInfo
|
|
|
}
|
|
|
break
|
|
@@ -435,9 +453,7 @@ function getResult(pushInfo, textType, constant) {
|
|
|
result = tmp
|
|
|
proposal = proposals.join(";");
|
|
|
}
|
|
|
- console.log(constant)
|
|
|
- // num = num+constant
|
|
|
- console.log(num)
|
|
|
+
|
|
|
if (result) {
|
|
|
$(".hel").attr({
|
|
|
"title": proposal
|