|
@@ -141,7 +141,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
for (var k = 0; k < items.detailList.length; k++) {
|
|
|
var it = items.detailList[k];
|
|
|
it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
- str = '<div class="contentList" data-id="' + it.parentId + '"><div class="item-list">';
|
|
|
+ str = '<div class="contentList" data-id="' + it.parentId + '-' + it.groupNum + '"><div class="item-list">';
|
|
|
if (it.selectType == 21) {
|
|
|
str += '<p class="item-title">' + it.content + '</p>'
|
|
|
} else if (it.selectType == 22) {
|
|
@@ -237,8 +237,7 @@ function getcheck() {
|
|
|
if ($radio.data('waschecked') == true) {
|
|
|
$radio.prop('checked', false);
|
|
|
$("input:radio[name='" + domName + "']").data('waschecked', false);
|
|
|
-
|
|
|
- // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
if (isclick){
|
|
|
getchecks()
|
|
|
}
|
|
@@ -247,7 +246,7 @@ function getcheck() {
|
|
|
$radio.prop('checked', true);
|
|
|
$("input:radio[name='" + domName + "']").data('waschecked', false);
|
|
|
$radio.data('waschecked', true);
|
|
|
- // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
}
|
|
@@ -258,12 +257,12 @@ function getcheck() {
|
|
|
const $radio = $(this);
|
|
|
const id = $(this).parents('.contentList').data("id");
|
|
|
if ($radio.data('waschecked') == true) {
|
|
|
- // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
}
|
|
|
} else {
|
|
|
- // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
}
|
|
@@ -278,7 +277,7 @@ function copy(name) {
|
|
|
return
|
|
|
}
|
|
|
var inputs = document.getElementById("inputs");
|
|
|
- inputs.value = name + '量表结果为:' + texts; // 修改文本框的内容(赋值内容)
|
|
|
+ inputs.value = name + '结果为:' + texts; // 修改文本框的内容(赋值内容)
|
|
|
console.log(inputs.value)
|
|
|
inputs.select(); // 选中文本
|
|
|
document.execCommand("copy"); // 执行浏览器复制命令
|
|
@@ -341,7 +340,12 @@ function getResult(pushInfo, textType) {
|
|
|
tmp = arr.join(";");
|
|
|
if (pushInfo.length > 0) {
|
|
|
for (var i = 0; i < pushInfo.length; i++) {
|
|
|
- if (pushInfo[i].content.max >= num >= pushInfo[i].content.min) {
|
|
|
+ console.log(parseFloat(pushInfo[i].content.max))
|
|
|
+ console.log(pushInfo[i].content.max)
|
|
|
+ console.log(num)
|
|
|
+
|
|
|
+ if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min) {
|
|
|
+ console.log(pushInfo[i])
|
|
|
if (tmp) {
|
|
|
if (num == 0){
|
|
|
result = pushInfo[i].result + ';' + tmp
|