1 |
- !function(){var e=document.createElement("style");e.innerHTML="._unitDetail_asj8n_1{overflow:hidden}._unitSection_asj8n_4{margin:.32rem .34667rem;padding:.34667rem .4rem;width:auto;overflow:hidden;border-radius:.26667rem}._unitSection_asj8n_4 ._unitTitle_asj8n_11{font-size:.42667rem;font-weight:500;color:#333}._unitSection_asj8n_4 .van-cell__value{flex:0 auto}._unitSection_asj8n_4 ._unitCount_asj8n_19{padding-top:.26667rem;padding-left:.21333rem;display:flex;align-items:center;justify-content:space-between}._unitSection_asj8n_4 ._countSection_asj8n_26{display:flex;align-items:center;font-size:.32rem;line-height:.45333rem;color:#333;flex-direction:column}._unitSection_asj8n_4 ._countSection_asj8n_26 ._nums_asj8n_34{font-family:DIAN;font-weight:700;color:#333;font-size:.53333rem;padding-bottom:.08rem}._unitSection_asj8n_4 ._countSection_asj8n_26+._countSection_asj8n_26{margin-left:.66667rem}._wapList_asj8n_44{width:1.17333rem;height:1.17333rem;flex-shrink:0;margin-left:.48rem}._practiceResult_asj8n_50 ._practiceTitle_asj8n_50{font-size:.53333rem;font-weight:600;color:#191919;line-height:.74667rem}._practiceResult_asj8n_50 ._practiceRate_asj8n_56{padding-top:.4rem;font-size:1.6rem;font-weight:700;color:#f67146;line-height:1.86667rem}._practiceResult_asj8n_50 .van-grid{padding-top:.26667rem;padding-bottom:.26667rem;margin-left:5%;width:90%}._practiceResult_asj8n_50 .van-grid-item__content{background-color:transparent}._practiceResult_asj8n_50 ._title_asj8n_72{font-size:.64rem;font-weight:700;color:#333;line-height:.74667rem}._practiceResult_asj8n_50 ._name_asj8n_78{padding-top:.08rem;font-size:.37333rem;color:#777;line-height:.53333rem}._practiceResult_asj8n_50 ._practiceTips_asj8n_84{margin-left:10%;width:80%;background:linear-gradient(135deg,#fff4da 0%,#ffe6c4 100%);border-radius:.26667rem;padding:.37333rem 0;text-align:center;font-size:.4rem;font-weight:500;color:#703a17;line-height:.56rem;letter-spacing:.02667rem}._popupResult_1naxw_1{padding:.53333rem .53333rem .66667rem;color:#333;font-size:.4rem}._popupResult_1naxw_1 ._resultTitle_1naxw_6{display:flex;align-items:center;justify-content:center;text-align:center;font-size:.48rem;font-weight:600;color:#333}._popupResult_1naxw_1 ._resultTitle_1naxw_6 ._titleImg_1naxw_15{width:.48rem;height:.48rem;margin-right:.16rem}._popupResult_1naxw_1 ._result_1naxw_6{margin-top:.53333rem;padding:.32rem;background:#f6f6f6;border-radius:.10667rem;font-size:.42667rem;font-weight:500;color:#333}._popupResult_1naxw_1 ._result_1naxw_6 ._yes_1naxw_29{color:#4593f4;margin-right:.53333rem}._popupResult_1naxw_1 ._result_1naxw_6 ._no_1naxw_33{color:#f44541}._popupResult_1naxw_1 ._resultContent_1naxw_36{padding:.53333rem 0 .8rem;font-size:.4rem;color:#333;text-align:justify;line-height:.61333rem}._popupResult_1naxw_1 ._resultContent_1naxw_36 span{font-weight:600}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.b9c79165.js","./index-legacy.ad813f4d.js","./index-legacy.e0860c0a.js","./index-legacy.fecc738b.js","./index-legacy.80428ed5.js","./index-legacy.219fe128.js","./index-legacy.918b8c74.js","./index-legacy.fab451f1.js","./index-legacy.8c254533.js","./index-legacy.761bf286.js","./index-legacy.11f1ea5f.js"],(function(e){"use strict";var t,n,s,a,i,o,l,r,u,c,d,_,p,m,w,g,f,y,h,v,x,b,j,A,C,S,T,R,q,I,L,k,E,B,U,z,O,P;return{setters:[function(e){t=e.d,n=e.c,s=e.q,a=e.B,i=e.ah,o=e.ag,l=e.R,r=e.r,u=e.y,c=e.$,d=e.g,_=e.b7,p=e.aj,m=e.P,w=e.al,g=e.m,f=e._,y=e.an},function(e){h=e.a,v=e.e,x=e.Q,b=e.C,j=e.D,A=e.K,C=e.P,S=e.i,T=e.A},function(e){R=e.O},function(e){q=e.O},function(e){I=e.I},function(e){L=e.R},function(e){k=e.u},function(e){E=e.C},function(e){B=e.S,U=e.a},function(e){z=e.A},function(e){O=e.G,P=e.a},function(){}],execute:function(){var M="_unitDetail_asj8n_1",D="_unitSection_asj8n_4",H="_unitTitle_asj8n_11",F="_unitCount_asj8n_19",K="_countSection_asj8n_26",N="_nums_asj8n_34",G="_wapList_asj8n_44",Q="_practiceResult_asj8n_50",Y="_practiceTitle_asj8n_50",X="_practiceRate_asj8n_56",$="_title_asj8n_72",J="_name_asj8n_78",V="_practiceTips_asj8n_84";var W={popupResult:"_popupResult_1naxw_1",resultTitle:"_resultTitle_1naxw_6",titleImg:"_titleImg_1naxw_15",result:"_result_1naxw_6",yes:"_yes_1naxw_29",no:"_no_1naxw_33",resultContent:"_resultContent_1naxw_36"},Z=t({name:"result-mode",props:{confirmButtonText:{type:String,default:"我知道了"},answerAnalysis:{type:String,default:""},questionTypeCode:{type:String,default:""}},emits:["close","conform"],setup:(e,{emit:t})=>()=>n("div",{class:W.popupResult},[n("div",{class:W.resultTitle},[n(I,{src:h,class:W.titleImg},null),"PLAY"===e.questionTypeCode?"不合格!":"回答错误!"]),n("div",{class:W.resultContent},[n("span",null,[s("答案解析:")]),e.answerAnalysis]),n(a,{type:"primary",round:!0,class:W.btn,block:!0,onClick:()=>{t("conform"),t("close")}},{default:()=>[e.confirmButtonText]})])});e("default",t({name:"unit-detail",setup(){const e=i(),t=o();l();const h=l(),W=r({examId:e.query.examId,name:e.query.name,courseTypeCode:e.query.courseTypeCode,visiableError:!1,visiableAnswer:!1,visiableResult:!1,id:e.query.id,currentIndex:0,questionList:[],visiableSure:!1,resultInfo:{},resultStatusType:"SUCCESS",visiableExam:!1,nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0},knowledgelist:[],quitStatus:!1,dialogMessage:"",dialogStatus:!1}),{counter:ee,resume:te,pause:ne}=k(1e3,{controls:!0}),se=async()=>{try{const{data:e}=await g.post("/api-student/examinationQuestion/randomPage",{data:{page:1,row:50,categoryId:W.id}}),t=e||[];t.forEach((e=>{e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),W.questionList=t}catch{}},ae=async()=>{try{const t=W.questionList||[];let n={};t.forEach(((e,t)=>{t===W.currentIndex&&(n={questionId:e.id,details:e.userAnswer||[]})}));const{data:s}=await g.post("/api-student/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:n});if(t.forEach(((e,t)=>{t===W.currentIndex&&(W.answerAnalysis=e.answerAnalysis,W.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=s)})),W.questionList.length===W.currentIndex+1)return v.emit("unitAudioStop"),void(W.visiableSure=!0);var e;if(s)null===(e=h.value)||void 0===e||e.next();else W.visiableError=!0}catch{}},ie=u((()=>{const e=W.questionList||[];let t=0,n=0,s=0;return e.forEach((e=>{e.showAnalysis&&(t+=1,e.analysis.userResult?n+=1:s+=1)})),{count:t,passCount:n,noPassCount:s}}));let oe=0;const le=(e=!0)=>{f((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var t;const n=null===(t=document.querySelectorAll(".van-swipe-item")[W.currentIndex])||void 0===t?void 0:t.querySelector(".swipe-item-question");console.log("🚀 ~ setTimeout ~ currentItemDom",n);const s=n.querySelectorAll(".answerTitleImg img");let a=!0;s.forEach((e=>{console.log(e.complete),e.complete||(a=!1)})),!a&&oe<3&&setTimeout((()=>{oe+=1,le(e)}),300),a&&(oe=0);const i=y(n);W.swipeHeight=i.height}),100)}))},re=()=>{const e=ie.value;let t=0;e.count>0&&(t=Math.floor(e.passCount/e.count*100));const n=ee.value,s=Math.floor(n/60)>=10?Math.floor(n/60):"0"+Math.floor(n/60),a=n%60>=10?n%60:"0"+n%60;W.overResult={time:s+":"+a,questionLength:e.count,errorLength:e.noPassCount,rate:t},ne(),ee.value=0,W.visiableResult=!0},ue=async()=>{W.questionList=[],await se(),setTimeout((async()=>{var e;null===(e=h.value)||void 0===e||e.swipeTo(0,{immediate:!0}),W.swipeHeight="auto",W.answerAnalysis="",W.overResult={time:"00:00",questionLength:0,errorLength:0,rate:0},W.visiableResult=!1,te(),le()}),100)},ce=()=>{const e=W.knowledgelist||[],t=e.findIndex((e=>e.id===W.id));console.log("🚀 ~ file: index.tsx:249 ~ onConfirmResult ~ knownleIndex",t);let n={};n=t+1>=e.length||t<0?e[0]:e[t+1],W.id=n.id,W.visiableResult=!1,W.currentIndex=0,ue()},de=()=>{W.quitStatus=!0,v.emit("unitAudioStop")},_e=()=>{window.removeEventListener("popstate",de,!1),t.back()};return c((async()=>{if(await se(),await(async()=>{try{const{data:e}=await g.post("/api-student/unitExamination/queryKnowledgePoint",{requestType:"form",data:{unitExaminationId:W.examId}});W.knowledgelist=e.lists||[]}catch{}})(),le(),!d.user.data.vipMember)return ne(),W.dialogStatus=!0,void(W.dialogMessage="您暂未开通团练宝,请开通后使用");window.history.pushState(null,"",document.URL),window.addEventListener("popstate",de,!1)})),_((()=>{v.emit("unitAudioStop")})),()=>{let e;return n("div",{class:M},[n(R,{position:"top"},{default:()=>[n(p,null,{right:()=>n("span",{style:"color: var(--van-primary-color)",onClick:()=>{v.emit("unitAudioStop"),W.visiableSure=!0}},[s("结束练习")])})]}),n(E,{center:!0,class:D,border:!1},{title:()=>n("div",{class:[H]},[W.name]),value:()=>n("div",{class:F},[n("div",{class:K},[n("span",{class:N},[ie.value.passCount]),n("span",null,[s("答对")])]),n("div",{class:K},[n("span",{class:N,style:{color:"#F44541"}},[ie.value.noPassCount]),n("span",null,[s("答错")])])])}),n(B,{loop:!1,showIndicators:!1,ref:h,duration:300,touchable:!1,style:{paddingBottom:"12px"},lazyRender:!0,height:W.swipeHeight,onChange:e=>{v.emit("unitAudioStop"),W.currentIndex=e,le()}},(i=e=W.questionList.map(((e,t)=>n(U,null,{default:()=>[n("div",{class:"swipe-item-question"},[e.questionTypeCode===x.RADIO&&n(b,{value:e.userAnswer,"onUpdate:value":t=>e.userAnswer=t,index:t+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.CHECKBOX&&n(b,{value:e.userAnswer,"onUpdate:value":t=>e.userAnswer=t,index:t+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.SORT&&n(j,{value:e.userAnswer,"onUpdate:value":[t=>e.userAnswer=t,()=>{const t=!(e.userAnswer&&e.userAnswer.length>0);le(t)}],data:e,index:t+1,showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.LINK&&n(A,{value:e.userAnswer,"onUpdate:value":t=>e.userAnswer=t,data:e,index:t+1,showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.PLAY&&n(C,{value:e.userAnswer,"onUpdate:value":t=>e.userAnswer=t,data:e,index:t+1,unitId:W.id,showAnalysis:e.showAnalysis,analysis:e.analysis},null)])]}))),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!w(i)?e:{default:()=>[e]})),n(R,{position:"bottom",background:"white"},{default:()=>[n("div",{class:["btnGroup btnMore"]},[W.currentIndex>0&&n(a,{round:!0,block:!0,type:"primary",plain:!0,onClick:()=>{var e;null===(e=h.value)||void 0===e||e.prev()}},{default:()=>[s("上一题")]}),n(a,{block:!0,round:!0,type:"primary",onClick:ae,loading:W.nextStatus,disabled:W.nextStatus},{default:()=>[s("提交")]}),n(I,{src:S,class:[G,"van-haptics-feedback"],onClick:()=>W.visiableAnswer=!0},null)])]}),n(z,{show:W.visiableAnswer,"onUpdate:show":e=>W.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[n(T,{value:W.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#71B0FF"},{text:"答错",color:"#FF8486"}],onSelect:e=>{var t;null===(t=h.value)||void 0===t||t.swipeTo(e,{immediate:!0}),W.visiableAnswer=!1}},null)]}),n(m,{show:W.visiableError,"onUpdate:show":e=>W.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[n(Z,{onClose:()=>W.visiableError=!1,answerAnalysis:W.answerAnalysis,questionTypeCode:W.questionTypeCode,onConform:()=>{var e;null===(e=h.value)||void 0===e||e.next(),W.answerAnalysis=""}},null)]}),n(m,{show:W.visiableResult,"onUpdate:show":e=>W.visiableResult=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"96%"}},{default:()=>[n(L,{status:"PRACTICE",confirmButtonText:"下一个考点",cancelButtonText:"继续练习本考点",onClose:ue,onConform:ce},{content:()=>n("div",{class:Q},[n("div",{class:Y},[s("本次练习正确率")]),n("div",{class:X},[W.overResult.rate,s("%")]),n(O,{border:!1,columnNum:3},{default:()=>[n(P,null,{default:()=>[n("p",{class:$},[W.overResult.time]),n("p",{class:J},[s("练习时长")])]}),n(P,null,{default:()=>[n("p",{class:[$]},[0|W.overResult.questionLength]),n("p",{class:J},[s("答题数")])]}),n(P,null,{default:()=>[n("p",{class:$},[0|W.overResult.errorLength]),n("p",{class:J},[s("错题数")])]})]}),W.overResult.rate>=100?n("div",{class:V},[s("你真棒!"),n("br",null,null),s("本知识点你已经完全掌握啦!")]):n("div",{class:V},[s("继续努力!"),n("br",null,null),s("争取在测验中获得高分!")])])})]}),n(q,{show:W.visiableSure,"onUpdate:show":e=>W.visiableSure=e,title:"练习完成",message:"确认本次练习的题目都完成了吗?",messageAlign:"left",showCancelButton:!0,cancelButtonText:"再等等",confirmButtonText:"确认完成",onConfirm:re},null),n(q,{show:W.quitStatus,"onUpdate:show":e=>W.quitStatus=e,title:"提示",message:"您是否退出本次练习?",showCancelButton:!0,cancelButtonText:"取消",onCancel:()=>{window.history.pushState(null,"",document.URL),window.addEventListener("popstate",de,!1)},confirmButtonText:"确认退出",onConfirm:_e},null),n(q,{message:W.dialogMessage,show:W.dialogStatus,"onUpdate:show":e=>W.dialogStatus=e,showCancelButton:!0,cancelButtonText:"返回",onCancel:()=>{t.back()},confirmButtonText:"立即开通",onConfirm:()=>{t.push("/memberCenter")}},null)]);var i}}}))}}}))}();
|