ソースを参照

上传卡控未做答显示高亮

namejr 4 年 前
コミット
1b5c7269a7

+ 9 - 0
EBook.Web/Common/mtm_passage.css

@@ -417,3 +417,12 @@ ul {
 
 .ui-dialog a,a:-webkit-any-link,a:link,a:visited,a:hover,a:active{cursor:pointer !important;}
 
+.wordStyle[data-lstatus='1'] {
+    color: #000000 !important;
+}
+.phraseStyle[data-lstatus='1'] {
+    background-color: #ffffff !important;
+}
+.sentenceStyle[data-lstatus='1'] {
+    border-bottom: none !important;
+}

+ 16 - 0
EBook.Web/Common/mtm_temp.js

@@ -63,6 +63,10 @@ function Fill(data) {
     if (typeof (addFillAssist) == "function") {
         addFillAssist();
     }
+    // ´¦Àí²»ÏÔʾ¸ßÁÁ
+    if (typeof (dealNotShowFill) == "function") {
+        dealNotShowFill();
+    }
 }
 
 function clearHighlight() {
@@ -101,6 +105,9 @@ function bindEvent(ele, opt) {
                             e.stopPropagation();
                             //plugin.call(code);
                             //alert($(this).attr("hitCode"));
+                            if (ele.attr("data-lstatus") == "1") {
+                                return;
+                            }
                             var sHCode = $(this).attr("shcode");
                             if (sHCode != undefined && sHCode == 1) {
                                 test($(this).attr("hitCode"));
@@ -117,6 +124,9 @@ function bindEvent(ele, opt) {
                         e.stopPropagation();
                         //plugin.call(code);
                         //alert($(this).attr("hitCode"));
+                        if (ele.attr("data-lstatus") == "1") {
+                            return;
+                        }
                         var sHCode = $(this).attr("shcode");
                         if (sHCode != undefined && sHCode == 1) {
                             test($(this).attr("hitCode"));
@@ -133,6 +143,9 @@ function bindEvent(ele, opt) {
                         e.stopPropagation();
                         //plugin.call(code);
                         //alert($(this).attr("hitCode"));
+                        if (ele.attr("data-lstatus") == "1") {
+                            return;
+                        }
                         var sHCode = $(this).attr("shcode");
                         if (sHCode != undefined && sHCode == 1) {
                             test($(this).attr("hitCode"));
@@ -146,6 +159,9 @@ function bindEvent(ele, opt) {
                         e.stopPropagation();
                         //plugin.call(code);
                         //alert($(this).attr("hitCode"));
+                        if (ele.attr("data-lstatus") == "1") {
+                            return;
+                        }
                         var sHCode = $(this).attr("shcode");
                         if (sHCode != undefined && sHCode == 1) {
                             test($(this).next().attr("hitCode"));

+ 29 - 6
EBook.Web/Common/tasklib_book.js

@@ -413,12 +413,9 @@ var AdjustTableFunc = function (sWidthVal, isAStatus) {
 };
 // #endregion
 // 测试专用(移动端不需要引用)
-function AddTestTextFunc(DataStr4) {
-    var DataStr1 = 0, DataStr2 = 0, DataStr3 = 0;
-    DataStr1 = $(document.body).css("width");
-    DataStr2 = GetPadVal(document.body);
-    DataStr3 = DataStr4;
-    var HtmlStr = '<div id="ShowTStr" style="width:100px;height:auto;background-color:yellow;color:#000;position:fixed;left:10px;top:100px;">DataStr1=》' + DataStr1 + '<br />DataStr2=》' + DataStr2 + '<br />DataStr3=》' + DataStr3 + '</div>';
+function AddTestTextFunc(DataStr3) {
+    $("#ShowTStr").remove();
+    var HtmlStr = '<div id="ShowTStr" style="width:200px;height:auto;background-color:yellow;color:#000;position:fixed;left:10px;top:100px;">DataStr3=》' + DataStr3 + '</div>';
     $(document.body).append(HtmlStr)
 }
 //#region 听力音频处理
@@ -630,6 +627,28 @@ function TouchEndFunc(event) {
 }
 //#endregion
 
+// #region 高亮揭露学生答案处理
+// 处理暂不显示高亮
+function dealNotShowFill() {
+    $.each($(".phraseStyle,.sentenceStyle,.wordStyle"), function () {
+        var _this = this;
+        if ($(this).find(".answer-point-range").length > 0) {
+            $.each($(this).find(".answer-point-range"), function () {
+                if ($(this).css("display") == 'inline-block') {
+                    $(_this).attr("data-lstatus", "1");
+                    return;
+                }
+            });
+        }
+    });
+}
+// 恢复显示高亮处理
+function dealRecvShowFill() {
+    $.each($(".phraseStyle[data-lstatus='1'],.sentenceStyle[data-lstatus='1'],.wordStyle[data-lstatus='1']"), function () {
+        $(this).attr("data-lstatus", "0");
+    });
+}
+// #endregion
 // 点击事件样式渲染
 var ClickRecFunc = function (pID) {
     $(".answer-body").removeClass("select-answer");
@@ -1807,6 +1826,7 @@ function getAllAnswer() {
     });
     ControlFlag = false;
     //console.log(JSON.stringify(answerData));
+    dealRecvShowFill();
     return answerData;
 }
 
@@ -2101,6 +2121,7 @@ function backupAllAnswer(answerJson, statusType) {
             });
         }
     }
+    dealRecvShowFill();
 }
 
 //老师评阅学生作答
@@ -2127,6 +2148,7 @@ function reviewStuAnswer(answerJson) {
             }
         });
     }
+    dealRecvShowFill();
 }
 
 //回填所有评阅信息,answerJson:所有作答及参考答案评阅信息List
@@ -2302,6 +2324,7 @@ function backupAllReview(answerJson) {
             }
         });
     }
+    dealRecvShowFill();
 }
 
 //处理播放录音,answerid:答题点ID,isPlay:是否播放(0-暂停,1-播放)

+ 2 - 0
EBook.Web/EBook.Web.csproj

@@ -70,6 +70,7 @@
     <Content Include="AnsText\anstext.txt" />
     <Content Include="AnsText\answer.txt" />
     <Content Include="AnsText\21985.json" />
+    <Content Include="AnsText\data202141.txt" />
     <Content Include="AnsText\GCZD.json" />
     <Content Include="AnsText\22034.json" />
     <Content Include="AnsText\220341.json" />
@@ -162,6 +163,7 @@
     <Content Include="Lghp\data3151816.lghp" />
     <Content Include="Lghp\data3181340.lghp" />
     <Content Include="Lghp\data24332.lghp" />
+    <Content Include="Lghp\data202141.lghp" />
     <None Include="Lghp\gaicuo.lghp" />
     <None Include="Lghp\TS.lghp" />
     <Content Include="NK\tasklib_book.css" />