|
@@ -157,7 +157,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
if (it.selectType == 21 && item.resultType == 1) {
|
|
|
str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + its.score + '"/>'
|
|
|
} else if (it.selectType == 22 && item.resultType == 1) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.score + '" />'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.score + '"/>'
|
|
|
} 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 + '"/>'
|
|
|
} else if (it.selectType == 22 && item.resultType == 2) {
|
|
@@ -234,6 +234,7 @@ function getcheck() {
|
|
|
const domName = $(this).attr('name');
|
|
|
const $radio = $(this);
|
|
|
const id = $(this).parents('.contentList').data("id");
|
|
|
+ console.log($radio.data('waschecked'))
|
|
|
if ($radio.data('waschecked') == true) {
|
|
|
$radio.prop('checked', false);
|
|
|
$("input:radio[name='" + domName + "']").data('waschecked', false);
|
|
@@ -255,19 +256,13 @@ function getcheck() {
|
|
|
const domName = $(this).attr('name');
|
|
|
const $radio = $(this);
|
|
|
const id = $(this).parents('.contentList').data("id");
|
|
|
- console.log($radio.data('waschecked'))
|
|
|
- if ($radio.data('waschecked') == true) {
|
|
|
- // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
- if (isclick) {
|
|
|
- getchecks()
|
|
|
+ $radio.parents('.contentList').each(function (i) {
|
|
|
+ if ($(this).find('input[type="checkbox"]:checked').val() == undefined){
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
+ }else{
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
}
|
|
|
- } else {
|
|
|
- $radio.data('waschecked', true);
|
|
|
- $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
- if (isclick) {
|
|
|
- getchecks()
|
|
|
- }
|
|
|
- }
|
|
|
+ })
|
|
|
});
|
|
|
}
|
|
|
|