|
|
@@ -521,7 +521,7 @@ function handleAnswerRange() {
|
|
|
//$(item).find('input').prop('checked', ischecked);
|
|
|
$(item).find('.underlineContent').hide();
|
|
|
}
|
|
|
-
|
|
|
+ //点击事件
|
|
|
$(item).find('input').bind("click", function () {
|
|
|
var curObj = new Object();
|
|
|
curObj.Id = $(this).parent().attr("answer-id");//答题点ID
|
|
|
@@ -550,7 +550,7 @@ function handleAnswerRange() {
|
|
|
}
|
|
|
});
|
|
|
//删除钥匙节点
|
|
|
- $(item).find('.yaoshi').remove();
|
|
|
+ $(item).find('.yaoshi').hide();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -640,6 +640,7 @@ function handleAnswerRange() {
|
|
|
|
|
|
//合并参考答案数据
|
|
|
var tempid = "";
|
|
|
+ var temppid = "";
|
|
|
var temptext = "";
|
|
|
for (var i = 0; i < tempJson.length; i++) {
|
|
|
if (tempid == tempJson[i].Id) {
|
|
|
@@ -649,6 +650,7 @@ function handleAnswerRange() {
|
|
|
if (tempid != "") {
|
|
|
var info = new Object();
|
|
|
info.Id = tempid;
|
|
|
+ info.pId = temppid;
|
|
|
info.AnsText = temptext;
|
|
|
answerData.push(info);
|
|
|
//重置
|
|
|
@@ -657,11 +659,13 @@ function handleAnswerRange() {
|
|
|
}
|
|
|
|
|
|
tempid = tempJson[i].Id;
|
|
|
+ temppid = tempJson[i].pId;
|
|
|
temptext = tempJson[i].AnsText;
|
|
|
//最后一个存入
|
|
|
if (i == tempJson.length - 1) {
|
|
|
var info = new Object();
|
|
|
info.Id = tempid;
|
|
|
+ info.pId = temppid;
|
|
|
info.AnsText = temptext;
|
|
|
answerData.push(info);
|
|
|
}
|
|
|
@@ -679,6 +683,7 @@ function handleAnswerRange() {
|
|
|
for (var j = 0; j < index; j++) {
|
|
|
var info = new Object();
|
|
|
info.Id = (i + j).toString();
|
|
|
+ info.pId = info.Id;
|
|
|
info.AnsText = "";
|
|
|
answerData.splice(i, 0, info);
|
|
|
}
|
|
|
@@ -686,6 +691,7 @@ function handleAnswerRange() {
|
|
|
else {
|
|
|
var info = new Object();
|
|
|
info.Id = (i).toString();
|
|
|
+ info.pId = info.Id;
|
|
|
info.AnsText = "";
|
|
|
answerData.splice(i, 0, info);
|
|
|
}
|
|
|
@@ -747,7 +753,9 @@ function handleAnswerRange() {
|
|
|
$(item).remove();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ //删除所有钥匙节点
|
|
|
+ $("img[class=yaoshi]").remove();
|
|
|
+ //console.log(JSON.stringify(answerData));
|
|
|
return answerData;
|
|
|
}
|
|
|
|
|
|
@@ -833,6 +841,8 @@ function getAllAnswer() {
|
|
|
$(item).prop("outerHTML", "<div class='answer-body' answer-id='" + answerid + "' parent-anid='" + parentid + "' answer-anstext='" + answerText + "' answer-isky='2'><div class='answer-audio-range'><img src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' style='display:none;'><img src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div><buttom class='answer-text' style='display:block;'>" + mytext + "</buttom></div>");
|
|
|
});
|
|
|
|
|
|
+ //console.log(JSON.stringify(answerData));
|
|
|
+
|
|
|
return answerData;
|
|
|
}
|
|
|
|
|
|
@@ -968,7 +978,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
//已提交,已评阅,还原HTML代码,去除checkbox
|
|
|
if (statusType == 1 || statusType == 2) {
|
|
|
mytext = mytext == "" ? "__" : mytext;
|
|
|
- $(item).prop("outerHTML", "<div class='answer-body' answer-id='" + answerid + "' parent-anid='" + parentid + "' answer-anstext='" + answerText + "' answer-isky='2'><div class='answer-audio-range'><img src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' style='display:none;'><img src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div><buttom class='answer-text' style='display:block;'>" + mytext + "</buttom></div>");
|
|
|
+ $(item).prop("outerHTML", "<div class='answer-body' answer-id='" + answerid + "' parent-anid='" + parentid + "' answer-anstext='" + answerText + "' answer-isky='2' answer-text='" + mytext + "'><div class='answer-audio-range'><img src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' style='display:none;'><img src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div><buttom class='answer-text' style='display:block;'>" + mytext + "</buttom></div>");
|
|
|
}
|
|
|
});
|
|
|
//点击事件重新绑定
|
|
|
@@ -1111,7 +1121,7 @@ function backupAllReview(answerJson) {
|
|
|
var ischecked = mytext.indexOf("√") > -1;
|
|
|
var answerText = $(item).attr("answer-anstext");//参考答案
|
|
|
mytext = mytext == "" ? "__" : mytext;
|
|
|
- $(item).prop("outerHTML", "<div class='answer-body' answer-id='" + answerid + "' parent-anid='" + parentid + "' answer-anstext='" + answerText + "' answer-isky='2'><div class='answer-audio-range'><img src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' style='display:none;'><img src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div><buttom class='answer-text' style='display:block;'>" + mytext + "</buttom></div>");
|
|
|
+ $(item).prop("outerHTML", "<div class='answer-body' answer-id='" + answerid + "' parent-anid='" + parentid + "' answer-anstext='" + answerText + "' answer-isky='2' answer-text='" + mytext + "'><div class='answer-audio-range'><img src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' style='display:none;'><img src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div><buttom class='answer-text' style='display:block;'>" + mytext + "</buttom></div>");
|
|
|
});
|
|
|
//点击事件重新绑定
|
|
|
$(".answer-body").unbind("click").on("click", function () {
|
|
|
@@ -1161,6 +1171,7 @@ function playRecordAudio(answerid, isPlay) {
|
|
|
//滚动到相应DIV
|
|
|
function scrollAnswer(answerid) {
|
|
|
//console.log(answerid);
|
|
|
+ $(".checkbox").removeClass("select-answer");
|
|
|
$(".answer-body").removeClass("select-answer");
|
|
|
var ansDom = $(".answer-body[answer-id='" + answerid + "']");
|
|
|
if (ansDom.length == 0) {
|