1 |
- import{s as t}from"./index.module-c328a753-1725962701482.js";import{u as L}from"./useECharts-ba477bc0-1725962701482.js";import{c as G,d as H}from"./api-03593212-1725962701482.js";import{s as j}from"./api-7b148647-1725962701482.js";import{g as v,a as T,c as u,N as D,d as g,b as R}from"./dateFormat-a0af14ee-1725962701482.js";import{C as U}from"./index-87ec293b-1725962701482.js";import{T as S}from"./index-b03328a0-1725962701482.js";import{i as B,s as I}from"./use-async-97bc8586-1725962701482.js";import{d as Y,r as c,e as w,q as P,f as a,N as Q,g as E,x as M,j as A,k as n,aG as W,F as y,c as V,l as J,m as z,G as Z,aL as N}from"./index-8151123c-1725962701482.js";import{P as X}from"./index-b978cc22-1725962701482.js";import{v as O}from"./urlUtils-72ef455d-1725962701482.js";const ra="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAqCAYAAACpxZteAAAAAXNSR0IArs4c6QAAA/NJREFUWEftll+IVGUYxp/nzOpsomUhpZvTjUZWFmsQFgrRRQltuRea3mQXc2a22tygbpozo3RA2zMGQmih685ZsKhwi93cLDIp+iNF/5QwwcqgEDIlWKGMnW3OeWJn251zZmd3ZnYxCJq7ec/7Pb/v/fO930dc4h8vsT6mBCi+Yx6MwfvgsxXUrQAXQZgD4iyAnwAdhsF+djvfT7bRigB17Iri4tnHQWQgXVU9SvaCytDNni73nQBQeyaGvHcQworqwkEPDoE06Xa+GrIG/6jNWgYPH0K6pj7xgDf5NF3nuTHLeAR6LHUl8vgcwPUhcWIQ5B4YGIAX/QEx/IlfCtfC8++GlAC0smwzgsH1zDl9I/YSwEy9DOGhsDN7cXn0ET5vX5gsIpnWJkhdAC4b9yF+x6zGpdxrny8ClEw3w/OPBYEgu+g6j9aSKpnWKkDvQ4iW/Pkie5zNo4B4aj+AhwMfj+G66EradqEWwKhGugPwdwU0hoH5C6je3ggOHz9f1o5r2JN9r1bxIsC2G3AmfwrSkvF1EWMj1Za+DQX/61L+eA6xaBNt268HUISY6e2QnwlodVFxay2ggwHjAF2nt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H0BOu3CUNcWdhZxwJ5I/pATuNA3mbJNcnQmzJAPyWbraFXwqiOGqq8Vipq7mztj6mR9M2dkMaN7QBdk6YjtnOIMrNA5+ljZI25e2SvEDAqjZoPRng0NURwPSobukXXoawApDJrSPTJBYngjyY+RayhkzTimIPpGXDUjF4S3OulacoeAU05nVe1wJjGIwHGRs6C5fx9lZVJy9gm6TVlRxsvg8HDNEcD3G7+33RmeyLaiWENyTVVQIi+YMzvxNh5ppm0QjcYr5WjdYFrCGwTMKCvDwPdstLAA6S2NUdwJ7sZbdwQ5XdTWMa329jBok6EakqIMnx6OxaycvlIvwH+wgy5cy9OxMAAAAASUVORK5CYII=",ua=Y({name:"student-practiceData",props:{studentId:{type:String,default:""},classGroupId:{type:String,default:""}},setup(o){const f=c(null),{setOptions:F}=L(f),p=c(!0),i=w({height:"360px",width:"100%",practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0,dateList:[],timeList:[]}),s=w({loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],goCourseVisiable:!1}),l=c([v(new Date().getTime()),T(new Date().getTime())]),b=()=>[{title:"日期",key:"date"},{title:"学练时长",key:"practiceDuration",render(e){return a(y,null,[" ",a(y,null,[e.practiceDuration?u(e.practiceDuration)>0?u(e.practiceDuration)+"分"+g(e.practiceDuration)+"秒":g(e.practiceDuration)+"秒":"0分钟"])])}}],d=async()=>{try{const e=await j({page:1,rows:999,studentId:o.studentId,classGroupId:o.classGroupId,...R(l.value,["startTime","endTime"],"YYYY-MM-DD")});s.tableList=e.data.rows}catch(e){console.log(e)}},x=()=>{F({tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!1,selected:{"学练时长(分钟)":p.value}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{show:!0},data:i.dateList},yAxis:[{type:"value",axisLabel:{formatter:e=>u(e)+"min"},axisTick:{show:!1},splitArea:{show:!1,areaStyle:{color:["rgba(255,255,255,0.2)"]}}}],grid:{left:"1%",right:"1%",top:"2%",bottom:0,containLabel:!0},series:[{data:i.timeList,type:"bar",barWidth:"48px",stack:"total",itemStyle:{normal:{barBorderRadius:[8,8,0,0],color:"#D5E9FF"},emphasis:{focus:"series",color:"#3583FA"}}}],formatter:e=>Array.isArray(e)?[e[0].axisValueLabel,...e.map(r=>{let k;return u(r.value)>0?k=u(r.value)+"分"+g(r.value)+"秒":k=g(r.value)+"秒","<br/>".concat(r.marker,'<span style="margin-top:10px;margin-left:5px;font-size: 13px;font-weight: 500;\n color: #131415;font-weight: 600;\n margin-top:12px\n line-height: 18px;">学练时长: ').concat(k," </span>")})].join(""):e})},m=async()=>{try{const e=await G({studentId:o.studentId,classGroupId:o.classGroupId,...R(l.value,["startTime","endTime"],"YYYY-MM-DD")});i.practiceDays=e.data.practiceDays,i.practiceDurationAvg=e.data.practiceDurationAvg,i.practiceDurationTotal=e.data.practiceDurationTotal,i.dateList=e.data.trainingStatDetailList.map(r=>r.date),i.timeList=e.data.trainingStatDetailList.map(r=>r.practiceDuration),x()}catch(e){console.log(e)}},h=()=>{s.pagination.page=1,m(),d(),I({current:{timer:l.value},saveKey:"classStudentRecordPracticeData"})},C=()=>{l.value=[v(new Date().getTime()),T(new Date().getTime())],h(),d(),I({current:{timer:l.value},saveKey:"classStudentRecordPracticeData"})};return B({current:{timer:l.value},saveKey:"classStudentRecordPracticeData",callBack:e=>{l.value=e.timer}}),P(()=>{console.log(o.studentId),m(),d()}),()=>a(y,null,[a(Q,{"label-placement":"left",inline:!0},{default:()=>[a(E,null,{default:()=>[a(U,{value:l.value,"onUpdate:value":e=>l.value=e,separator:"至",type:"daterange",timerValue:l.value},null)]}),a(E,null,{default:()=>[a(M,{justify:"end"},{default:()=>[a(A,{type:"primary",class:"searchBtn",onClick:h},{default:()=>[n("搜索")]}),a(A,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[n("重置")]})]})]})]}),a("div",{class:t.homeTrainData},[a("div",{class:t.TrainDataTop},[a("div",{class:t.TrainDataTopLeft},[a("div",{class:t.TrainDataItem},[a("p",{class:t.TrainDataItemTitle},[u(i.practiceDurationTotal)>0?a("div",null,[a("span",null,[a(D,{from:0,to:u(i.practiceDurationTotal)},null)]),a("i",{style:{width:"4px",display:"inline-block"}},null),n("分"),a("i",{style:{width:"4px",display:"inline-block"}},null)]):null,a("div",null,[a("span",null,[a(D,{from:0,to:g(i.practiceDurationTotal)},null)]),a("i",{style:{width:"4px",display:"inline-block"}},null),n("秒")])]),a("p",{class:t.TrainDataItemsubTitle},[n("累计练习时长")])]),a("div",{class:t.TrainDataItem},[a("p",{class:t.TrainDataItemTitle},[u(i.practiceDurationAvg)>0?a("div",null,[a("span",null,[a(D,{from:0,to:u(i.practiceDurationAvg)},null)]),a("i",{style:{width:"4px",display:"inline-block"}},null),n("分"),a("i",{style:{width:"4px",display:"inline-block"}},null)]):null,a("div",null,[a("span",null,[a(D,{from:0,to:g(i.practiceDurationAvg)},null)]),a("i",{style:{width:"4px",display:"inline-block"}},null),n("秒")])]),a("p",{class:t.TrainDataItemsubTitle},[n("平均每天练习时长")])]),a("div",{class:t.TrainDataItem},[a("p",{class:t.TrainDataItemTitle},[a("div",null,[a("span",null,[a(D,{from:0,to:i.practiceDays},null)]),a("i",{style:{width:"4px",display:"inline-block"}},null),n("天")])]),a("p",{class:t.TrainDataItemsubTitle},[n("练习天数")])])]),a("div",{class:t.TrainDataTopRight},[a("div",{class:[t.DataTopRightItem,p.value?"":t.DataTopRightItemDis]},[a("div",{class:[t.DataTopRightDot,t.DataTopRightDotBlue]},null),a("p",null,[n("学练时长(分钟)")])])])]),a("div",{class:t.chatrs},[a("div",{ref:f,style:{height:i.height,width:i.width}},null)]),a("div",{class:[t.tableWrap,t.tableWrapEcharts]},[a(W,{class:t.classTable,loading:s.loading,columns:b(),data:s.tableList},{empty:()=>a(S,null,null)})])])])}}),ca=Y({name:"student-practiceData",props:{studentId:{type:String,default:""},classGroupId:{type:String,default:""}},setup(o){const f=V(),F=c(null);L(F),c(!0);const p=w({height:"360px",width:"100%",practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0,dateList:[],timeList:[],detailVisiable:!1}),i=c(""),s=w({loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],goCourseVisiable:!1}),l=c([v(new Date().getTime()),T(new Date().getTime())]),b=()=>[{title:"时间",key:"createTime"},{title:"评测曲目",key:"musicSheetName",render(e){return a("span",null,[e.musicSheetName])}},{title:"评测难度",key:"heardLevel",render(e){return a(y,null,[e.heardLevel==null?a("span",null,[n("--")]):null,e.heardLevel=="BEGINNER"?a(N,{type:"info"},{default:()=>[n("入门级")]}):null,e.heardLevel=="ADVANCED"?a(N,{type:"warning"},{default:()=>[n("进阶级")]}):null,e.heardLevel=="PERFORMER"?a(N,{type:"error"},{default:()=>[n("大师级")]}):null])}},{title:"评测分数",key:"score",render(e){return a("span",null,[e.score])}},{title:"音准",key:"intonation",render(e){return a("span",null,[e.intonation])}},{title:"节奏",key:"cadence",render(e){return a("span",null,[e.cadence])}},{title:"完整度",key:"integrity",render(e){return a("span",null,[e.integrity])}},{title:"操作",key:"id",render(e){return a(A,{text:!0,type:"primary",onClick:()=>{x(e)}},{default:()=>[n("评测报告")]})}}],d=async()=>{const e=await H({userId:o.studentId,...s.pagination,classGroupId:o.classGroupId,feature:"EVALUATION",...R(l.value,["startTime","endTime"],"YYYY-MM-DD")});s.tableList=e.data.rows,s.pagination.pageTotal=e.data.total},x=e=>{console.log(e.id,"gotoRecode");const r=f.getToken;i.value=O()+"/instrument/?v=".concat(+new Date,"#/evaluat-report?v=").concat(+new Date,"&id=").concat(e.id,"&platform=webTeacher&Authorization=").concat(r),p.detailVisiable=!0},m=()=>{s.pagination.page=1,d(),I({current:{timer:l.value},saveKey:"classStudentRecordEvaluationRecords"})},h=()=>{l.value=[v(new Date().getTime()),T(new Date().getTime())],m(),I({current:{timer:l.value},saveKey:"classStudentRecordEvaluationRecords"})};B({current:{timer:l.value},saveKey:"classStudentRecordEvaluationRecords",callBack:e=>{l.value=e.timer}});const C=c();return P(()=>{d(),console.log(o.studentId)}),()=>a(y,null,[a(Q,{"label-placement":"left",inline:!0},{default:()=>[a(E,null,{default:()=>[a(U,{value:l.value,"onUpdate:value":e=>l.value=e,separator:"至",type:"daterange",timerValue:l.value},null)]}),a(E,null,{default:()=>[a(M,{justify:"end"},{default:()=>[a(A,{type:"primary",class:"searchBtn",onClick:m},{default:()=>[n("搜索")]}),a(A,{type:"primary",ghost:!0,class:"resetBtn",onClick:h},{default:()=>[n("重置")]})]})]})]}),a("div",{class:t.tableWrap},[a(W,{class:t.classTable,loading:s.loading,columns:b(),data:s.tableList},{empty:()=>a(S,null,null)}),a(X,{page:s.pagination.page,"onUpdate:page":e=>s.pagination.page=e,pageSize:s.pagination.rows,"onUpdate:pageSize":e=>s.pagination.rows=e,pageTotal:s.pagination.pageTotal,"onUpdate:pageTotal":e=>s.pagination.pageTotal=e,onList:d,sync:!0},null)]),a(J,{maskClosable:z,show:p.detailVisiable,"onUpdate:show":e=>p.detailVisiable=e,preset:"card",class:["modalTitle background",t.reportModel],title:"评测报告"},{default:()=>[a("div",{class:t.reportContainer,style:{lineHeight:0}},[a("iframe",{width:"100%",height:"450px",ref:C,frameborder:"0",onLoad:e=>{Z(e.target)},src:i.value},null)])]})])}});export{ca as E,ua as P,ra as f,oa as m};
|