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-e1ea41b7.js","./index-legacy-a0082703.js","./index-legacy-820d5526.js","./index-legacy-d68a5c5b.js","./index-legacy-c9b011be.js","./index-legacy-c2783a73.js","./index-legacy-01b7024c.js","./index-legacy-22d0bd61.js","./index-legacy-f9c3c6d2.js","./index-legacy-666fea96.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;return{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.a8,p=e.a,A=e.S,f=e.A,_=e.C,v=e.V,w=e.a2,b=e.D,h=e.z,g=e._},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(){var z=document.createElement("style");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);const O="_unitDetail_15a1l_1",K="_unitSwipe_15a1l_9",M="_questionTitle_15a1l_12",H="_questionNum_15a1l_21",X="_pointName_15a1l_28",Q="_controlBtn_15a1l_56",D="_wapList_15a1l_59",G="_btnSection_15a1l_65",Z="_prevBtn_15a1l_70",W="_nextBtn_15a1l_71",V="_activePrevBtn_15a1l_72",Y="_right_15a1l_95",J="_error_15a1l_98",$="_primary_15a1l_101";e("default",i({name:"unit-detail",setup(){const e=o(),t=a(),i=s(),z=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:z.page,rows:z.rows,maxStudentExaminationErrorEditionId:e}}),t=n||{};z.total=t.total||0,z.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=[]})),z.questionList.push(...t.records||[])}catch(n){}}));return function(n){return e.apply(this,arguments)}}();r((()=>z.currentIndex),(()=>{if(z.currentIndex+3>=z.questionList.length&&!z.isFinish){const e=z.questionList[z.questionList.length-1];z.page=z.page+1,ie(e.id)}}));const oe=function(){var e=n((function*(e){e.grasp||(z.visiableInfo.show=!0,z.visiableInfo.title="确定掌握此题?",z.visiableInfo.showCancelButton=!0,z.visiableInfo.operationType="GRASP",z.visiableInfo.cancelButtonText="取消",z.visiableInfo.confirmButtonText="确定",z.visiableInfo.content="你确定已掌握该题知识要点,此题将移除你的错题集。",z.visiableInfo.graspItem=e,console.log(z.total,"toa"),z.total<=1&&fe())}));return function(n){return e.apply(this,arguments)}}(),ae=function(){var e=n((function*(){try{if(z.visiableInfo.show=!1,yield b.get("/edu-app/studentExaminationErrorEdition/del",{hideLoading:!1,params:{questionId:z.visiableInfo.graspItem.id}}),z.visiableInfo.graspItem.grasp=!0,m.emit("unitAudioStop"),z.total<=1)return t.back(),void t.back();if(z.total>z.currentIndex+1){const e=z.questionList.findIndex((e=>e.studentExaminationErrorEditionId===z.visiableInfo.graspItem.studentExaminationErrorEditionId));return z.questionList.splice(e,1),z.total-=1,void ue()}if(z.total==z.currentIndex+1){const e=z.questionList.findIndex((e=>e.studentExaminationErrorEditionId===z.visiableInfo.graspItem.studentExaminationErrorEditionId));return z.questionList.splice(e,1),z.total-=1,z.currentIndex-=1,void ue()}}catch(e){}}));return function(){return e.apply(this,arguments)}}(),se=function(){var e=n((function*(){try{const n=z.questionList||[];let t={};n.forEach(((e,n)=>{n===z.currentIndex&&(t={questionId:e.id,details:e.userAnswer||[]})}));const{data:o}=yield b.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:t});if(n.forEach(((e,n)=>{n===z.currentIndex&&(z.answerAnalysis=e.answerAnalysis,z.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=o)})),z.questionList.length===z.currentIndex+1)return m.emit("unitAudioStop"),z.visiableInfo.show=!0,z.visiableInfo.title="练习完成",z.visiableInfo.showCancelButton=!0,z.visiableInfo.operationType="CONTINUE",z.visiableInfo.cancelButtonText="再等等",z.visiableInfo.confirmButtonText="确认完成",z.visiableInfo.content="确认本次练习的题目都完成了吗?",void fe();var e;if(o)null===(e=i.value)||void 0===e||e.next();else z.visiableError=!0}catch(n){}}));return function(){return e.apply(this,arguments)}}(),le=u((()=>{const e=z.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")[z.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);z.swipeHeight=a.height}),100)}))},ce=()=>{"RESULT"===z.visiableInfo.operationType?(z.visiableInfo.show=!1,t.back(),t.back()):"BACK"===z.visiableInfo.operationType?(z.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",Ae,!1)):"CONTINUE"===z.visiableInfo.operationType?pe():"GRASP"===z.visiableInfo.operationType&&ae()},de=function(){var e=n((function*(){const e=z.visiableInfo.operationType;"RESULT"===e||("BACK"===e?(z.visiableInfo.show=!1,fe()):"CONTINUE"===e?z.visiableInfo.show=!1:"GRASP"===e&&(z.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;z.overResult={time:i+":"+o,questionLength:e.count,errorLength:e.noPassCount,rate:n},te(),ee.value=0,z.visiableInfo.show=!0,z.visiableInfo.title="已完成",z.visiableInfo.showCancelButton=!1,z.visiableInfo.operationType="RESULT",z.visiableInfo.confirmButtonText="确认",z.visiableInfo.content=`<div>您已完成本次测试,答对<span class='${Y}'>${e.passCount}</span>,答错<span class='${J}'>${e.count-e.passCount}</span>,正确率<span class='${$}'>${n}%</span>~</div>`},Ae=()=>{const e=le.value;z.visiableInfo.show=!0,z.visiableInfo.title="确认退出吗?",z.visiableInfo.showCancelButton=!0,z.visiableInfo.operationType="BACK",z.visiableInfo.cancelButtonText="退出",z.visiableInfo.confirmButtonText="继续",z.visiableInfo.content=`您已经完成${e.passCount+e.noPassCount}道题了,继续做题可以巩固所学知识哦~`,m.emit("unitAudioStop")},fe=()=>{window.removeEventListener("popstate",Ae,!1),t.back()};return c(n((function*(){F(document,"scroll",(()=>{const{y:e}=U();e.value>52?(z.background="#fff",z.color="#323333"):(z.background="transparent",z.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:O},[p(k,{position:"top"},{default:()=>[p(A,{border:!1,background:z.background,color:z.color},null)]}),p(P,{loop:!1,showIndicators:!1,ref:i,duration:300,touchable:!1,class:K,style:{paddingBottom:"12px"},lazyRender:!0,height:z.swipeHeight,onChange:e=>{m.emit("unitAudioStop"),z.currentIndex=e,ue()}},(n=e=z.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:M},[p("div",{class:H},[p("p",{class:X},[e.knowledgePointName]),p("span",null,[z.currentIndex+1]),f("/"),z.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Q,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:M},[p("div",{class:H},[p("p",{class:X},[e.knowledgePointName]),p("span",null,[z.currentIndex+1]),f("/"),z.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Q,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:M},[p("div",{class:H},[p("p",{class:X},[e.knowledgePointName]),p("span",null,[z.currentIndex+1]),f("/"),z.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Q,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:M},[p("div",{class:H},[p("p",{class:X},[e.knowledgePointName]),p("span",null,[z.currentIndex+1]),f("/"),z.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Q,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:z.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:M},[p("div",{class:H},[p("span",null,[z.currentIndex+1]),f("/"),z.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",disabled:e.grasp,class:Q,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",G]},[p(_,{round:!0,block:!0,class:z.currentIndex>0?V:Z,disabled:!(z.currentIndex>0),onClick:()=>{var e;null===(e=i.value)||void 0===e||e.prev()}},{default:()=>[f("上一题")]}),p(_,{block:!0,round:!0,class:W,onClick:se,loading:z.nextStatus,disabled:z.nextStatus},{default:()=>[z.questionList.length===z.currentIndex+1?"提交":"下一题"]}),p(j,{src:q,class:[D,"van-haptics-feedback"],onClick:()=>z.visiableAnswer=!0},null)])]}),p(E,{show:z.visiableAnswer,"onUpdate:show":e=>z.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[p(S,{value:z.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#1CACF1"},{text:"答错",color:"#FF8486"},{text:"未答",color:"#EAEAEA"}],isFinish:z.isFinish,onSelect:e=>{var n;null===(n=i.value)||void 0===n||n.swipeTo(e,{immediate:!0}),z.visiableAnswer=!1},onLoadMore:()=>{const e=z.questionList[z.questionList.length-1];z.page=z.page+1,ie(e.id)}},null)]}),p(v,{show:z.visiableError,"onUpdate:show":e=>z.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[p(B,{onClose:()=>z.visiableError=!1,answerAnalysis:z.answerAnalysis,questionTypeCode:z.questionTypeCode,onConform:()=>{var e;null===(e=i.value)||void 0===e||e.next(),z.answerAnalysis=""}},null)]}),p(v,{show:z.visiableInfo.show,"onUpdate:show":e=>z.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[p(L,{title:z.visiableInfo.title,showCancelButton:z.visiableInfo.showCancelButton,cancelButtonText:z.visiableInfo.cancelButtonText,confirmButtonText:z.visiableInfo.confirmButtonText,status:z.visiableInfo.type,content:z.visiableInfo.content,contentHtml:!0,onConform:ce,onClose:de},null)]})]);var n}}}))}}}))}();
|