index-legacy-0c9f3573.js 16 KB

1
  1. !function(){function e(e,n,t,i,o,a,s){try{var l=e[a](s),r=l.value}catch(u){return void t(u)}l.done?n(r):Promise.resolve(r).then(i,o)}function n(n){return function(){var t=this,i=arguments;return new Promise((function(o,a){var s=n.apply(t,i);function l(n){e(s,o,a,l,r,"next",n)}function r(n){e(s,o,a,l,r,"throw",n)}l(void 0)}))}}System.register(["./index-legacy-e64b112e.js","./index-legacy-49ea308b.js","./index-legacy-434cbf08.js","./index-legacy-27a77114.js","./index-legacy-1eb06887.js","./index-legacy-953d4455.js","./index-legacy-809c2238.js","./index-legacy-36f1ab21.js","./index-legacy-0e905395.js","./index-legacy-aae2569d.js"],(function(e,t){"use strict";var i,o,a,s,l,r,u,c,d,p,A,f,_,v,w,b,h,g,m,y,I,x,C,T,q,E,S,L,k,B,R,F,U,P,N,j,z=document.createElement("style");return z.textContent="._unitDetail_15a1l_1{min-height:100vh;overflow:hidden;background:url("+new URL("bg-a9662afa.png",t.meta.url).href+") no-repeat top center;background-size:contain;position:relative;background-color:#abe8ff}._unitSwipe_15a1l_9{margin-top:2.4rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21{display:flex;align-items:center}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21 span{color:#ff5a56}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21 ._pointName_15a1l_28{padding-right:.16rem;color:#1cacf1;font-weight:600;font-size:.37333rem;max-width:4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38{display:flex;align-items:center}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38 i{margin-right:.16rem;display:inline-block;width:.53333rem;height:.53333rem;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAACuElEQVRYCe2YT2sTURDAZzabFjSxiCC1qcFqS7BYQWkEwZv9AB4qeBb8Ar0Lgne/QMVeRCT05LmlHoQiVdRW7MFKxZpqKR40pWDi7jiz8TWb7L50s7u2he5C2Hnz95d5u499D2+WSik4wJdxgNkcNLMV8H5f5ciAsTUGSF2tNhkTYqVmwZfb5VPLfnad7lHu2/l0CvJIlPX1Iayu2pmZu+vZbbfdA1hIVWYZo+h2apKJoJv7XjpdLtuGMfmxlnnQmlT5y58dSm9NGLZ9h3U5IGXxuSMB114AyF51W32muA2cO5ILcuF7BfPX26n+jeFmE4DoCmblnfiwLddq9x97a/sA+odqtQRnjxrW3MP+zQHlI7LogGhHp2yd3qMDSkWiE8ew9kQVd2TWqXGUu+cZDJ+Mio/z6zecePJOVdi8MQICpG265YBgWBxvXKyAiHilXqLd6+qFaKfZATxzaeRaCqkXNsvt/NvaCKFPHHjFCH2du3xh3CL8/vnN0gtJ4rwkQ6MXJ0yDniPC09CZOZAXYVN+kXIwg7AIk+RxkhFZPDURHxyDUw2P19k+TAPYf6Jw8sIgTP86GCmTCu7JA2R66z+RY7riWQcFBl0fRW45Imh8gBFBdOEJoK4zQfVJB4N2SueXdFDXmaD6pINBO6XzSzqo60xQfdLBoJ3S+R2iDlq/G01wyw1tKCnS53lTxZ9rAGvzrOINicgxXfEBClj5ZUxYjTSeZ/Cr2dOw7rHkV9vTwcnjRRis/oAU2HuKZ/EGc6XLe1qiAKuKpsb7ieXuk2q4n3eHyZliApziPfHGftK4awuLMInO6eCn1+/nWA54hudOBTA4OjLPm1j/A0/EhZVXS00Hks3Ru4/UFO/uqfGwqnjdMGmMza1HxlW7hjOasMDqyICri4vbXO1Z4IodOnqWmQ7j/7v7Xwtnr/nyIvR9AAAAAElFTkSuQmCC) no-repeat center;background-size:contain}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._controlBtn_15a1l_56{padding:0 .32rem}._wapList_15a1l_59{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_15a1l_65{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_15a1l_65 ._prevBtn_15a1l_70,._btnSection_15a1l_65 ._nextBtn_15a1l_71,._btnSection_15a1l_65 ._activePrevBtn_15a1l_72{width:3.30667rem!important;border:none;color:#fff}._btnSection_15a1l_65 ._prevBtn_15a1l_70{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 ._activePrevBtn_15a1l_72{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 ._nextBtn_15a1l_71{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 .van-button--disabled{color:#587c98}._btnSection_15a1l_65 .van-button--disabled:before{opacity:.2!important}._right_15a1l_95{color:#14c295}._error_15a1l_98{color:#ff5a56}._primary_15a1l_101{color:#1cacf1}\n",document.head.appendChild(z),{setters:[e=>{i=e.d,o=e.U,a=e.q,s=e.r,l=e.x,r=e.w,u=e.e,c=e.y,d=e.a7,p=e.a,A=e.S,f=e.A,_=e.C,v=e.V,w=e.a1,b=e.D,h=e.z,g=e.Z},e=>{m=e.e,y=e.Q,I=e.C,x=e.D,C=e.K,T=e.P,q=e.i,E=e.A,S=e.a,L=e.R},e=>{k=e.M},e=>{B=e.E},e=>{R=e.b,F=e.u,U=e.a},e=>{P=e.S,N=e.a},e=>{j=e.I},null,null,null],execute:function(){const t="_unitDetail_15a1l_1",z="_unitSwipe_15a1l_9",O="_questionTitle_15a1l_12",K="_questionNum_15a1l_21",M="_pointName_15a1l_28",H="_controlBtn_15a1l_56",X="_wapList_15a1l_59",Q="_btnSection_15a1l_65",Z="_prevBtn_15a1l_70",D="_nextBtn_15a1l_71",G="_activePrevBtn_15a1l_72",W="_right_15a1l_95",V="_error_15a1l_98",Y="_primary_15a1l_101";e("default",i({name:"unit-detail",setup(){const e=o(),i=a(),J=s(),$=l({background:"transparent",color:"#fff",visiableError:!1,visiableAnswer:!1,id:e.query.id,currentIndex:0,questionList:[],page:1,rows:50,total:0,isFinish:!1,visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:"",graspItem:{}},nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0}}),{counter:ee,resume:ne,pause:te}=R(1e3,{controls:!0}),ie=function(){var e=n((function*(e){try{const{data:n}=yield b.post("/edu-app/studentUnitExamination/errorEdition",{data:{page:$.page,rows:$.rows,maxStudentExaminationErrorEditionId:e}}),t=n||{};$.total=t.total||0,$.isFinish=!(t.current<t.pages),t.records.forEach((e=>{e.showAnalysis=!1,e.grasp=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),$.questionList.push(...t.records||[])}catch(n){}}));return function(n){return e.apply(this,arguments)}}();r((()=>$.currentIndex),(()=>{if($.currentIndex+3>=$.questionList.length&&!$.isFinish){const e=$.questionList[$.questionList.length-1];$.page=$.page+1,ie(e.id)}}));const oe=function(){var e=n((function*(e){e.grasp||($.visiableInfo.show=!0,$.visiableInfo.title="确定掌握此题?",$.visiableInfo.showCancelButton=!0,$.visiableInfo.operationType="GRASP",$.visiableInfo.cancelButtonText="取消",$.visiableInfo.confirmButtonText="确定",$.visiableInfo.content="你确定已掌握该题知识要点,此题将移除你的错题集。",$.visiableInfo.graspItem=e,console.log($.total,"toa"),$.total<=1&&fe())}));return function(n){return e.apply(this,arguments)}}(),ae=function(){var e=n((function*(){try{if($.visiableInfo.show=!1,yield b.get("/edu-app/studentExaminationErrorEdition/del",{hideLoading:!1,params:{questionId:$.visiableInfo.graspItem.id}}),$.visiableInfo.graspItem.grasp=!0,m.emit("unitAudioStop"),$.total<=1)return i.back(),void i.back();if($.total>$.currentIndex+1){const e=$.questionList.findIndex((e=>e.studentExaminationErrorEditionId===$.visiableInfo.graspItem.studentExaminationErrorEditionId));return $.questionList.splice(e,1),$.total-=1,void ue()}if($.total==$.currentIndex+1){const e=$.questionList.findIndex((e=>e.studentExaminationErrorEditionId===$.visiableInfo.graspItem.studentExaminationErrorEditionId));return $.questionList.splice(e,1),$.total-=1,$.currentIndex-=1,void ue()}}catch(e){}}));return function(){return e.apply(this,arguments)}}(),se=function(){var e=n((function*(){try{const n=$.questionList||[];let t={};n.forEach(((e,n)=>{n===$.currentIndex&&(t={questionId:e.id,details:e.userAnswer||[]})}));const{data:i}=yield b.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:t});if(n.forEach(((e,n)=>{n===$.currentIndex&&($.answerAnalysis=e.answerAnalysis,$.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=i)})),$.questionList.length===$.currentIndex+1)return m.emit("unitAudioStop"),$.visiableInfo.show=!0,$.visiableInfo.title="练习完成",$.visiableInfo.showCancelButton=!0,$.visiableInfo.operationType="CONTINUE",$.visiableInfo.cancelButtonText="再等等",$.visiableInfo.confirmButtonText="确认完成",$.visiableInfo.content="确认本次练习的题目都完成了吗?",void fe();var e;if(i)null===(e=J.value)||void 0===e||e.next();else $.visiableError=!0}catch(n){}}));return function(){return e.apply(this,arguments)}}(),le=u((()=>{const e=$.questionList||[];let n=0,t=0,i=0;return e.forEach((e=>{e.showAnalysis&&(n+=1,e.analysis.userResult?t+=1:i+=1)})),{count:n,passCount:t,noPassCount:i}}));let re=0;const ue=(e=!0)=>{h((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[$.currentIndex])||void 0===n?void 0:n.querySelector(".swipe-item-question"),i=null==t?void 0:t.querySelectorAll(".answerTitleImg img");let o=!0;null==i||i.forEach((e=>{e.complete||(o=!1)})),!o&&re<3&&setTimeout((()=>{re+=1,ue(e)}),300),o&&(re=0);const a=g(t);$.swipeHeight=a.height}),100)}))},ce=()=>{"RESULT"===$.visiableInfo.operationType?($.visiableInfo.show=!1,i.back(),i.back()):"BACK"===$.visiableInfo.operationType?($.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",Ae,!1)):"CONTINUE"===$.visiableInfo.operationType?pe():"GRASP"===$.visiableInfo.operationType&&ae()},de=function(){var e=n((function*(){const e=$.visiableInfo.operationType;"RESULT"===e||("BACK"===e?($.visiableInfo.show=!1,fe()):"CONTINUE"===e?$.visiableInfo.show=!1:"GRASP"===e&&($.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",Ae,!1)))}));return function(){return e.apply(this,arguments)}}(),pe=()=>{const e=le.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=ee.value,i=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),o=t%60>=10?t%60:"0"+t%60;$.overResult={time:i+":"+o,questionLength:e.count,errorLength:e.noPassCount,rate:n},te(),ee.value=0,$.visiableInfo.show=!0,$.visiableInfo.title="已完成",$.visiableInfo.showCancelButton=!1,$.visiableInfo.operationType="RESULT",$.visiableInfo.confirmButtonText="确认",$.visiableInfo.content=`<div>您已完成本次测试,答对<span class='${W}'>${e.passCount}</span>,答错<span class='${V}'>${e.count-e.passCount}</span>,正确率<span class='${Y}'>${n}%</span>~</div>`},Ae=()=>{const e=le.value;$.visiableInfo.show=!0,$.visiableInfo.title="确认退出吗?",$.visiableInfo.showCancelButton=!0,$.visiableInfo.operationType="BACK",$.visiableInfo.cancelButtonText="退出",$.visiableInfo.confirmButtonText="继续",$.visiableInfo.content=`您已经完成${e.passCount+e.noPassCount}道题了,继续做题可以巩固所学知识哦~`,m.emit("unitAudioStop")},fe=()=>{window.removeEventListener("popstate",Ae,!1),i.back()};return c(n((function*(){F(document,"scroll",(()=>{const{y:e}=U();e.value>52?($.background="#fff",$.color="#323333"):($.background="transparent",$.color="#fff")})),yield ie(),ue(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",Ae,!1)}))),d((()=>{m.emit("unitAudioStop")})),()=>{let e;return p("div",{class:t},[p(k,{position:"top"},{default:()=>[p(A,{border:!1,background:$.background,color:$.color},null)]}),p(P,{loop:!1,showIndicators:!1,ref:J,duration:300,touchable:!1,class:z,style:{paddingBottom:"12px"},lazyRender:!0,height:$.swipeHeight,onChange:e=>{m.emit("unitAudioStop"),$.currentIndex=e,ue()}},(n=e=$.questionList.map(((e,n)=>p(N,null,{default:()=>[p("div",{class:"swipe-item-question"},[e.questionTypeCode===y.RADIO&&p(I,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:O},[p("div",{class:K},[p("p",{class:M},[e.knowledgePointName]),p("span",null,[$.currentIndex+1]),f("/"),$.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:H,disabled:e.grasp,onClick:()=>oe(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===y.CHECKBOX&&p(I,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:O},[p("div",{class:K},[p("p",{class:M},[e.knowledgePointName]),p("span",null,[$.currentIndex+1]),f("/"),$.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:H,disabled:e.grasp,onClick:()=>oe(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===y.SORT&&p(x,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);ue(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:O},[p("div",{class:K},[p("p",{class:M},[e.knowledgePointName]),p("span",null,[$.currentIndex+1]),f("/"),$.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:H,disabled:e.grasp,onClick:()=>oe(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===y.LINK&&p(C,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:O},[p("div",{class:K},[p("p",{class:M},[e.knowledgePointName]),p("span",null,[$.currentIndex+1]),f("/"),$.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:H,disabled:e.grasp,onClick:()=>oe(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===y.PLAY&&p(T,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:$.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:O},[p("div",{class:K},[p("span",null,[$.currentIndex+1]),f("/"),$.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",disabled:e.grasp,class:H,onClick:()=>oe(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!w(n)?e:{default:()=>[e]})),p(k,{position:"bottom"},{default:()=>[p("div",{class:["btnGroup btnMore",Q]},[p(_,{round:!0,block:!0,class:$.currentIndex>0?G:Z,disabled:!($.currentIndex>0),onClick:()=>{var e;null===(e=J.value)||void 0===e||e.prev()}},{default:()=>[f("上一题")]}),p(_,{block:!0,round:!0,class:D,onClick:se,loading:$.nextStatus,disabled:$.nextStatus},{default:()=>[$.questionList.length===$.currentIndex+1?"提交":"下一题"]}),p(j,{src:q,class:[X,"van-haptics-feedback"],onClick:()=>$.visiableAnswer=!0},null)])]}),p(E,{show:$.visiableAnswer,"onUpdate:show":e=>$.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[p(S,{value:$.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#1CACF1"},{text:"答错",color:"#FF8486"},{text:"未答",color:"#EAEAEA"}],isFinish:$.isFinish,onSelect:e=>{var n;null===(n=J.value)||void 0===n||n.swipeTo(e,{immediate:!0}),$.visiableAnswer=!1},onLoadMore:()=>{const e=$.questionList[$.questionList.length-1];$.page=$.page+1,ie(e.id)}},null)]}),p(v,{show:$.visiableError,"onUpdate:show":e=>$.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[p(B,{onClose:()=>$.visiableError=!1,answerAnalysis:$.answerAnalysis,questionTypeCode:$.questionTypeCode,onConform:()=>{var e;null===(e=J.value)||void 0===e||e.next(),$.answerAnalysis=""}},null)]}),p(v,{show:$.visiableInfo.show,"onUpdate:show":e=>$.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[p(L,{title:$.visiableInfo.title,showCancelButton:$.visiableInfo.showCancelButton,cancelButtonText:$.visiableInfo.cancelButtonText,confirmButtonText:$.visiableInfo.confirmButtonText,status:$.visiableInfo.type,content:$.visiableInfo.content,contentHtml:!0,onConform:ce,onClose:de},null)]})]);var n}}}))}}}))}();