qtivue
Version:
1 lines • 226 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("qtivue",["vue"],e):"object"==typeof exports?exports.qtivue=e(require("vue")):t.qtivue=e(t.Vue)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(a){if(s[a])return s[a].exports;var i=s[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var s={};return e.m=t,e.c=s,e.d=function(t,s,a){e.o(t,s)||Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var s=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(s,"a",s),s},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=51)}([function(t,e){t.exports=function(t,e,s,a,i,n){var r,o=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(r=t,o=t.default);var d="function"==typeof o?o.options:o;e&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),s&&(d.functional=!0),i&&(d._scopeId=i);var l;if(n?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},d._ssrRegister=l):a&&(l=a),l){var u=d.functional,h=u?d.render:d.beforeCreate;u?(d._injectStyles=l,d.render=function(t,e){return l.call(e),h(t,e)}):d.beforeCreate=h?[].concat(h,l):[l]}return{esModule:r,exports:o,options:d}}},function(t,e,s){var a=s(30)("wks"),i=s(20),n=s(3).Symbol,r="function"==typeof n;(t.exports=function(t){return a[t]||(a[t]=r&&n[t]||(r?n:i)("Symbol."+t))}).store=a},function(t,e,s){t.exports={default:s(57),__esModule:!0}},function(t,e){var s=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=s)},function(t,e,s){var a=s(11),i=s(41),n=s(26),r=Object.defineProperty;e.f=s(9)?Object.defineProperty:function(t,e,s){if(a(t),e=n(e,!0),a(s),i)try{return r(t,e,s)}catch(t){}if("get"in s||"set"in s)throw TypeError("Accessors not supported!");return"value"in s&&(t[e]=s.value),t}},function(t,e){var s={}.hasOwnProperty;t.exports=function(t,e){return s.call(t,e)}},function(t,e,s){t.exports={default:s(84),__esModule:!0}},function(t,e){var s=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=s)},function(t,e,s){var a=s(4),i=s(13);t.exports=s(9)?function(t,e,s){return a.f(t,e,i(1,s))}:function(t,e,s){return t[e]=s,t}},function(t,e,s){t.exports=!s(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,s){var a=s(64),i=s(23);t.exports=function(t){return a(i(t))}},function(t,e,s){var a=s(12);t.exports=function(t){if(!a(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e){var s=function(t,e,s,a,i){if(Vue.prototype.$qtiApi){var n=e.indexOf("jwt/"),r=e.substring(n,e.length);return void Vue.prototype.$qtiApi.fetch(r,s).then(function(t){a({data:{status:1,recordset:t}})}).catch(function(t){i(t)})}t.get(e,{params:s}).then(function(t){a(t)}).catch(function(t){i(t)})},a=function(t,e,s,a,i){if(Vue.prototype.$qtiApi){var n=e.indexOf("jwt/"),r=e.substring(n,e.length);return void Vue.prototype.$qtiApi.fetch(r,s).then(function(t){a({data:{status:1,recordset:t}})}).catch(function(t){console.log(99999,t),i(t)})}var o="icom_id=4629&user_id="+s.user_id+"&record_data="+encodeURIComponent(s.record_data);t.post(e,o,{headers:{},timeout:6e4}).then(function(t){a(t)}).catch(function(t){i(t)})};t.exports.init_recorddata=function(t,e,s,a){var i={commit_id:"",learn_mode:1,extra:{},version:"1.0",user_id:t.user_id,ctime:0,from_type:1,content_item_id:{course_resource_id:s?e.course_resource_id:t.course_resource_id,dcom_entity_id:s?e.dcom_entity_id:t.dcom_entity_id,publish_id:s?e.publish_id:t.publish_id},client:{system:"win",version:"",device_mode:"pc",machine_id:"",machine_name:"",app_name:"",app_version:"",ebag_version:""},record:[],record_end:{stime:0,etime:0,commitedrecords:[]}};if("wrong"==a?i.from_type=2:"favorite"==a?i.from_type=3:"push"==a&&(i.from_type=4),window.qti_interface&&window.qti_interface.getDeviceInfo){var n=window.JSON.parse(window.qti_interface.getDeviceInfo());i.client.system="and",i.client.version=n.android_version,i.client.device_mode=n.model,i.client.machine_id=n.product_id,i.client.machine_name=n.product_name,i.client.app_name=n.package_name,i.client.app_version=n.version,i.client.ebag_version=n.ebag_version?n.ebag_version:""}if(1==s)i.record[0]={qid:e.mtestid,position_id:e.position_id,stime:(new Date).getTime(),etime:0,rule:{id:"4629"+e.mtype,stype:e.stype,item_type:"score",item:{answer:"SubjectiveQA"==e.stype?"":e.manswer,score:e.mscore,correct:1}}},i.record_end.commitedrecords[0]={position_id:e.position_id,etime:0};else for(var r=0;r<e.length;r++)i.record[r]={qid:e[r].mtestid,position_id:e[r].position_id,stime:0,etime:0,rule:{id:"4629"+e[r].mtype,stype:e[r].stype,item_type:"score",item:{answer:"SubjectiveQA"==e[r].stype?"":e[r].manswer,score:e[r].mscore,correct:1}}},i.record_end.commitedrecords[r]={position_id:e[r].position_id,etime:0};return i.record_end.stime=(new Date).getTime(),i},t.exports.qtichangepage=function(){},deletefraccur=function(t){var e=t.findIndex(function(t,e,s){return"cursor"==t.name});return e>=0&&t.splice(e,1),0},t.exports.removecursor=function(t){for(var e=0;e<t.length;e++)for(var s=0;s<t[e].length;s++){if("cursor"==t[e][s].name)return void t[e].splice(s,1);"fraction"!=t[e][s].name&&"sqrt2"!=t[e][s].name&&"sqrt3"!=t[e][s].name&&"aimsup"!=t[e][s].name&&"aimsub"!=t[e][s].name||(deletefraccur(t[e][s].value.up),deletefraccur(t[e][s].value.down))}},t.exports.getsource=function(t,e,a,i){var n="http://"+e.domain_api+"/jwt/cuoti/record/getSource",r={publish_id:a.publish_id,course_resource_id:a.course_resource_id,dcom_entity_id:a.dcom_entity_id};s(t.$http,n,r,i,function(e){t.$toast("获取错题来源接口失败:"+e.message),console.log(e.message,"error")})},t.exports.getpushdata=function(t,e,a,i,n){var r="http://"+e.domain_api+"/jwt/resource/qti/autopush",o={publish_id:a,user_id:e.user_id,question_id:i};s(t.$http,r,o,n,function(e){t.$toast("获取举一反三接口失败:"+e.message),console.log(e.message,"error")})},t.exports.getbookdata=function(t,e,a,i){var n="http://"+e.domain_api+"/jwt/cuoti/record/get",r={ids:e.book_id};"favorite"==e.book_type&&(n="http://"+e.domain_api+"/jwt/haoti/record/get"),s(t.$http,n,r,a,i)},t.exports.getqtiexam=function(t,e,a,i){var n="",r={publish_id:e.publish_id};"qti_exam"==e.resource_type?(n="http://"+e.domain_api+"/jwt/resource/exam/get",r.exam_id=e.qid):(n="http://"+e.domain_api+"/jwt/resource/qti/get",r.question_id=e.qid),s(t.$http,n,r,a,i)},t.exports.getNowTime=function(t,e,s,a){var i="http://"+e.domain+"/api/?q=json/NowTime/getNowTime&info={}";return t.$http.get(i,{params:{}}).then(function(t){s(t)}).catch(function(t){a(t)}),0},t.exports.recordsave=function(t,e,s,i,n){var r=window.JSON.stringify(s);console.log(112211,r);var o="http://"+e.domain_api+"/jwt/answer/record/save",c={icom_id:4629,user_id:e.user_id,record_data:window.JSON.stringify({data_code:i(r),data:r})};a(t.$http,o,c,function(s){1==s.data.status&&(t.$toast("提交学习记录成功"),navigator.userAgent.match(/CrossWalk/i)&&cordova.exec(null,null,"Scratch","deleteAllFile",[e.user_id,"",n]),void 0!=window.cordova&&navigator.userAgent.match(/iPhone/i)&&cordova.exec(null,null,"HaleyPlugin","draftViewdelete",[e.user_id,n,""])),""==t.setting.book_type&&t.closetimer(),"function"==typeof e.return_function?e.return_function():""==t.setting.book_type&&(t.rootdata.submitflag=1,t.pagenum=0,t.listflag=0)},function(e){if(t.$toast("提交学习记录失败"),console.log(e.message,"error"),t.rootdata.submitflag=0,t.rootdata.submitstatus=0,""==t.setting.book_type){for(var s=0;s<t.testdata.length;s++)t.$children[s].reset();t.getstorage()}else 1==t.pushflag?t.$children[t.pagenum+t.testdata.length].reset():t.$children[t.pagenum].reset(),t.getstorage()})},t.exports.addFavorite=function(t,e,a){var i="http://"+e.domain_api+"/jwt/haoti/common/addFavorite",n={user_id:e.user_id,qid:a.mtestid,publish_id:a.publish_id,course_resource_id:a.course_resource_id,dcom_entity_id:a.dcom_entity_id,position_id:a.position_id};s(t.$http,i,n,function(e){a.is_favorite=1,t.$toast("收藏到好题本")},function(t){console.log("添加收藏失败")})},t.exports.deleteFavorite=function(t,e,a){var i="http://"+e.domain_api+"/jwt/haoti/common/deleteFavorite",n={user_id:e.user_id,qid:a.mtestid};s(t.$http,i,n,function(e){a.is_favorite=0,t.$toast("取消收藏")},function(t){console.log("取消收藏失败")})},t.exports.getdraft=function(t,e,a,i,n,r,o){var c="http://"+e.domain_api+"/jwt/answer/draft/get",d={user_id:e.user_id,qti_question_id:r,publish_id:a,course_resource_id:i,dcom_entity_id:n};s(t.$http,c,d,function(e){console.log("获取草稿本成功"),0==e.data.recordset.length?t.$toast("没有草稿内容哦"):o(e.data.recordset)},function(t){console.log("获取草稿本失败")})},t.exports.addwrongreason=function(t,e,a,i,n,r){var o="http://"+e.domain_api+"/jwt/cuoti/user/addWrongReason",c={user_id:e.user_id,id:a,reason_id:i};s(t.$http,o,c,function(t){n(t)},function(t){r(t)})},t.exports.getqqvideo=function(t,e,a,i){s(t.$http,e,{},function(t){a(t)},function(t){i(t)})},t.exports.getqtirecord=function(t,e,a,i,n){s(t.$http,e,a,function(t){i(t)},function(t){n(t)})},t.exports.imageview=function(t,e){for(var s=new Array,a=new Array,i=0,n=0;n<t.length;n++)n==e?(i=a.length,s[s.length]={url:t[n].file_url,id:i.length,flag:1}):s[s.length]={url:t[n].file_url,id:i.length,flag:0},a[a.length]=t[n].file_url;return navigator.userAgent.match(/iPhone/i)?void window.cordova.exec(null,null,"HaleyPlugin","showXLImageViewer",[a,i]):navigator.userAgent.match(/CrossWalk/i)?void cordova.exec(function(t){console.log("index.js : success = "+t)},function(t){console.log("index.js : fail11 = "+t)},"CompileImage","showPhoto",[a,i,0]):window.qti_interface&&window.qti_interface.imgView?void window.qti_interface.imgView(0,window.JSON.stringify(s),"qtifilechange_edit"):void 0},t.exports.opendraft=function(t,e,s,a,i,n,r){return navigator.userAgent.match(/iPhone/i)?void cordova.exec(function(t){},null,"HaleyPlugin","draftViewStart",[e.user_id,n,r,s,a,i,"http://"+e.domain_api+"/jwt/answer/draft/upload_auth/","http://"+e.domain_api+"/jwt/answer/draft/save/",e.jwt]):navigator.userAgent.match(/CrossWalk/i)?void cordova.exec(function(t){console.log("index.js :clip = "+t)},function(t){console.log("index.js : clipfail = "+t)},"Scratch","scratchModeWithUp",[e.user_id,n,r,s,a,i,"http://"+e.domain_api+"/jwt/answer/draft/upload_auth/","http://"+e.domain_api+"/jwt/answer/draft/save/",e.jwt,"1","2"]):void 0}},function(t,e){var s=function(t){for(var e="",s=0;s<t.length;s++)t.charCodeAt(s)>65248&&t.charCodeAt(s)<65375?e+=String.fromCharCode(t.charCodeAt(s)-65248):e+=String.fromCharCode(t.charCodeAt(s));return e},a=function(t){return t=t.replace(new RegExp("\\+","gim"),"+"),t=t.replace(new RegExp("\\﹢","gim"),"+"),t=t.replace(new RegExp("\\—","gim"),"-"),t=t.replace(new RegExp("\\﹣","gim"),"-"),t=t.replace(new RegExp("\\-","gim"),"-"),t=t.replace(new RegExp("\\‐","gim"),"-"),t=t.replace(new RegExp("\\–","gim"),"-"),t=t.replace(new RegExp("\\=","gim"),"="),t=t.replace(new RegExp("\\(","gim"),"("),t=t.replace(new RegExp("\\)","gim"),")"),t=t.replace(new RegExp("\\‘","gim"),"'"),t=t.replace(new RegExp("\\’","gim"),"'"),t=s(t),t=t.replace(new RegExp("\n","gim"),""),t=t.replace(new RegExp("\t","gim"),""),t=t.replace(new RegExp(" ","gim")," "),t=t.replace(new RegExp("<br>","gim"),""),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(new RegExp("\\ɡ","gim"),"g"),t=t.replace(new RegExp("\\ⅰ","gim"),"i"),t=t.replace(new RegExp("\\ɑ","gim"),"a"),t=t.replace(new RegExp("\\∕","gim"),"/"),t=t.replace(new RegExp("\\¬","gim"),"¬"),t=t.replace(new RegExp("\\≧","gim"),"≥"),t=t.replace(new RegExp("\\≦","gim"),"≤"),t=t.replace(new RegExp("\\☉","gim"),"⊙"),t=t.replace(new RegExp("\\Θ","gim"),"θ"),t=t.replace(new RegExp("\\,","gim"),","),t=t.replace(new RegExp("\\。","gim"),"."),t=t.replace(new RegExp("\\Κ","gim"),"K"),t=t.replace(new RegExp("\\:","gim"),":")};t.exports=a,t.exports.initanswer=function(t){for(var e=new Array,s=0;s<t.length;s++){e[s]=new Array;for(var a=0;a<t[s].length;a++){var i=document.createElement("div");i.innerHTML=t[s][a];for(var n=i.querySelectorAll("img[data_type='mathml-img']"),r=0;r<n.length;r++){var o=n[r].getAttribute("data-mathml-txt"),c=o.indexOf("^");c>0&&c==o.length-2&&(o=o.substring(0,c+1)+"{"+o.substring(c+1)+"}"),c=o.indexOf("_"),c>0&&c==o.length-2&&(o=o.substring(0,c+1)+"{"+o.substring(c+1)+"}"),n[r].outerHTML=o}e[s][a]=i.innerText}}return e},t.exports.initusrans=function(t,e){if("fraction"==e.name){t+="\\frac{";for(var s=0;s<e.value.up.length;s++)"aime"==e.value.up[s].name&&(t+=e.value.up[s].value);t+="}{";for(var a=0;a<e.value.down.length;a++)"aime"==e.value.down[a].name&&(t+=e.value.down[a].value);t+="}"}else if("sqrt2"==e.name){t+="\\sqrt{";for(var i=0;i<e.value.down.length;i++)"aime"==e.value.down[i].name&&(t+=e.value.down[i].value);t+="}"}else if("sqrt3"==e.name){t+="\\sqrt[3]{";for(var n=0;n<e.value.down.length;n++)"aime"==e.value.down[n].name&&(t+=e.value.down[n].value);t+="}"}else if("aimsup"==e.name){t+="\\x{";for(var r=0;r<e.value.up.length;r++)"aime"==e.value.up[r].name&&(t+=e.value.up[r].value);t+="}^{";for(var o=0;o<e.value.down.length;o++)"aime"==e.value.down[o].name&&(t+=e.value.down[o].value);t+="}"}else if("aimsub"==e.name){t+="\\x{";for(var c=0;c<e.value.up.length;c++)"aime"==e.value.up[c].name&&(t+=e.value.up[c].value);t+="}_{";for(var d=0;d<e.value.down.length;d++)"aime"==e.value.down[d].name&&(t+=e.value.down[d].value);t+="}"}return t}},function(t,e){var s=function(){this.mtype=0,this.mtypename="",this.mintro="",this.mscore=0,this.musrscore=0,this.mmain="",this.moptions="",this.mrule=!1,this.mtestnum="-1",this.manswer="",this.mparse="",this.mtip="",this.msubject=0,this.mid=0,this.mtestid="",this.mitemfb=0,this.mmp3str="",this.msubmode=0,this.mdoflag=0,this.msubmitflag=0,this.musrans="",this.mdreaarea="",this.mevent="click",this.msubq="",this.msubqitem="",this.mansmode=0,this.mrank=-1,this.mfillorder=0,this.mkplist="",this.mkpliststr="",this.cognition=[],this.cognitionstr="",this.mcomment="",this.mdiff=0,this.mdiffstr="",this.mbook="",this.mreturn=0,this.playcount=-1,this.submittime=-1,this.mitemoptions="",this.mcorrect_rate=-1,this.mmulchtypestr="",this.mguide="",this.is_favorite=0,this.is_doubt=0,this.showinfoflag=1,this.timenum=0,this.is_done=0,this.teacher_comment="",this.is_marked=0,this.position_id="",this.stype="",this.wrong_count=0,this.done_count=0,this.pushflag=0},a=function(t){return 0==t.indexOf("<p>")&&(t=t.substring(3)),t},i=function t(e,i){var n=new s;if(n.msubject=e.subjectId,n.mtestnum=i,void 0!=e.subnum&&(n.mtestnum=e.subnum),n.mtestnum+="",n.mtestid=e.gid,e.position_id&&(n.position_id=e.position_id),e.kplist){n.mkplist=e.kplist,n.mkpliststr="";for(var r=0;r<n.mkplist.length;r++)r>0&&(n.mkpliststr+=","),n.mkpliststr+=n.mkplist[r].name}if(e.cognition){n.cognition=e.cognition,n.cognitionstr="";for(var r=0;r<n.cognition.length;r++)r>0&&(n.cognitionstr+=";"),n.cognitionstr+=n.cognition[r]}if(e.comment&&(n.mcomment=a(e.comment)),e.difficulty)switch(n.mdiff=e.difficulty,n.mdiffstr="",n.mdiff){case 1:n.mdiffstr="容易";break;case 2:n.mdiffstr="较易";break;case 3:n.mdiffstr="一般";break;case 4:n.mdiffstr="较难";break;case 5:n.mdiffstr="困难";break;case 6:n.mdiffstr="特难"}n.mdiff=e.difficulty,e.book&&(n.mbook=e.book);var o=e.gid;o=o.replace("question:",""),o=o.replace("question_sheet:","");var c=o.indexOf("-subject");c>0&&(o=o.substring(0,c)),n.mid=Math.floor(1e4*Math.random())+o,n.mtype=parseInt(e.qtypeId),n.mtypename=e.qtypeName,""!=e.intro&&(n.mintro=e.intro,n.mintro=n.mintro.replace(new RegExp("<br >","gim"),"")),n.mmain=a(e.prompt),n.mtip=a(e.tip),n.mmain=n.mmain.replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-align[^\\"]+;)[^\\"]*(text-decoration[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.mmain=n.mmain.replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-decoration[^\\"]+;)[^\\"]*(text-align[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.mmain=n.mmain.replace(new RegExp('<(span)([^>]*)style=\\"[^\\"]*font[^\\"]*\\">',"gim"),"<$1$2>"),n.mmain=n.mmain.replace(new RegExp("<br><br","gim"),"<br"),n.moptions={};var r=0;if(1==n.mtype&&(n.stype="QtiTrueFalse"),2==n.mtype&&(n.stype="QtiSingleChoice"),3!=n.mtype&&6!=n.mtype||(n.stype="QtiMultipleChoice"),4==n.mtype&&(n.stype="QtiFill"),9==n.mtype&&(n.stype="QtiAssociate"),15==n.mtype&&(n.stype="QtiOrder"),20==n.mtype&&(n.stype="WordFill"),21==n.mtype&&(n.stype="WordOrder"),n.mtype>=23&&n.mtype<=26&&(n.stype="QtiVertical"),(5==n.mtype||7==n.mtype||8==n.mtype||n.mtype>=27&&n.mtype<=32)&&(n.stype="SubjectiveQA"),33!=n.mtype&&39!=n.mtype||(n.stype="QtiCalc"),38==n.mtype&&(n.stype="QtiChartFill"),40==n.mtype&&(n.stype="QtiFillPaint"),3==n.mtype&&e&&1==e.scoretype&&(n.mfillorder=e.scoretype,n.stype="QtiHalfMulCh"),4==n.mtype&&e&&1==e.aorder&&(n.mfillorder=1,n.stype="QtiFillOrder"),9!=n.mtype&&15!=n.mtype||e&&e.rule&&(n.mrule=e.rule),29==n.mtype||31==n.mtype)n.manswer=e.answer,n.mguide=e.guide;else if(27==n.mtype)n.manswer=e.answer;else if(17==n.mtype){n.mmp3str=e.audio,e.playcount&&(0==e.playcount?n.playcount=-1:n.playcount=e.playcount);var d=e.items.length;n.msubqitem=new Array,n.msubq=new Array;for(var l=0;l<d;l++){n.msubqitem[l]=e.items[l];var u="("+(l+1)+")";1==d&&(u="-1"),n.msubq[l]=t(e.items[l],u),l==d-1&&(n.msubq[l].book=e.book,n.msubq[l].kplist=e.kplist,n.msubq[l].comment=e.comment,n.msubq[l].difficulty=e.difficulty)}}else if(12==n.mtype||16==n.mtype||37==n.mtype){var d=e.items.length;n.msubqitem=new Array,n.msubq=new Array;for(var l=0;l<d;l++){n.msubqitem[l]=e.items[l];var u="("+(l+1)+")";1==d&&(u="-1"),n.msubq[l]=t(e.items[l],u),l==d-1&&(n.msubq[l].book=e.book,n.msubq[l].kplist=e.kplist,n.msubq[l].comment=e.comment,n.msubq[l].difficulty=e.difficulty)}}else if(11==n.mtype){var d=e.items.length;n.manswer=new Array,n.mitemoptions=new Array;for(var l=0;l<d;l++){n.manswer[l]=e.items[l].answer,n.mitemoptions[l]=e.items[l].options;for(var h in n.mitemoptions[l])n.mitemoptions[l][h]=n.mitemoptions[l][h].replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-align[^\\"]+;)[^\\"]*(text-decoration[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.mitemoptions[l][h]=n.mitemoptions[l][h].replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-decoration[^\\"]+;)[^\\"]*(text-align[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.mitemoptions[l][h]=n.mitemoptions[l][h].replace(new RegExp('<(span)([^>]*)style=\\"[^\\"]*font[^\\"]*\\">',"gim"),"<$1$2>"),r++}}else if(38==n.mtype)n.manswer=e.answer,n.mdreaarea=e.drawarea,e&&1==e.aorder&&(n.mfillorder=1,n.stype="QtiChartFillOrder");else if(40==n.mtype)n.manswer=e.template_answer,n.mmain=e.template_prompt,n.intro=e.prompt,n.mmulchtypestr=e.answer;else if(35==n.mtype){var d=e.items.length;n.msubqitem=new Array,n.msubq=new Array;for(var l=0;l<d;l++)n.msubqitem[l]=e.items[l],l==d-1&&(n.msubqitem[l].book=e.book,n.msubqitem[l].kplist=e.kplist,n.msubqitem[l].comment=e.comment,n.msubqitem[l].difficulty=e.difficulty)}else{for(var h in e.options){n.moptions[h]=e.options[h],n.moptions[h]=n.moptions[h].replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-align[^\\"]+;)[^\\"]*(text-decoration[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.moptions[h]=n.moptions[h].replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-decoration[^\\"]+;)[^\\"]*(text-align[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.moptions[h]=n.moptions[h].replace(new RegExp('<(span)([^>]*)style=\\"[^\\"]*font[^\\"]*\\">',"gim"),"<$1$2>");var c=n.moptions[h].indexOf("<p>");0==c?n.moptions[h]=n.moptions[h].substring(3,n.moptions[h].length):0==(c=n.moptions[h].indexOf("<p >"))&&(n.moptions[h]=n.moptions[h].substring(4,n.moptions[h].length)),n.moptions[h]=n.moptions[h].replace(new RegExp("<br><br","gim"),"<br"),r++}n.manswer=e.answer}if((5==n.mtype||7==n.mtype||n.mtype>=27&&n.mtype<=32)&&(n.manswer=a(n.manswer)),4==n.mtype||40==n.mtype||38==n.mtype)for(var m=0;m<n.manswer.length;m++)for(var p=0;p<n.manswer[m].length;p++)n.manswer[m][p]=n.manswer[m][p].replace(new RegExp("<br>","gim"),""),n.manswer[m][p]=n.manswer[m][p].replace(new RegExp("<br >","gim"),"");return n.mparse=a(e.parse),n.mparse=n.mparse.replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-align[^\\"]+;)[^\\"]*(text-decoration[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.mparse=n.mparse.replace(new RegExp('<(span|p)([^>]*)style=\\"[^\\"]*(text-decoration[^\\"]+;)[^\\"]*(text-align[^\\"]+;){0,}[^\\"]*\\"([^>]*)>',"gim"),'<$1$2style="$3$4"$5>'),n.mparse=n.mparse.replace(new RegExp('<(span)([^>]*)style=\\"[^\\"]*font[^\\"]*\\">',"gim"),"<$1$2>"),n.mscore=e.score,navigator.userAgent.match(/Android/i)&&(n.mevent="touchend"),n};t.exports=i},function(t,e,s){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=s(58),n=a(i),r=s(73),o=a(r),c="function"==typeof o.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};e.default="function"==typeof o.default&&"symbol"===c(n.default)?function(t){return void 0===t?"undefined":c(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":c(t)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var s=0,a=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++s+a).toString(36))}},function(e,s){e.exports=t},function(t,e){var s=Math.ceil,a=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?a:s)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!0},function(t,e,s){var a=s(3),i=s(7),n=s(40),r=s(8),o=s(5),c=function(t,e,s){var d,l,u,h=t&c.F,m=t&c.G,p=t&c.S,g=t&c.P,f=t&c.B,v=t&c.W,_=m?i:i[e]||(i[e]={}),y=_.prototype,w=m?a:p?a[e]:(a[e]||{}).prototype;m&&(s=e);for(d in s)(l=!h&&w&&void 0!==w[d])&&o(_,d)||(u=l?w[d]:s[d],_[d]=m&&"function"!=typeof w[d]?s[d]:f&&l?n(u,a):v&&w[d]==u?function(t){var e=function(e,s,a){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,s)}return new t(e,s,a)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(u):g&&"function"==typeof u?n(Function.call,u):u,g&&((_.virtual||(_.virtual={}))[d]=u,t&c.R&&y&&!y[d]&&r(y,d,u)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,s){var a=s(12);t.exports=function(t,e){if(!a(t))return t;var s,i;if(e&&"function"==typeof(s=t.toString)&&!a(i=s.call(t)))return i;if("function"==typeof(s=t.valueOf)&&!a(i=s.call(t)))return i;if(!e&&"function"==typeof(s=t.toString)&&!a(i=s.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,s){var a=s(45),i=s(31);t.exports=Object.keys||function(t){return a(t,i)}},function(t,e){var s={}.toString;t.exports=function(t){return s.call(t).slice(8,-1)}},function(t,e,s){var a=s(30)("keys"),i=s(20);t.exports=function(t){return a[t]||(a[t]=i(t))}},function(t,e,s){var a=s(3),i=a["__core-js_shared__"]||(a["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,s){var a=s(4).f,i=s(5),n=s(1)("toStringTag");t.exports=function(t,e,s){t&&!i(t=s?t:t.prototype,n)&&a(t,n,{configurable:!0,value:e})}},function(t,e,s){e.f=s(1)},function(t,e,s){var a=s(3),i=s(7),n=s(24),r=s(33),o=s(4).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=n?{}:a.Symbol||{});"_"==t.charAt(0)||t in e||o(e,t,{value:r.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,s){var a;!function(i){"use strict";function n(t,e){var s=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(s>>16)<<16|65535&s}function r(t,e){return t<<e|t>>>32-e}function o(t,e,s,a,i,o){return n(r(n(n(e,t),n(a,o)),i),s)}function c(t,e,s,a,i,n,r){return o(e&s|~e&a,t,e,i,n,r)}function d(t,e,s,a,i,n,r){return o(e&a|s&~a,t,e,i,n,r)}function l(t,e,s,a,i,n,r){return o(e^s^a,t,e,i,n,r)}function u(t,e,s,a,i,n,r){return o(s^(e|~a),t,e,i,n,r)}function h(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var s,a,i,r,o,h=1732584193,m=-271733879,p=-1732584194,g=271733878;for(s=0;s<t.length;s+=16)a=h,i=m,r=p,o=g,h=c(h,m,p,g,t[s],7,-680876936),g=c(g,h,m,p,t[s+1],12,-389564586),p=c(p,g,h,m,t[s+2],17,606105819),m=c(m,p,g,h,t[s+3],22,-1044525330),h=c(h,m,p,g,t[s+4],7,-176418897),g=c(g,h,m,p,t[s+5],12,1200080426),p=c(p,g,h,m,t[s+6],17,-1473231341),m=c(m,p,g,h,t[s+7],22,-45705983),h=c(h,m,p,g,t[s+8],7,1770035416),g=c(g,h,m,p,t[s+9],12,-1958414417),p=c(p,g,h,m,t[s+10],17,-42063),m=c(m,p,g,h,t[s+11],22,-1990404162),h=c(h,m,p,g,t[s+12],7,1804603682),g=c(g,h,m,p,t[s+13],12,-40341101),p=c(p,g,h,m,t[s+14],17,-1502002290),m=c(m,p,g,h,t[s+15],22,1236535329),h=d(h,m,p,g,t[s+1],5,-165796510),g=d(g,h,m,p,t[s+6],9,-1069501632),p=d(p,g,h,m,t[s+11],14,643717713),m=d(m,p,g,h,t[s],20,-373897302),h=d(h,m,p,g,t[s+5],5,-701558691),g=d(g,h,m,p,t[s+10],9,38016083),p=d(p,g,h,m,t[s+15],14,-660478335),m=d(m,p,g,h,t[s+4],20,-405537848),h=d(h,m,p,g,t[s+9],5,568446438),g=d(g,h,m,p,t[s+14],9,-1019803690),p=d(p,g,h,m,t[s+3],14,-187363961),m=d(m,p,g,h,t[s+8],20,1163531501),h=d(h,m,p,g,t[s+13],5,-1444681467),g=d(g,h,m,p,t[s+2],9,-51403784),p=d(p,g,h,m,t[s+7],14,1735328473),m=d(m,p,g,h,t[s+12],20,-1926607734),h=l(h,m,p,g,t[s+5],4,-378558),g=l(g,h,m,p,t[s+8],11,-2022574463),p=l(p,g,h,m,t[s+11],16,1839030562),m=l(m,p,g,h,t[s+14],23,-35309556),h=l(h,m,p,g,t[s+1],4,-1530992060),g=l(g,h,m,p,t[s+4],11,1272893353),p=l(p,g,h,m,t[s+7],16,-155497632),m=l(m,p,g,h,t[s+10],23,-1094730640),h=l(h,m,p,g,t[s+13],4,681279174),g=l(g,h,m,p,t[s],11,-358537222),p=l(p,g,h,m,t[s+3],16,-722521979),m=l(m,p,g,h,t[s+6],23,76029189),h=l(h,m,p,g,t[s+9],4,-640364487),g=l(g,h,m,p,t[s+12],11,-421815835),p=l(p,g,h,m,t[s+15],16,530742520),m=l(m,p,g,h,t[s+2],23,-995338651),h=u(h,m,p,g,t[s],6,-198630844),g=u(g,h,m,p,t[s+7],10,1126891415),p=u(p,g,h,m,t[s+14],15,-1416354905),m=u(m,p,g,h,t[s+5],21,-57434055),h=u(h,m,p,g,t[s+12],6,1700485571),g=u(g,h,m,p,t[s+3],10,-1894986606),p=u(p,g,h,m,t[s+10],15,-1051523),m=u(m,p,g,h,t[s+1],21,-2054922799),h=u(h,m,p,g,t[s+8],6,1873313359),g=u(g,h,m,p,t[s+15],10,-30611744),p=u(p,g,h,m,t[s+6],15,-1560198380),m=u(m,p,g,h,t[s+13],21,1309151649),h=u(h,m,p,g,t[s+4],6,-145523070),g=u(g,h,m,p,t[s+11],10,-1120210379),p=u(p,g,h,m,t[s+2],15,718787259),m=u(m,p,g,h,t[s+9],21,-343485551),h=n(h,a),m=n(m,i),p=n(p,r),g=n(g,o);return[h,m,p,g]}function m(t){var e,s="";for(e=0;e<32*t.length;e+=8)s+=String.fromCharCode(t[e>>5]>>>e%32&255);return s}function p(t){var e,s=[];for(s[(t.length>>2)-1]=void 0,e=0;e<s.length;e+=1)s[e]=0;for(e=0;e<8*t.length;e+=8)s[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return s}function g(t){return m(h(p(t),8*t.length))}function f(t,e){var s,a,i=p(t),n=[],r=[];for(n[15]=r[15]=void 0,i.length>16&&(i=h(i,8*t.length)),s=0;16>s;s+=1)n[s]=909522486^i[s],r[s]=1549556828^i[s];return a=h(n.concat(p(e)),512+8*e.length),m(h(r.concat(a),640))}function v(t){var e,s,a="0123456789abcdef",i="";for(s=0;s<t.length;s+=1)e=t.charCodeAt(s),i+=a.charAt(e>>>4&15)+a.charAt(15&e);return i}function _(t){return unescape(encodeURIComponent(t))}function y(t){return g(_(t))}function w(t){return v(y(t))}function b(t,e){return f(_(t),_(e))}function k(t,e){return v(b(t,e))}function x(t,e,s){return e?s?b(e,t):k(e,t):s?y(t):w(t)}void 0!==(a=function(){return x}.call(e,s,e,t))&&(t.exports=a)}()},function(t,e){},function(t,e,s){"use strict";var a=s(60)(!0);s(39)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,s=this._i;return s>=e.length?{value:void 0,done:!0}:(t=a(e,s),this._i+=t.length,{value:t,done:!1})})},function(t,e,s){"use strict";var a=s(24),i=s(25),n=s(43),r=s(8),o=s(14),c=s(62),d=s(32),l=s(68),u=s(1)("iterator"),h=!([].keys&&"next"in[].keys()),m=function(){return this};t.exports=function(t,e,s,p,g,f,v){c(s,e,p);var _,y,w,b=function(t){if(!h&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new s(this,t)}}return function(){return new s(this,t)}},k=e+" Iterator",x="values"==g,q=!1,C=t.prototype,$=C[u]||C["@@iterator"]||g&&C[g],E=$||b(g),Q=g?x?b("entries"):E:void 0,T="Array"==e?C.entries||$:$;if(T&&(w=l(T.call(new t)))!==Object.prototype&&w.next&&(d(w,k,!0),a||"function"==typeof w[u]||r(w,u,m)),x&&$&&"values"!==$.name&&(q=!0,E=function(){return $.call(this)}),a&&!v||!h&&!q&&C[u]||r(C,u,E),o[e]=E,o[k]=m,g)if(_={values:x?E:b("values"),keys:f?E:b("keys"),entries:Q},v)for(y in _)y in C||n(C,y,_[y]);else i(i.P+i.F*(h||q),e,_);return _}},function(t,e,s){var a=s(61);t.exports=function(t,e,s){if(a(t),void 0===e)return t;switch(s){case 1:return function(s){return t.call(e,s)};case 2:return function(s,a){return t.call(e,s,a)};case 3:return function(s,a,i){return t.call(e,s,a,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,s){t.exports=!s(9)&&!s(19)(function(){return 7!=Object.defineProperty(s(42)("div"),"a",{get:function(){return 7}}).a})},function(t,e,s){var a=s(12),i=s(3).document,n=a(i)&&a(i.createElement);t.exports=function(t){return n?i.createElement(t):{}}},function(t,e,s){t.exports=s(8)},function(t,e,s){var a=s(11),i=s(63),n=s(31),r=s(29)("IE_PROTO"),o=function(){},c=function(){var t,e=s(42)("iframe"),a=n.length;for(e.style.display="none",s(67).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;a--;)delete c.prototype[n[a]];return c()};t.exports=Object.create||function(t,e){var s;return null!==t?(o.prototype=a(t),s=new o,o.prototype=null,s[r]=t):s=c(),void 0===e?s:i(s,e)}},function(t,e,s){var a=s(5),i=s(10),n=s(65)(!1),r=s(29)("IE_PROTO");t.exports=function(t,e){var s,o=i(t),c=0,d=[];for(s in o)s!=r&&a(o,s)&&d.push(s);for(;e.length>c;)a(o,s=e[c++])&&(~n(d,s)||d.push(s));return d}},function(t,e,s){var a=s(22),i=Math.min;t.exports=function(t){return t>0?i(a(t),9007199254740991):0}},function(t,e,s){var a=s(23);t.exports=function(t){return Object(a(t))}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,s){var a=s(45),i=s(31).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return a(t,i)}},function(t,e,s){t.exports=s.p+"static/img/success.0ddbaa3.gif"},function(t,e,s){"use strict";function a(t){Ss||s(53)}Object.defineProperty(e,"__esModule",{value:!0});var i=(s(37),s(2)),n=s.n(i),r=s(18),o=s.n(r),c=s(15),d=s.n(c),l={name:"Qtibase",props:["testdata","setting","rootdata"],data:function(){return{righttext:"恭喜你,回答正确。",wrongtext:"很遗憾,回答错误。",halftext:"回答未全对,继续努力。"}},created:function(){"PREVIEWOR"==this.setting.caller&&"teacher"==this.setting.role&&(this.righttext="回答正确。",this.wrongtext="回答错误。",this.halftext="回答未全对。",this.testdata.mansmode=1),"EBAG"!=this.setting.caller||""==this.setting.publish_id&&!this.setting.book_type||""==this.setting.user_id||this.getqtirecord(),"PREVIEWOR"==this.setting.caller&&(""!=this.setting.user_id?this.getqtirecord():(this.testdata.msubmitflag=1,this.testdata.showinfoflag=0,this.$emit("setsubmit",this.testdata.manswer)))},computed:{qti_typediffstr:function(){var t=this.testdata.mtypename;return""!=this.testdata.mdiffstr&&(t=t+"<label>|</label>"+this.testdata.mdiffstr),t},no_slot_flag:function(){return""==this.setting.user_id&&"PREVIEWOR"==this.setting.caller?1:this.testdata.mtype>3&&21!=this.testdata.mtype&&6!=this.testdata.mtype&&11!=this.testdata.mtype},no_explain_flag:function(){return"PREVIEWOR"==this.setting.caller?this.testdata.mtip+this.testdata.cognitionstr+this.testdata.mkpliststr+this.testdata.mparse+this.testdata.mcomment=="":this.subject_flag?this.testdata.mmulchtypestr+this.testdata.cognitionstr+this.testdata.mkpliststr+this.testdata.mdiffstr+this.testdata.mparse+this.testdata.mcomment=="":this.testdata.cognitionstr+this.testdata.mkpliststr+this.testdata.mdiffstr+this.testdata.mparse+this.testdata.mcomment==""},subject_flag:function(){return 5==this.testdata.mtype||7==this.testdata.mtype||8==this.testdata.mtype||40==this.testdata.mtype||this.testdata.mtype>=27&&this.testdata.mtype<=32},answer_flag:function(){return 5==this.testdata.mtype||7==this.testdata.mtype||8==this.testdata.mtype||33==this.testdata.mtype||40==this.testdata.mtype||this.testdata.mtype>=27&&this.testdata.mtype<=32}},mounted:function(){for(var t=this.$el.querySelectorAll("[type=audio]"),e=0;e<t.length;e++)""==t[e].className&&(t[e].className="audio-preview",t[e].addEventListener("click",this.clickaudio));for(var s=this.$el.querySelectorAll("[type=video]"),a=0;a<s.length;a++)""==s[a].className&&(s[a].className="video-preview",s[a].addEventListener("click",this.clickvideo));if(1==this.rootdata.screenflag)for(var i=this.$el.querySelectorAll("[data_type='mathml-img']"),n=0;n<i.length;n++)i[n].addEventListener("load",this.imgload)},methods:{opentipdialog:function(){this.rootdata.opendialog("tip",this.testdata.mtip,function(){alert(1)})},setebagrecord:function(t){var e=this;if(null==t.qti_data&&(t.qti_data=t.qti_record),t.done_count&&(this.testdata.wrong_count=t.wrong_count,this.testdata.done_count=t.done_count),this.setting.book_type)return 4!=t.publish_status.status&&1!=t.qti_data.show_answer||(this.testdata.mansmode=1),this.testdata.is_favorite=t.qti_data.is_favorite,(20==this.testdata.mtype||38==this.testdata.mtype||4==this.testdata.mtype||this.testdata.mtype>=23&&this.testdata.mtype<=26)&&(this.$emit("setsubmit",t.qti_data.answer),this.testdata.mcorrect_rate=t.qti_data.correct_rate,this.$emit("reset")),this.getautopushdata(t.pushflag),this.testdata.mscore=t.qti_data.should_score,void(""==this.testdata.mscore&&(this.testdata.mscore=100));this.testdata.is_favorite=t.qti_data.is_favorite,t.qti_data.answer.length>0&&("EBAG"==this.setting.caller&&this.rootdata.imshow&&this.$nextTick(function(){setTimeout(function(){e.$closeanoahim()},500)}),this.rootdata.submitflag=1,this.testdata.msubmitflag=1,this.testdata.mcorrect_rate=t.qti_data.correct_rate,this.testdata.timenum=parseInt(t.qti_data.time_length/1e3),4!=t.publish_status.status&&1!=t.qti_data.show_answer||(this.testdata.mansmode=1),this.$emit("setsubmit",t.qti_data.answer),1==this.testdata.mcorrect_rate&&this.getautopushdata(t.pushflag)),4!=t.publish_status.status&&1!=t.qti_data.show_answer||(this.testdata.mansmode=1,t.publish_status.marked>0&&(this.testdata.is_marked=t.publish_status.marked),-1==this.rootdata.score&&(this.rootdata.score=0),-1!=t.qti_data.correct_rate&&(this.rootdata.score=parseFloat(this.rootdata.score)+t.qti_data.correct_rate*t.qti_data.should_score,this.rootdata.score=parseFloat(this.rootdata.score).toFixed(2),this.rootdata.score=this.rootdata.score.replace(".00","")),t.qti_data.comment&&(this.testdata.teacher_comment=t.qti_data.comment)),this.testdata.mscore=t.qti_data.should_score},getautopushdata:function(t){0==t&&(this.testdata.pushflag=1)},setprevrecord:function(t){this.testdata.msubmitflag=1,t.qti_data.answer.length>0?(this.testdata.mcorrect_rate=t.qti_data.correct_rate,this.testdata.is_favorite=t.qti_data.is_favorite,this.$emit("setsubmit",t.qti_data.answer)):this.testdata.showinfoflag=0,this.testdata.mscore=t.qti_data.should_score},getqtirecord:function(){var t=this;if(""!=this.setting.qti_record)return this.testdata.msubmitflag=1,this.testdata.mcorrect_rate=this.setting.qti_record.correct_rate,this.testdata.is_favorite=this.setting.qti_record.is_favorite,this.testdata.mscore=this.setting.qti_record.should_score,void this.$emit("setsubmit",this.setting.qti_record.answer);var e="http://"+this.setting.domain_api+"/jwt/answer/record/get",s={user_id:this.setting.user_id,qid:this.testdata.mtestid,publish_id:this.setting.publish_id,course_resource_id:this.setting.course_resource_id,dcom_entity_id:this.setting.dcom_entity_id,position_id:"",last:0};this.setting.book_type&&(s.publish_id=this.testdata.publish_id,s.course_resource_id=this.testdata.course_resource_id,s.dcom_entity_id=this.testdata.dcom_entity_id,s.position_id=this.testdata.position_id,s.last=this.rootdata.bookflag),d.a.getqtirecord(this,e,s,function(e){t.setebagrecord(e.data.recordset)},function(e){t.$toast("获取学习记录接口失败:"+e.message),console.log(e.message,"error")})},clickaudio:function(t){t.stopPropagation();var e=t.currentTarget.getAttribute("url");this.$mp3player(e,t.currentTarget)},clickvideo:function(t){var e=this;if(t.stopPropagation(),this.$mp3playerpause(),1==this.rootdata.imshow&&this.$closeanoahim(),"avy"==t.currentTarget.getAttribute("format")){var s=t.currentTarget.getAttribute("value"),a="http://"+this.setting.domain+"/api_cache/?q=json/apps/qqvideo/url&info={%22id%22:%22"+encodeURI(s)+"%22}";return void d.a.getqqvideo(this,a,function(t){if(t.data.recordset.length>0){var s=t.data.recordset[0].hdHlsUrl;console.log(s),e.$tcplayer(s,e.setting.domain)}},function(t){e.$toast("获取视频信息接口失败:"+t.message),console.log(t.message,"error")})}var i=t.currentTarget.getAttribute("url");console.log(i),this.$tcplayer(i,this.setting.domain)},imgload:function(t){var e=t.path[0];e.setAttribute("width",1.2*e.naturalWidth)}},updated:function(){}},u=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"qti_question"},[s("div",{staticClass:"qti_body"},["EBAG"==t.setting.caller?[1==t.rootdata.screenflag?[-1!=t.testdata.mtestnum?s("span",{staticClass:"qtitypename"},[t._v(t._s(t.testdata.mtestnum+"."))]):t._e(),t._v(" "),s("span",{staticClass:"qtitypename"},[t._v(t._s(t.testdata.mtypename))]),t._v(" "),t.testdata.mscore>0&&t.testdata.mmulchtypestr&&"QtiMultipleChoice"==t.testdata.stype?s("span",[t._v("("+t._s(t.testdata.mscore)+"分,"+t._s(t.testdata.mmulchtypestr)+")")]):t.testdata.mscore>0?s("span",[t._v("("+t._s(t.testdata.mscore)+"分)")]):t.testdata.mmulchtypestr&&"QtiMultipleChoice"==t.testdata.stype?s("span",[t._v("("+t._s(t.testdata.mmulchtypestr)+")")]):t._e(),t._v(" "),s("br")]:void 0]:"PREVIEWOR"==t.setting.caller?[-1!=t.testdata.mtestnum?s("span",{staticClass:"qtitypename"},[t._v(t._s(t.testdata.mtestnum)+".")]):t._e(),t._v(" "),"QtiVertical"==t.testdata.stype&&-1!=t.testdata.mtestnum?s("br"):t._e()]:t._e(),t._v(" "),t._t("body")],2),t._v(" "),t._t("options"),t._v(" "),"EBAG"==t.setting.caller&&""!=t.testdata.mtip?s("div",[s("a",{staticClass:"qtitipa",on:{click:t.opentipdialog}})]):t._e(),t._v(" "),"EBAG"==t.setting.caller&&20==t.testdata.mtype&&0==t.testdata.msubmitflag&&"EBAG"==t.setting.caller&&2==t.rootdata.screenflag?s("div",{staticStyle:{height:"38vh",display:"inline-block"}}):t._e(),t._v(" "),"PREVIEWOR"==t.setting.caller?s("div",{staticClass:"qti_typediff"},[s("div",{class:{noborder:1==t.setting.hide_result&&"PREVIEWOR"==t.setting.caller||t.no_slot_flag&&t.no_explain_flag},domProps:{innerHTML:t._s(t.qti_typediffstr)}})]):t._e(),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.testdata.msubmitflag,expression:"testdata.msubmitflag==1"}],staticClass:"qti_result",class:{nomargin:"PREVIEWOR"==t.setting.caller,hide:1==t.setting.hide_result&&"PREVIEWOR"==t.setting.caller||1==t.testdata.msubmitflag&&-1==t.rootdata.score&&-1==t.testdata.mcorrect_rate}},[s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.testdata.showinfoflag,expression:"testdata.showinfoflag==1"}],staticClass:"qti_result_info"},[0==t.testdata.mcorrect_rate||null==t.testdata.mcorrect_rate?s("div",{staticClass:"qti_wrong"},[t._v(t._s(t.wrongtext))]):1==t.testdata.mcorrect_rate?s("div",{staticClass:"qti_right"},[t._v(t._s(t.righttext))]):t.testdata.mcorrect_rate>0?s("div",{staticClass:"qti_halfright"},[t._v(t._s(t.halftext))]):t._e(),t._v(" "),t.testdata.mcorrect_rate>0&&(2==t.rootdata.screenflag||"PREVIEWOR"==t.setting.caller)?s("br"):t._e(),t._v(" "),t.testdata.mcorrect_rate>0&&1==t.testdata.mansmode?s("div",{staticClass:"qti_iclass_text red"},[s("span",{staticStyle:{color:"#1e1e1e"}},[t._v("本题得分:")]),t._v(t._s(parseInt(t.testdata.mscore*t.testdata.mcorrect_rate*10+.5)/10)+"分")]):t._e(),t._v(" "),t._t("showansbn"),t._v(" "),""!=t.testdata.teacher_comment||0!=t.testdata.is_marked?s("div",{staticClass:"qti_user_paint",class:{border:t.testdata.mcorrect_rate>=0,nopadding_l:t.subject_flag}},[t.testdata.is_marked?s("div",{staticClass:"marked"},[t._v("已阅")]):t._e(),t._v(" "),""!=t.testdata.teacher_comment?s("div",{staticClass:"comment"},[t._v("批改意见:\n "),s("span",{domProps:{innerHTML:t._s(t.testdata.teacher_comment)}})]):t._e()]):t._e()],2),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.testdata.mansmode,expression:"testdata.mansmode==1"}],staticClass:"qti_result_explain",class:{nopadding_bt:t.no_slot_flag&&t.no_explain_flag,nopadding_l:""==t.testdata.mmulchtypestr&&t.subject_flag}},[""!=t.setting.user_id||"PREVIEWOR"!=t.setting.caller?t._t("standard"):t._e(),t._v(" "),2==t.rootdata.screenflag?s("div",{directives:[{name:"show",rawName:"v-show",value:!t.no_explain_flag,expression:"!no_explain_flag"}],staticClass:"qti_explain"},[t.answer_flag&&""!=t.testdata.mmulchtypestr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("参考答案:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mmulchtypestr)}})]):t._e(),t._v(" "),""!=t.testdata.mkpliststr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("知识点:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mkpliststr)}})]):t._e(),t._v(" "),""!=t.testdata.cognitionstr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("认知维度:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.cognitionstr)}})]):t._e(),t._v(" "),""!=t.testdata.mdiffstr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("难 度:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mdiffstr)}})]):t._e(),t._v(" "),""!=t.testdata.mparse?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("解 析:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mparse)}})]):t._e(),t._v(" "),""!=t.testdata.mcomment?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("点 评:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mcomment)}})]):t._e()]):s("div",{directives:[{name:"show",rawName:"v-show",value:!t.no_explain_flag,expression:"!no_explain_flag"}],staticClass:"qti_explain"},["PREVIEWOR"==t.setting.caller&&""!=t.testdata.mtip?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("提 示:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mtip)}})]):t._e(),t._v(" "),t.answer_flag&&""!=t.testdata.mmulchtypestr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("参考答案:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mmulchtypestr)}})]):t._e(),t._v(" "),""!=t.testdata.mkpliststr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("知识点:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mkpliststr)}})]):t._e(),t._v(" "),""!=t.testdata.cognitionstr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("认知维度:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.cognitionstr)}})]):t._e(),t._v(" "),"PREVIEWOR"!=t.setting.caller&&""!=t.testdata.mdiffstr?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("难 度:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mdiffstr)}})]):t._e(),t._v(" "),""!=t.testdata.mparse?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("解 析:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mparse)}})]):t._e(),t._v(" "),""!=t.testdata.mcomment?s("div",{staticClass:"line"},[s("span",{staticClass:"linetitle"},[t._v("点 评:")]),t._v(" "),s("span",{domProps:{innerHTML:t._s(t.testdata.mcomment)}})]):t._e()])],2)])],2)},h=[];u._withStripped=!0;var m={render:u,staticRenderFns:h},p=m,g=s(0),f=g(l,p,!1,null,null,null);f.options.__file="src\\components\\qti\\qtibase\\qtibase.vue";var v=f.exports,_={name:"Qtich",props:["testdata","setting","rootdata"],data:function(){return{test:"444"}},created:function(){1==this.testdata.mtype&&(this.testdata.moptions.T="√",this.testdata.moptions.F="X")},methods:{optionclick:function(t){0==this.testdata.msubmitflag&&(this.testdata.musrans=t)},isanswer:function(){""!=this.testdata.musrans?this.testdata.is_done=1:this.testdata.is_done=0},getusrans:function(){return this.testdata.musrans},setusrans:function(){},reset:function(){this.testdata.msubmitflag=0,this.testdata.musrans=""},submit:function(){this.testdata.msubmitflag=1,this.testdata.musrans==this.testdata.manswer?(this.testdata.mcorrect_rate=1,this.testdata.musrscore=this.testdata.mscore):(this.testdata.mcorrect_rate=0,this.testdata.musrscore=0),this.testdata.result={time:1e3*this.testdata.timenum,answer:this.testdata.musrans,score:this.testdata.musrscore,rate:this.testdata.mcorrect_rate,correct:parseInt(this.testdata.mcorrect_rate)}},setsubmit:function(t){"PREVIEWOR"==this.setting.caller&&""==this.setting.user_id?this.testdata.musrans=t:this.testdata.musrans=t[0].answer}},components:{Qtibase:v}},y=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("Qtibase",{attrs:{testdata:t.testdata,setting:t.setting,rootdata:t.rootdata},on:{setsubmit:t.setsubmit}},[s("span",{attrs:{slot:"body"},domProps:{innerHTML:t._s(t.testdata.mmain)},slot:"body"}),t._v(" "),s("div",{staticClass:"qti_options nopadding",attrs:{slot:"options"},slot:"options"},[1==t.testdata.mtype?t._l(t.testdata.moptions,function(e,a){return s("div",{key:a,class:["optionsdiv tf",{previewor:"PREVIEWOR"==t.setting.caller,noactive:1==t.testdata.msubmitflag}],on:{click:function(e){t.optionclick(a)}}},[s("div",{class:["qtiradio",{checked:t.testdata.musrans==a,false:1==t.testdata.msubmitflag,green:1==t.testdata.msubmitflag&&t.testdata.manswer==a&&(1==t.testdata.mcorrect_rate||1==t.testdata.mansmode),red:1==t.testdata.msubmitflag&&t.testdata.musrans==a&&0==t.testdata.mcorrect_rate}],attrs:{value:a}},[t._v(t._s(1==t.rootdata.screenflag?"":e))]),t._v(" "),1==t.rootdata.screenflag?s("div",{staticClass:"optionlabeldiv",domProps:{innerHTML:t._s(e)}}):t._e()])}):t._l(t.testdata.moptions,function(e,a){return s("div",{key:a,class:["optionsdiv",{previewor:"PREVIEWOR"==t.setting.caller,noactive:1==t.testdata.msubmitflag}],on:{click:function(e){t.optionclick(a)}}},[s("div",{class:["qtiradio",{checked:t.testdata.musrans==a,false:1==t.testdata.msubmitflag,green:1==t.testdata.msubmitflag&&t.testdata.manswer==a&&(1==t.testdata.mcorrect_rate||1==t.testdata.mansmode),red:1==t.testdata.msubmitflag&&t.testdata.musrans==a&&0==t.testdata.mcorrect_rate}],attrs:{value:a}},[t._v(t._s(1==t.rootdata.screenflag?a+".":a))]),t._v(" "),s("div",{staticClass:"optionlabeldiv",domProps:{innerHTML:t._s(e)}})])})],2),t._v(" "),s("div",{staticClass:"qti_standard",attrs:{slot:"standard"},slot:"standard"},[t._v("正确答案:"),s("span",[t._v(t._s(1==t.testdata.mtype?this.testdata.moptions[t.testdata.manswer]:t.testdata.manswer))])])])},w=[];y._withStripped=!0;var b={render:y,staticRenderFns:w},k=b,x=s(0),q=x(_,k,!1,null,null,null);q.options.__file="src\\components\\qti\\qtich\\qtich.vue";var C=q.exports,$={name:"Qtimulch",props:["testdata","setting","rootdata"],data:function(){return{answerstr:""}},created:function(){this.testdata.musrans="",this.testdata.mfillorder?this.testdata.mmulchtypestr="选对但不全的得一半分,有选错不得分":this.testdata.mmulchtypestr="漏选、错选不得分",this.answerstr="";for(var t=0;t<this.testdata.manswer.length;t++)this.answerstr+=this.testdata.manswer[t],t+1<this.testdata.manswer.length&&(this.answerstr+=", ")},methods:{optionclick:function(t){0==this.testdata.msubmitflag&&(-1!=this.testdata.musrans.indexOf(t)?this.testdata.musrans=this.testdata.musrans.replace(t,""):this.testdata.musrans+=t)},isanswer:function(){""!=this.testdata.musrans?this.testdata.is_done=1:this.testdata.is_done=0},getusrans:function(){return this.testdata.musrans},setusrans:function(){},reset:function(){this.testdata.msubmitflag=0,this.testdata.musrans=""},submit:function(){console.log("mulch submit"),this.testdata.msubmitflag=1,this.testdata.musrans.split("").join()==this.testdata.manswer.join()?(this.testdata.mcorrect_rate=1,this.testdata.musrscore=this.testdata.mscore):(this.testdata.mcorrect_rate=0,this.testdata.musrscore=0),this.testdata.result={time:1e3*this.testdata.timenum,answer:this.testdata.musrans,score:this.testdata.musrscore,rate:this.testdata.mcorrect_rate,correct:parseInt(this.testdata.mcorrect_rate)}},setsubmit:function(t){"PREVIEWOR"==this.setting.caller&&""==this.setting.user_id?this.testdata.musrans=t.join():this.testdata.musrans=t[0].answer}},components:{Qtibase:v}},E=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("Qtibase",{attrs:{testdata:t.testdata,setting:t.setting,rootdata:t.rootdata},on:{setsubmit:t.setsubmit}},[s("span",{attrs:{slot:"body"},domProps:{innerHTML:t._s(t.testdata.mmain)},slot:"body"}),t._v(" "),s("div",{staticClass:"qti_options nopadding",attrs:{slot:"options"},slot:"options"},t._l(t.testdata.moptions,function(e,a){return s("div",{key:a,class:["optionsdiv",{previewor:"PREVIEWOR"==t.setting.caller,noactive:1==t.testdata.msubmitflag}],on:{click:function(e){t.optionclick(a)}}},[s("div",{class:["checkbox",{previewor:"PREVIEWOR"==t.setting.caller,checked:-1!=t.testdata.musrans.indexOf(a),false:1==t.testdata.msubmitflag,green:1==t.testdata.msubmitflag&&-1!=t.testdata.manswer.indexOf(a),red:1==t.testdata.msubmitflag&&-1!=t.testdata.musrans.indexOf(a)&&0==t.testdata.mcorrect_rate}],attrs:{value:a}},[t._v(t._s(1==t.rootdata.screenflag?a+".":a))]),t._v(" "),s("div",{staticClass:"optionlabeldiv",domProps:{innerHTML:t._s(e)}})