|
|
@@ -1087,7 +1087,7 @@ function bindEventYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
var AnswerText = "";
|
|
|
$.each($(".underlineContent[yaoshi-flag='" + index + "']"), function (tIndex, tItem) {
|
|
|
AnswerText += $(this).text();
|
|
|
- // 补充嵌套,data-select表示选择状态0表示未选择,1表示已作答选择,2表示未做答选择
|
|
|
+ // 补充嵌套,data-select表示选择状态0表示未选择,1表示已作答选择,2表示未作答选择
|
|
|
if ($(this).parent().children().length > 1) {
|
|
|
$(this).prop("outerHTML", '<span class="ULCBGUse" data-select="0" onselectstart="return true">' + $(this).prop("outerHTML") + '</span>');
|
|
|
}
|
|
|
@@ -1139,7 +1139,7 @@ function bindEventYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
if ($(item).hasClass('boxQue')) {
|
|
|
$(item).find('.yaoshi').attr('answer-isky', "2");
|
|
|
if ($(item).find(".underlineContent").length == 0) {
|
|
|
- var AddHtmlStr = '<span class="ULCBGUse" data-select="0" onselectstart="return true"><u class="underlineContent" yaoshi-flag="' + checkId + '" parent-anid="' +headid + '" data-errstatus="0" showflag="1" style="border-bottom: 1px solid rgb(151, 151, 151); text-decoration: none; white-space: pre-wrap;" ucflag="1"> </u></span>';
|
|
|
+ var AddHtmlStr = '<span class="ULCBGUse" data-select="0" onselectstart="return true"><u class="underlineContent" yaoshi-flag="' + checkId + '" parent-anid="' + headid + '" data-errstatus="0" showflag="1" style="border-bottom: 1px solid rgb(151, 151, 151); text-decoration: none; white-space: pre-wrap;" ucflag="1"> </u></span>';
|
|
|
$(item).find('.yaoshi').after(AddHtmlStr);
|
|
|
}
|
|
|
}
|
|
|
@@ -1272,7 +1272,7 @@ function handleAnswerRange() {
|
|
|
$(item).after("<div class='cBoxClsBg' data-select='0'><div class='cBoxCls cBoxCls_" + AnswerID + "' answer-id='" + AnswerID + "' parent-anid='" + AnswerPID + "' data-status='0' onclick='clickCheckBox(" + AnswerID + ")' answer-anstext='" + TAnsText + "'></div></div>");
|
|
|
}
|
|
|
else {
|
|
|
- // data-astatus控制作答样式(0表示未提交,1表示提交,2表示回显);data-errstatus判断是否作答(1表示未做答)
|
|
|
+ // data-astatus控制作答样式(0表示未提交,1表示提交,2表示回显);data-errstatus判断是否作答(1表示未作答)
|
|
|
$(item).after("<div class='answer-body' answer-id='" + AnswerID + "' parent-anid='" + AnswerPID + "' answer-isky='" + AnswerIsky + "' answer-showanswer='0' data-astatus='0' data-errstatus='0' mobile-type='" + cTTypeFunc + "' onclick='ClickRecFunc(" + AnswerPID + ")' answer-anstext='" + TAnsText + "'><div class='answer-audio-range'><img class='nextpic' src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' mobile-type='" + cTTypeFunc + "'><div class='answer-point-range-div' mobile-type='" + cTTypeFunc + "'><img class='nextpic' src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div></div><buttom class='answer-text' data-astatus='0'></buttom></div>");
|
|
|
}
|
|
|
var info = new Object();
|
|
|
@@ -1496,7 +1496,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".answer-body").remove(); // 删除原有答题点
|
|
|
$(".cBoxCls").remove(); // 删除原有答题点
|
|
|
- $(".underlineContent").attr("data-errstatus", "1"); // 标记为未做答
|
|
|
+ $(".underlineContent").attr("data-errstatus", "1"); // 标记为未作答
|
|
|
ControlFlag = false; // 多选框不可以作答
|
|
|
if (answerJson != "" && answerJson) {
|
|
|
var answerList = JSON.parse(answerJson);
|
|
|
@@ -1644,12 +1644,12 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
var TNHtmlArr = NHtmlStr.split(TText);
|
|
|
var ThitCode = "";
|
|
|
if (aItem.HightCode != 'undefined' && aItem.HightCode != null && aItem.HightCode != "") {
|
|
|
- ThitCode = aItem.HightCode + "|" +aItem.SourceCode;
|
|
|
+ ThitCode = aItem.HightCode + "|" + aItem.SourceCode;
|
|
|
}
|
|
|
else {
|
|
|
ThitCode = aItem.HightCode + "|" + aItem.SourceCode;
|
|
|
}
|
|
|
- var RHtml = TNHtmlArr[0] + ' <span id="' + aItem.HightCode + '" class="wordStyle" name="W' + aItem.HightCode + '" flag="word" iskeyklg="' + TIskeyklg + '" espflag="' + TEspflag + '" ktype="' + TKtype + '" kcode="' + aItem.HightCode + "|" + aItem.SourceCode + '" data-setstatus="1" data-lstatus="1" hitCode="' +ThitCode + '" onselectstart="return true">' +TText + '</span> ' +TNHtmlArr[1];
|
|
|
+ var RHtml = TNHtmlArr[0] + ' <span id="' + aItem.HightCode + '" class="wordStyle" name="W' + aItem.HightCode + '" flag="word" iskeyklg="' + TIskeyklg + '" espflag="' + TEspflag + '" ktype="' + TKtype + '" kcode="' + aItem.HightCode + "|" + aItem.SourceCode + '" data-setstatus="1" data-lstatus="1" hitCode="' + ThitCode + '" onselectstart="return true">' + TText + '</span> ' + TNHtmlArr[1];
|
|
|
NHtmlStr = NHtmlStr.replace(TText, RHtml);
|
|
|
}
|
|
|
}
|
|
|
@@ -1711,7 +1711,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
if ($("span[flag='sentence'],span[flag='phrase'],span[flag='word']").find(".underlineContent[yaoshi-flag='" + answerid + "']").length > 0) {
|
|
|
var TTNHtmlStr = NHtmlStr; // 用来判断是否相等
|
|
|
var TrueFlag = true; // 判断是否全部正确
|
|
|
- $.each($("span[flag='sentence'],span[flag='phrase'],span[flag='word']").find(".underlineContent[yaoshi-flag='" + answerid + "']"), function (iIndex,iItem) {
|
|
|
+ $.each($("span[flag='sentence'],span[flag='phrase'],span[flag='word']").find(".underlineContent[yaoshi-flag='" + answerid + "']"), function (iIndex, iItem) {
|
|
|
var TUCText = $(this).text();
|
|
|
TUCText = ChangeSpaceStr(TUCText);
|
|
|
if (TTNHtmlStr.indexOf(TUCText) == 0) {
|
|
|
@@ -1755,7 +1755,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
if (TFlag == "sentence" && NHtmlStr.indexOf(TText) > -1) {
|
|
|
var ThitCode = "";
|
|
|
if (aItem.HightCode != 'undefined' && aItem.HightCode != null && aItem.HightCode != "") {
|
|
|
- ThitCode = aItem.HightCode + "|" +aItem.SourceCode;
|
|
|
+ ThitCode = aItem.HightCode + "|" + aItem.SourceCode;
|
|
|
}
|
|
|
else {
|
|
|
ThitCode = aItem.HightCode + "|" + aItem.SourceCode;
|
|
|
@@ -1779,7 +1779,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
ThitCode = aItem.HightCode + "|" + aItem.SourceCode;
|
|
|
}
|
|
|
- var RHtml = '<span id="' + aItem.HightCode + '" name="P' + aItem.HightCode + '" flag="phrase" iskeyklg="' + TIskeyklg + '" espflag="' + TEspflag + '" ktype="' + TKtype + '" kcode="' + aItem.HightCode + "|" + aItem.SourceCode + '" hitCode="' +ThitCode + '" onselectstart="return true"></span>';
|
|
|
+ var RHtml = '<span id="' + aItem.HightCode + '" name="P' + aItem.HightCode + '" flag="phrase" iskeyklg="' + TIskeyklg + '" espflag="' + TEspflag + '" ktype="' + TKtype + '" kcode="' + aItem.HightCode + "|" + aItem.SourceCode + '" hitCode="' + ThitCode + '" onselectstart="return true"></span>';
|
|
|
NHtmlStr = NHtmlStr.replace(TText, RHtml);
|
|
|
if (NHtmlArr != null && NHtmlArr.indexOf(TText) > -1) {
|
|
|
// 存在的话,同时替换便于一会更新
|
|
|
@@ -1798,7 +1798,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
ThitCode = aItem.HightCode + "|" + aItem.SourceCode;
|
|
|
}
|
|
|
- var RHtml = '<span id="' + aItem.HightCode + '" name="W' + aItem.HightCode + '" flag="word" iskeyklg="' + TIskeyklg + '" espflag="' + TEspflag + '" ktype="' + TKtype + '" kcode="' + aItem.HightCode + "|" + aItem.SourceCode + '" hitCode="' +ThitCode + '" onselectstart="return true"></span>';
|
|
|
+ var RHtml = '<span id="' + aItem.HightCode + '" name="W' + aItem.HightCode + '" flag="word" iskeyklg="' + TIskeyklg + '" espflag="' + TEspflag + '" ktype="' + TKtype + '" kcode="' + aItem.HightCode + "|" + aItem.SourceCode + '" hitCode="' + ThitCode + '" onselectstart="return true"></span>';
|
|
|
NHtmlStr = NHtmlStr.replace(TText, RHtml);
|
|
|
if (NHtmlArr != null && NHtmlArr.indexOf(TText) > -1) {
|
|
|
// 存在的话,同时替换便于一会更新
|
|
|
@@ -1817,7 +1817,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
var NAHtmlArr = [];
|
|
|
while (NHtmlArr != null && NHtmlArr.length > 0) {
|
|
|
if (NAHtmlArr == null || NAHtmlArr.length == 0) {
|
|
|
- var TNHtmlArr=NHtmlArr.shift();
|
|
|
+ var TNHtmlArr = NHtmlArr.shift();
|
|
|
NAHtmlArr = NHtmlStr.split(TNHtmlArr);
|
|
|
NAHtmlArr.splice(1, 0, TNHtmlArr)
|
|
|
}
|
|
|
@@ -1828,8 +1828,8 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
var TNAHtmlArr = NAHtmlArr[i];
|
|
|
var TTNAHtmlArr = TNAHtmlArr.split(TNHtmlArr);
|
|
|
NAHtmlArr.splice(i, 1, TTNAHtmlArr[0]);
|
|
|
- NAHtmlArr.splice(i, 0,TNHtmlArr);
|
|
|
- NAHtmlArr.splice(i, 0,TTNAHtmlArr[1]);
|
|
|
+ NAHtmlArr.splice(i, 0, TNHtmlArr);
|
|
|
+ NAHtmlArr.splice(i, 0, TTNAHtmlArr[1]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1841,7 +1841,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
// 不存在被包含,随便放一个都行
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").html("");
|
|
|
- if ($(".underlineContent[yaoshi-flag='" + answerid + "']").find(".answer-audio-range-child").length > 0){
|
|
|
+ if ($(".underlineContent[yaoshi-flag='" + answerid + "']").find(".answer-audio-range-child").length > 0) {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").find(".answer-audio-range-child").eq(0).html(NHtmlStr);
|
|
|
}
|
|
|
else {
|
|
|
@@ -1972,7 +1972,7 @@ function AddClickEvent() {
|
|
|
curObj.Comment = answerComment;//评语
|
|
|
// 选中样式渲染
|
|
|
var WType = "0";
|
|
|
- if (answerText == "未做答" || answerText.length == 0) {
|
|
|
+ if (answerText == "未作答" || answerText.length == 0) {
|
|
|
WType = "2";
|
|
|
}
|
|
|
else {
|
|
|
@@ -2117,8 +2117,8 @@ function AddClickEvent() {
|
|
|
$(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(".select-answer").removeClass("select-answer");
|
|
|
- var AudioID= $(this).parent(".underlineContent").attr("yaoshi-flag");
|
|
|
- var AudioUrl= $(this).attr("answer-url");
|
|
|
+ var AudioID = $(this).parent(".underlineContent").attr("yaoshi-flag");
|
|
|
+ var AudioUrl = $(this).attr("answer-url");
|
|
|
recordAudioClick(this, AudioID, AudioUrl);
|
|
|
});
|
|
|
}
|
|
|
@@ -2361,12 +2361,33 @@ function playRecordAudio(answerid, isPlay) {
|
|
|
function scrollAnswer(answerid) {
|
|
|
//console.log(answerid);
|
|
|
$(".cBoxClsBg").attr("data-select", "0");
|
|
|
+ $(".ULCBGUse").attr("data-select", "0");
|
|
|
$(".answer-body").removeClass("select-answer");
|
|
|
var ansDom = $(".answer-body[parent-anid='" + answerid + "']");
|
|
|
if (ansDom.length == 0) {
|
|
|
ansDom = $(".cBoxCls[parent-anid='" + answerid + "']");
|
|
|
if (ansDom.length == 0) {
|
|
|
ansDom = $(".underlineContent[parent-anid='" + answerid + "']");
|
|
|
+ var TanswerText = "";
|
|
|
+ $.each($(".underlineContent[parent-anid=" + answerid + "]"), function () {
|
|
|
+ TanswerText += $(this).text();
|
|
|
+ });
|
|
|
+ var WType = "0";
|
|
|
+ console.log(TanswerText);
|
|
|
+ if (TanswerText == "未作答" || TanswerText.length == 0) {
|
|
|
+ WType = "2";
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ WType = "1";
|
|
|
+ }
|
|
|
+ $(".underlineContent[parent-anid=" + answerid + "]").parent(".ULCBGUse").attr("data-select", WType);
|
|
|
+ if ($(".underlineContent[parent-anid=" + answerid + "]").length > 1) {
|
|
|
+ $(".underlineContent[parent-anid=" + answerid + "]").first().parent(".ULCBGUse").css("border-radius", "5px 0px 0px 5px");
|
|
|
+ $(".underlineContent[parent-anid=" + answerid + "]").last().parent(".ULCBGUse").css("border-radius", "0px 5px 5px 0px");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(".underlineContent[parent-anid=" + answerid + "]").parent(".ULCBGUse").css("border-radius", "5px");
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
$(ansDom).parent(".cBoxClsBg").attr("data-select", "1");
|