| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>主体课文</title>
- <meta charset="utf-8" />
- <script src="Scripts/jquery.js"></script>
- <link href="Common/mtm_passage.css" rel="stylesheet" type="text/css" />
- <link href="Common/tasklib_book.css" rel="stylesheet" type="text/css" />
- <script src="Common/mtm_temp.js"></script>
- <script src="Common/tasklib_book.js"></script>
- </head>
- <body>
- <div class="scroll-view">
- <button id="load-text">加载听说课文</button>
- <button id="showhide-answer" data-status="1">隐藏习题答案</button>
- <button id="handle-answer" data-status="1">处理作答区域</button>
- <button id="submit-answer">提交习题答案</button>
- <button id="backup-answer">回显习题答案</button>
- <button id="update-answer">修改习题答案</button>
- <button id="backup-review">回填评阅数据</button>
- <button id="scroll-review">定位滚动数据</button>
- <button id="test-ui">测试UI效果</button>
- </div>
- <!--<input type="text" style="border:0px; border-bottom:solid #fbfbfb 1px; border-radius: 3px;padding-left:5px; color:#6ab7ff;" value="测试的" />-->
- <!--<div class="btn-play"><img src="play.png" /><span>作答音频(20s)</span></div>-->
- <!--<div class="btn-play"><img src="play.png" /><span>作答音频(20s)</span></div>
- <p class="test-p">1、</p>
- <p class="test-p1">2、</p>-->
- <!--<u style="">ss</u>-->
- <!--<button class="answertext btn-bgimg">点击作答</button>-->
- <div id="data"></div>
- <script type="text/javascript">
- var answerjson = "";//作答信息
- var reviewjson = "";//评阅信息
- //加载数据
- window.onload = function () {
- //加载听说课文
- answerjson = $.ajax({ url: "AnsText/duogouxuan.json", async: false }).responseText;
- reviewjson = $.ajax({ url: "AnsText/anstext.txt", async: false }).responseText;
- hightcodejson = $.ajax({ url: "HightCode/210511.json", async: false }).responseText;
- }
- //加载听说课文
- $("#load-text").on("click", function () {
- var data = $.ajax({ url: "lghp/duogouxuan.lghp", async: false }).responseText;
- $("#data").html(data);
- Fill(JSON.parse(hightcodejson));
- bindEventYS();
- //bindCoursewareEvent();
- var ResInfo = {
- answerPointImgUrl: "Images/update-answer.png",
- yaoshiShowImgUrl: "Images/yaoshi-show.png",
- yaoshiHideImgUrl: "Images/yaoshi-hide.png",
- KouYuTagImgUrl: "Images/KY.png",
- recordPlayImgUrl: "Images/play.png",
- recordPauseImgUrl: "Images/pause.png",
- audioPlayImgUrl: "Images/dynaiselaba.gif",
- audioPauseImgUrl: "Images/dynaiselaba.png"
- }
- //调用查看图标
- $.each($(".yaoshi"), function (index, item) {
- $(item).attr("src", ResInfo.yaoshiShowImgUrl);//移动端要根据本地 喇叭 路径替换
- });
- $.each($(".audioImg"), function (index, item) {
- $(item).attr("src", ResInfo.audioPauseImgUrl);//移动端要根据本地 喇叭 路径替换
- });
- $.each($(".oralLanguageImg"), function (index, item) {
- $(item).attr("src", ResInfo.KouYuTagImgUrl);//移动端要根据本地 喇叭 路径替换
- });
- });
- //显示/隐藏习题答案
- $("#showhide-answer").on("click", function () {
- if ($(this).data("status") == "0") {
- this.innerText = "隐藏习题答案";
- $(this).data("status", "1");
- //showHideAnswer(true);
- showHideAnswerEx(true, true);
- //$(".underlineContent").show();
- }
- else {
- this.innerText = "显示习题答案";
- $(this).data("status", "0");
- //showHideAnswer(false);
- showHideAnswerEx(true, false);
- //$(".underlineContent").hide();
- }
- });
- //处理作答区域
- $("#handle-answer").on("click", function () {
- handleAnswerRange();
- });
- //提交习题答案
- $("#submit-answer").on("click", function () {
- getAllAnswer();
- });
- //回显习题答案
- $("#backup-answer").on("click", function () {
- backupAllAnswer(answerjson, 0);
- //var answerJson = "{\"AudioLength\":3,\"AudioUrl\":\"http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-11-06_09-31-19.wav\",\"Id\":\"18\",\"Text\":\"\",\"Type\":3}";
- //reviewAnswer(answerJson);
- });
- //修改习题答案
- $("#update-answer").on("click", function () {
- //backupAllAnswer(answerjson, false);
- //var answerJson = "{\"AudioLength\":0,\"AudioUrl\":\"\",\"Id\":\"1\",\"Text\":\"sdasd\",\"Type\":1}";
- //var answerJson = "{\"AudioLength\":5,\"AudioUrl\":\"http://172.16.41.241:10103/Web_AITeachCloudV10/Files/UpLoad/zxstu155/2020/11/25/8a5d785d626748bbaa027895568d1bc3.wav\",\"Comment\":\"\",\"Id\":\"10\",\"PicUrl\":\"\",\"Score\":\"\",\"Text\":\"Good .\",\"Type\":3}";
- //测试数据
- //answerJson = "{\"AudioLength\":0,\"Id\":\"0\",\"Text\":\"i am how i know\",\"Type\":1}";
- answerJson = "{\"AudioLength\":3,\"AudioUrl\":\"http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-11-06_09-31-19.wav\",\"Id\":\"4\",\"Text\":\"i know how i know \",\"Type\":3}";
- //var answerJson = "{\"AudioLength\":5,\"AudioUrl\":\"http://172.16.41.241:10103/Web_AITeachCloudV10/Files/UpLoad/zxstu155/2020/11/25/8a5d785d626748bbaa027895568d1bc3.wav\",\"Comment\":\"\",\"Id\":\"10\",\"PicUrl\":\"\",\"Score\":\"\",\"Text\":\"Good .\",\"Type\":3}";
- reviewAnswer(answerJson);
- });
- //回填评阅数据
- $("#backup-review").on("click", function () {
- backupAllReview(reviewjson);
- });
- //定位滚动数据
- $("#scroll-review").on("click", function () {
- //scrollAnswer(randomNum(0,answerData.length-1));
- scrollAnswer(91);
- });
- //测试UI效果
- $("#test-ui").on("click", function () {
- var clonediv = $(".btn-play").prop("outerHTML");
- $(".test-p").html($(".test-p").html() + clonediv);
- });
- //生成从minNum到maxNum的随机数
- function randomNum(minNum, maxNum) {
- switch (arguments.length) {
- case 1:
- return parseInt(Math.random() * minNum + 1, 10);
- break;
- case 2:
- return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
- break;
- default:
- return 0;
- break;
- }
- }
- </script>
- </body>
- </html>
|