|
@@ -124,11 +124,12 @@ function renderContent(list, contentWrapClassName) {
|
|
function renderContentscale(list, contentWrapClassName, name) {
|
|
function renderContentscale(list, contentWrapClassName, name) {
|
|
var pushInfo = []
|
|
var pushInfo = []
|
|
var textType = []
|
|
var textType = []
|
|
|
|
+ var factor, constant
|
|
$('.scaletitle').html(name);
|
|
$('.scaletitle').html(name);
|
|
for (var i = 0; i < list[0].detailList.length; i++) {
|
|
for (var i = 0; i < list[0].detailList.length; i++) {
|
|
var item = list[0].detailList[i];
|
|
var item = list[0].detailList[i];
|
|
textType.push(item.textType)
|
|
textType.push(item.textType)
|
|
- if (item.textType == 11) {
|
|
|
|
|
|
+ if (item.textType == 11) {
|
|
item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
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 +
|
|
str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
|
|
'">'
|
|
'">'
|
|
@@ -155,9 +156,11 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
|
|
str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
|
|
if (it.selectType == 21 && item.resultType == 1) {
|
|
if (it.selectType == 21 && item.resultType == 1) {
|
|
- str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '" resultType="' + item.resultType + '"/>'
|
|
|
|
|
|
+ console.log(item.factor)
|
|
|
|
+ console.log(item.constant)
|
|
|
|
+ str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) )) + '" resultType="' + item.resultType + '"/>'
|
|
} else if (it.selectType == 22 && item.resultType == 1) {
|
|
} else if (it.selectType == 22 && item.resultType == 1) {
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '" resultType="' + item.resultType + '"/>'
|
|
|
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) )) + '" resultType="' + item.resultType + '"/>'
|
|
} else if (it.selectType == 21 && item.resultType == 2) {
|
|
} else if (it.selectType == 21 && item.resultType == 2) {
|
|
str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
|
|
str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
|
|
} else if (it.selectType == 22 && item.resultType == 2) {
|
|
} else if (it.selectType == 22 && item.resultType == 2) {
|
|
@@ -230,7 +233,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
adjustHeight();
|
|
adjustHeight();
|
|
adjustWidth()
|
|
adjustWidth()
|
|
getcheck()
|
|
getcheck()
|
|
- getResult(pushInfo, textType)
|
|
|
|
|
|
+ getResult(pushInfo, textType, factor, constant)
|
|
copy(name)
|
|
copy(name)
|
|
getprinting()
|
|
getprinting()
|
|
|
|
|
|
@@ -334,7 +337,6 @@ function copy(name) {
|
|
}
|
|
}
|
|
var inputs = document.getElementById("inputs");
|
|
var inputs = document.getElementById("inputs");
|
|
inputs.value = name + '结果为:' + texts.substring(3); // 修改文本框的内容(赋值内容)
|
|
inputs.value = name + '结果为:' + texts.substring(3); // 修改文本框的内容(赋值内容)
|
|
- console.log(inputs.value)
|
|
|
|
inputs.select(); // 选中文本
|
|
inputs.select(); // 选中文本
|
|
document.execCommand("copy"); // 执行浏览器复制命令
|
|
document.execCommand("copy"); // 执行浏览器复制命令
|
|
Toast('复制成功', 500, 'success')
|
|
Toast('复制成功', 500, 'success')
|
|
@@ -355,7 +357,7 @@ function getchecks() {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-function getResult(pushInfo, textType) {
|
|
|
|
|
|
+function getResult(pushInfo, textType, factor, constant) {
|
|
$(".but").click(function () {
|
|
$(".but").click(function () {
|
|
let arr = [];
|
|
let arr = [];
|
|
let multarr = []
|
|
let multarr = []
|
|
@@ -369,14 +371,11 @@ function getResult(pushInfo, textType) {
|
|
let v
|
|
let v
|
|
let numType = false
|
|
let numType = false
|
|
isclick = true
|
|
isclick = true
|
|
-
|
|
|
|
for (var i = 0; i < textType.length; i++) {
|
|
for (var i = 0; i < textType.length; i++) {
|
|
- console.log(textType[i])
|
|
|
|
if (textType[i] == 13) {
|
|
if (textType[i] == 13) {
|
|
numType = true
|
|
numType = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(numType)
|
|
|
|
$(".contentList").each(function (i) {
|
|
$(".contentList").each(function (i) {
|
|
if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
|
|
if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
|
|
$(this).find(".item-title").addClass('chColor');
|
|
$(this).find(".item-title").addClass('chColor');
|
|
@@ -393,7 +392,7 @@ function getResult(pushInfo, textType) {
|
|
|
|
|
|
for (var i = 0; i < scrollTop.length; i++) {
|
|
for (var i = 0; i < scrollTop.length; i++) {
|
|
if (scrollTop[i] != undefined){
|
|
if (scrollTop[i] != undefined){
|
|
- v = i
|
|
|
|
|
|
+ v = scrollTop[i]
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -446,6 +445,9 @@ function getResult(pushInfo, textType) {
|
|
result = tmp
|
|
result = tmp
|
|
proposal = proposals.join(";");
|
|
proposal = proposals.join(";");
|
|
}
|
|
}
|
|
|
|
+ console.log(factor+2)
|
|
|
|
+ console.log(num)
|
|
|
|
+ // num = num*factor + constant
|
|
if (result) {
|
|
if (result) {
|
|
$(".hel").attr({
|
|
$(".hel").attr({
|
|
"title": proposal
|
|
"title": proposal
|
|
@@ -504,7 +506,6 @@ function renderTab(detailList, scale) {
|
|
//$(".tabBox .title").html(noticeName);
|
|
//$(".tabBox .title").html(noticeName);
|
|
}
|
|
}
|
|
if (!!scale && getUrlArgObject('type') == 8) {
|
|
if (!!scale && getUrlArgObject('type') == 8) {
|
|
- console.log(1)
|
|
|
|
$(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
|
|
$(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
|
|
//$(".tabBox .title").html(noticeName);
|
|
//$(".tabBox .title").html(noticeName);
|
|
}
|
|
}
|