|
@@ -25,7 +25,7 @@ let printing2 = require('./../images/printing2.png');
|
|
|
let recommend = require('./../images/recommend.png');
|
|
|
|
|
|
|
|
|
-let showName, noticeName, clinicalPathwayName
|
|
|
+let showName, noticeName, clinicalPathwayName, isclick
|
|
|
function getInfomation() {
|
|
|
var param = {
|
|
|
"type": getUrlArgObject('type'),
|
|
@@ -159,9 +159,9 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
} else if (it.selectType == 22 && item.resultType == 1) {
|
|
|
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="' + its.result + '"/>'
|
|
|
+ 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) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '问题' + its.result + '"/>'
|
|
|
}
|
|
|
str += its.content
|
|
|
if (item.resultType == 1) {
|
|
@@ -237,24 +237,38 @@ 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);
|
|
|
+ if (isclick){
|
|
|
+ getchecks()
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
$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);
|
|
|
+ if (isclick) {
|
|
|
+ getchecks()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('input:checkbox').click(function () {
|
|
|
+ const domName = $(this).attr('name');
|
|
|
+ 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);
|
|
|
+ if (isclick) {
|
|
|
+ getchecks()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
+ if (isclick) {
|
|
|
+ getchecks()
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
- // $('input:checkbox').click(function () {
|
|
|
- // const domName = $(this).attr('name');
|
|
|
- // 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);
|
|
|
- // } else {
|
|
|
- // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
- // }
|
|
|
- // });
|
|
|
}
|
|
|
|
|
|
function copy(name) {
|
|
@@ -276,13 +290,27 @@ function copy(name) {
|
|
|
})
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+function getchecks(){
|
|
|
+ $(".contentList").each(function (i) {
|
|
|
+ if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
|
|
|
+ $(this).find(".item-title").addClass('chColor');
|
|
|
+ } else {
|
|
|
+ $(this).find(".item-title").removeClass('chColor');
|
|
|
+ }
|
|
|
+ if ($(this).find('input[type="checkbox"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
|
|
|
+ $(this).find(".item-titles").addClass('chColor');
|
|
|
+ } else {
|
|
|
+ $(this).find(".item-titles").removeClass('chColor');
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
function getResult(pushInfo, textType) {
|
|
|
$(".but").click(function () {
|
|
|
let arr = [];
|
|
|
let num = 0
|
|
|
let result
|
|
|
let key = false
|
|
|
+ isclick = true
|
|
|
$(".contentList").each(function (i) {
|
|
|
if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
|
|
|
$(this).find(".item-title").addClass('chColor');
|
|
@@ -310,7 +338,7 @@ function getResult(pushInfo, textType) {
|
|
|
arr.push($(this).attr("data_obj"))
|
|
|
}
|
|
|
});
|
|
|
- tmp = arr.join(",");
|
|
|
+ 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) {
|
|
@@ -318,13 +346,13 @@ function getResult(pushInfo, textType) {
|
|
|
if (num == 0){
|
|
|
result = pushInfo[i].result + ';' + tmp
|
|
|
}else{
|
|
|
- result = pushInfo[i].result + '(' + num + ')' + ';' + tmp
|
|
|
+ result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
|
|
|
}
|
|
|
} else {
|
|
|
if (num == 0) {
|
|
|
result = pushInfo[i].result
|
|
|
} else {
|
|
|
- result = pushInfo[i].result + '(' + num + ')'
|
|
|
+ result = pushInfo[i].result + '(' + num + '分' +')'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -364,7 +392,6 @@ function getResult(pushInfo, textType) {
|
|
|
function addLinkClickEvent(contentWrapClassName) {
|
|
|
$(`.${contentWrapClassName} .anchors li:first`).addClass("active");
|
|
|
$(`.${contentWrapClassName} .anchors li>a`).on("click", function () {
|
|
|
-
|
|
|
const that = this
|
|
|
setTimeout(function () {
|
|
|
$(`.${contentWrapClassName} .anchors .active`).removeClass('active');
|