import{_ as a}from"./u-navbar.BTvKBpLV.js";import{r as t,b as s,c as e,w as l,aP as u,aQ as c,aI as o,i as r,o as n,d as f,e as i,t as d,m as p,k as m,f as _,g as v,F as y,u as b,j}from"./index-IX2tYR8R.js";import{r as T}from"./uni-app.es.Bc5t55A8.js";import{s as g}from"./statistics.oG-vJzTR.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{c as C}from"./car.C_k88K1b.js";import"./u-status-bar.weuqoXTS.js";import"./u-icon.sW6sruaF.js";import"./qiun-data-charts.CVWuWAeL.js";import"./oneBtn.DSZ3NLjD.js";const D=x({__name:"myStudy",setup(x){t(!1);const D=t(1);let I=C();function h(a){if(D.value==a)return;D.value=a;let t=w.value.oneresponse;2==a&&(t=w.value.fourResponse),A(t),P()}D.value=I.carInfo.stepType;const k=t([]),w=t({});function A(a){k.value=[{name:"我的收藏",num:a.collectCount||0},{name:"我的错题",num:a.errorCount||0},{name:"考试记录",num:a.examCount||0},{name:"预计合格率",num:a.exampassRate+"%"||0}]}!async function(){const{data:a}=await u(I.carInfo.carType);A(a.oneresponse),w.value=a,console.log(a)}();let S=t({}),q=t([]),B=t({}),E=t([]);async function R(a){let t=I.carInfo;const{data:s}=await c({carType:t.carType,stepType:t.stepType,examType:a});if(!(null==s?void 0:s.length))return;let e={categories:s.map((a=>a.formatStartTime)),series:[{name:"目标值",data:s.map((a=>a.score))}]};1==a?(q.value=s,S.value=e,console.log(S.value)):(E.value=s,B.value=e,console.log(B.value))}R(1),R(2);let F=t({});async function P(){const{data:a}=await o({subject:D.value,carType:I.carInfo.carType,city:I.carInfo.city});F.value=a}return P(),(t,u)=>{const c=T(s("up-navbar"),a),o=r,x=j;return n(),e(o,{class:"content"},{default:l((()=>[f(c,{leftText:" ",leftIconColor:"#fff",safeAreaInsetTop:!0,autoBack:!0,title:"我的学习",bgColor:"transparent",titleStyle:{color:"#fff"},fixed:!1}),f(o,{class:"padding"},{default:l((()=>[w.value.days?(n(),e(o,{key:0,class:"studyDay"},{default:l((()=>[i("已坚持学习"+d(w.value.days)+"天",1)])),_:1})):p("",!0),f(o,{class:"card"},{default:l((()=>[f(o,{class:"tabs"},{default:l((()=>[f(o,{class:m(["tab",{active:1==D.value}]),onClick:u[0]||(u[0]=a=>h(1))},{default:l((()=>[i("科一")])),_:1},8,["class"]),f(o,{class:m(["tab",{active:4==D.value}]),onClick:u[1]||(u[1]=a=>h(4))},{default:l((()=>[i("科四")])),_:1},8,["class"])])),_:1}),f(o,{class:"pd20"},{default:l((()=>[f(o,{class:"statistics"},{default:l((()=>[(n(!0),_(y,null,v(k.value,((a,t)=>(n(),e(o,{class:"statisticsItem",key:t},{default:l((()=>[f(o,{class:"num"},{default:l((()=>[i(d(a.num),1)])),_:2},1024),f(o,{class:"text"},{default:l((()=>[i(d(a.name),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),f(o,{class:"h3"},{default:l((()=>[i("刷题进度")])),_:1}),f(o,{class:"bgCard_row"},{default:l((()=>[f(o,{class:"bgCard"},{default:l((()=>[f(o,{class:"lab"},{default:l((()=>[i("顺序练习")])),_:1}),f(o,{class:"tps"},{default:l((()=>[i("已完成(题)")])),_:1}),f(o,{class:"num"},{default:l((()=>[i(d(b(F).orderAlready)+" ",1),f(x,null,{default:l((()=>[i("/")])),_:1}),i(d(b(F).orderTotal),1)])),_:1})])),_:1}),f(o,{class:"bgCard"},{default:l((()=>[f(o,{class:"lab"},{default:l((()=>[i("精选试题")])),_:1}),f(o,{class:"tps"},{default:l((()=>[i("已完成(题)")])),_:1}),f(o,{class:"num"},{default:l((()=>[i(d(b(F).siftAlready),1),f(x,null,{default:l((()=>[i("/")])),_:1}),i(d(b(F).siftTotal),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),f(g,{tit:"模拟考试",chartData:b(S),listData:b(q),key:"1",subject:D.value},null,8,["chartData","listData","subject"]),f(g,{tit:"防真考试",chartData:b(B),listData:b(E),key:"2",subject:D.value,url:"/pages/exercises/beforeExam/beforeExam"},null,8,["chartData","listData","subject"])])),_:1})])),_:1})}}},[["__scopeId","data-v-98e7c9b8"]]);export{D as default};