evaluationRecords-05d1bafb-1726219372904.js 14 KB

1
  1. import{s as r}from"./index.module-54c73193-1726219372904.js";import{u as j}from"./useECharts-c319041a-1726219372904.js";import{c as V,d as J}from"./api-b3e2f6f8-1726219372904.js";import{s as z}from"./api-0e5ba9bf-1726219372904.js";import{g as C,a as E,c as o,N as v,d as m,b}from"./dateFormat-0341fa65-1726219372904.js";import{C as U}from"./index-6fc10175-1726219372904.js";import{T as M}from"./index-2727764b-1726219372904.js";import{i as P,s as x}from"./use-async-9f56226e-1726219372904.js";import{d as Y,r as p,e as S,q as Q,f as e,N as W,g as c,x as G,j as A,k as i,aG as H,F as f,c as Z,h as X,y as N,aP as B,l as O,m as q,G as K,aM as R}from"./index-1ec0a32d-1726219372904.js";import{P as $}from"./index-be61723a-1726219372904.js";import{v as _}from"./urlUtils-72ef455d-1726219372904.js";import{C as L}from"./index-c5832142-1726219372904.js";import{e as ee}from"./searchArray-26034d65-1726219372904.js";const ge="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+G66EradqEWwKhGugPw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iH4WiLM3JlcDchn6VDB8G9ivaUVaWmo3smfkyHeejXCV6pokpAp96rs2poaNnD6Nk3ov4izbgPBx92Xp0pgvogigkKu/P+YCHNeppvWRbQH0BOu3CUNcWdhZxwJ5I/pATuNA3mbJNcnQmzJAPyWbraFXwqiOGqq8Vipq7mztj6mR9M2dkMaN7QBdk6YjtnOIMrNA5+ljZI25e2SvEDAqjZoPRng0NURwPSobukXXoawApDJrSPTJBYngjyY+RayhkzTimIPpGXDUjF4S3OulacoeAU05nVe1wJjGIwHGRs6C5fx9lZVJy9gm6TVlRxsvg8HDNEcD3G7+33RmeyLaiWENyTVVQIi+YMzvxNh5ppm0QjcYr5WjdYFrCGwTMKCvDwPdstLAA6S2NUdwJ7sZbdwQ5XdTWMa329jBok6EakqIMnx6OxaycvlIvwH+wgy5cy9OxMAAAAASUVORK5CYII=",he=Y({name:"student-practiceData",props:{studentId:{type:String,default:""},classGroupId:{type:String,default:""}},setup(d){const F=p(null),{setOptions:g}=j(F),D=p(!0),t=S({height:"360px",width:"100%",practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0,dateList:[],timeList:[]}),s=S({loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],goCourseVisiable:!1}),n=p([C(new Date().getTime()),E(new Date().getTime())]),h=()=>[{title:"日期",key:"date"},{title:"学练时长",key:"practiceDuration",render(l){return e(f,null,[" ",e(f,null,[l.practiceDuration?o(l.practiceDuration)>0?o(l.practiceDuration)+"分"+m(l.practiceDuration)+"秒":m(l.practiceDuration)+"秒":"0分钟"])])}}],y=async()=>{try{const l=await z({page:1,rows:999,studentId:d.studentId,classGroupId:d.classGroupId,...b(n.value,["startTime","endTime"],"YYYY-MM-DD")});s.tableList=l.data.rows}catch(l){console.log(l)}},T=()=>{g({tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!1,selected:{"学练时长(分钟)":D.value}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{show:!0},data:t.dateList},yAxis:[{type:"value",axisLabel:{formatter:l=>o(l)+"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:t.timeList,type:"bar",barWidth:"48px",stack:"total",itemStyle:{normal:{barBorderRadius:[8,8,0,0],color:"#D5E9FF"},emphasis:{focus:"series",color:"#3583FA"}}}],formatter:l=>Array.isArray(l)?[l[0].axisValueLabel,...l.map(u=>{let k;return o(u.value)>0?k=o(u.value)+"分"+m(u.value)+"秒":k=m(u.value)+"秒","<br/>".concat(u.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(""):l})},w=async()=>{try{const l=await V({studentId:d.studentId,classGroupId:d.classGroupId,...b(n.value,["startTime","endTime"],"YYYY-MM-DD")});t.practiceDays=l.data.practiceDays,t.practiceDurationAvg=l.data.practiceDurationAvg,t.practiceDurationTotal=l.data.practiceDurationTotal,t.dateList=l.data.trainingStatDetailList.map(u=>u.date),t.timeList=l.data.trainingStatDetailList.map(u=>u.practiceDuration),T()}catch(l){console.log(l)}},I=()=>{s.pagination.page=1,w(),y(),x({current:{timer:n.value},saveKey:"classStudentRecordPracticeData"})},a=()=>{n.value=[C(new Date().getTime()),E(new Date().getTime())],I(),y(),x({current:{timer:n.value},saveKey:"classStudentRecordPracticeData"})};return P({current:{timer:n.value},saveKey:"classStudentRecordPracticeData",callBack:l=>{n.value=l.timer}}),Q(()=>{console.log(d.studentId),w(),y()}),()=>e(f,null,[e(W,{"label-placement":"left",inline:!0},{default:()=>[e(c,null,{default:()=>[e(U,{value:n.value,"onUpdate:value":l=>n.value=l,separator:"至",type:"daterange",timerValue:n.value},null)]}),e(c,null,{default:()=>[e(G,{justify:"end"},{default:()=>[e(A,{type:"primary",class:"searchBtn",onClick:I},{default:()=>[i("搜索")]}),e(A,{type:"primary",ghost:!0,class:"resetBtn",onClick:a},{default:()=>[i("重置")]})]})]})]}),e("div",{class:r.homeTrainData},[e("div",{class:r.TrainDataTop},[e("div",{class:r.TrainDataTopLeft},[e("div",{class:r.TrainDataItem},[e("p",{class:r.TrainDataItemTitle},[o(t.practiceDurationTotal)>0?e("div",null,[e("span",null,[e(v,{from:0,to:o(t.practiceDurationTotal)},null)]),e("i",{style:{width:"4px",display:"inline-block"}},null),i("分"),e("i",{style:{width:"4px",display:"inline-block"}},null)]):null,e("div",null,[e("span",null,[e(v,{from:0,to:m(t.practiceDurationTotal)},null)]),e("i",{style:{width:"4px",display:"inline-block"}},null),i("秒")])]),e("p",{class:r.TrainDataItemsubTitle},[i("累计练习时长")])]),e("div",{class:r.TrainDataItem},[e("p",{class:r.TrainDataItemTitle},[o(t.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(v,{from:0,to:o(t.practiceDurationAvg)},null)]),e("i",{style:{width:"4px",display:"inline-block"}},null),i("分"),e("i",{style:{width:"4px",display:"inline-block"}},null)]):null,e("div",null,[e("span",null,[e(v,{from:0,to:m(t.practiceDurationAvg)},null)]),e("i",{style:{width:"4px",display:"inline-block"}},null),i("秒")])]),e("p",{class:r.TrainDataItemsubTitle},[i("平均每天练习时长")])]),e("div",{class:r.TrainDataItem},[e("p",{class:r.TrainDataItemTitle},[e("div",null,[e("span",null,[e(v,{from:0,to:t.practiceDays},null)]),e("i",{style:{width:"4px",display:"inline-block"}},null),i("天")])]),e("p",{class:r.TrainDataItemsubTitle},[i("练习天数")])])]),e("div",{class:r.TrainDataTopRight},[e("div",{class:[r.DataTopRightItem,D.value?"":r.DataTopRightItemDis]},[e("div",{class:[r.DataTopRightDot,r.DataTopRightDotBlue]},null),e("p",null,[i("学练时长(分钟)")])])])]),e("div",{class:r.chatrs},[e("div",{ref:F,style:{height:t.height,width:t.width}},null)]),e("div",{class:[r.tableWrap,r.tableWrapEcharts]},[e(H,{class:r.classTable,loading:s.loading,columns:h(),data:s.tableList},{empty:()=>e(M,null,null)})])])])}}),ye=Y({name:"student-practiceData",props:{studentId:{type:String,default:""},classGroupId:{type:String,default:""}},setup(d){const F=Z();p(null);const g=S({height:"360px",width:"100%",practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0,dateList:[],timeList:[],detailVisiable:!1}),D=p(""),t=S({loading:!1,pagination:{page:1,rows:10,pageTotal:4},searchForm:{musicSheetName:"",heardLevel:null,userMusicFlag:null,minScore:null,maxScore:null,musicStartTime:[]},tableList:[],goCourseVisiable:!1}),s=p([C(new Date().getTime()),E(new Date().getTime())]),n=()=>[{title:"时间",key:"createTime"},{title:"评测曲目",key:"musicSheetName",render(a){return e("span",null,[a.musicSheetName])}},{title:"评测难度",key:"heardLevel",render(a){return e(f,null,[a.heardLevel==null?e("span",null,[i("--")]):null,a.heardLevel=="BEGINNER"?e(R,{type:"info"},{default:()=>[i("入门级")]}):null,a.heardLevel=="ADVANCED"?e(R,{type:"warning"},{default:()=>[i("进阶级")]}):null,a.heardLevel=="PERFORMER"?e(R,{type:"error"},{default:()=>[i("大师级")]}):null])}},{title:"评测分数",key:"score",render(a){return e("span",null,[a.score])}},{title:"音准",key:"intonation",render(a){return e("span",null,[a.intonation])}},{title:"节奏",key:"cadence",render(a){return e("span",null,[a.cadence])}},{title:"完整度",key:"integrity",render(a){return e("span",null,[a.integrity])}},{title:"生成作品",key:"integrity",render(a){return e("span",null,[a.userMusicFlag?"是":"否"])}},{title:"生成时间",key:"userMusicTime",render(a){return e("span",null,[a.userMusicTime||"--"])}},{title:"操作",key:"id",render(a){return e(A,{text:!0,type:"primary",onClick:()=>{y(a)}},{default:()=>[i("评测报告")]})}}],h=async()=>{const{musicStartTime:a,...l}=t.searchForm,u=await J({userId:d.studentId,...t.pagination,...l,...b(a,["userMusicStartTime","userMusicEndTime"],"YYYY-MM-DD"),classGroupId:d.classGroupId,feature:"EVALUATION",...b(s.value,["startTime","endTime"],"YYYY-MM-DD")});t.tableList=u.data.rows,t.pagination.pageTotal=u.data.total},y=a=>{const l=F.getToken;D.value=_()+"/instrument/?v=".concat(+new Date,"#/evaluat-report?v=").concat(+new Date,"&id=").concat(a.id,"&platform=webTeacher&Authorization=").concat(l),g.detailVisiable=!0},T=()=>{t.pagination.page=1,h(),x({current:{timer:s.value},saveKey:"classStudentRecordEvaluationRecords"})},w=()=>{s.value=[C(new Date().getTime()),E(new Date().getTime())],t.searchForm={musicSheetName:"",heardLevel:null,userMusicFlag:null,minScore:null,maxScore:null,musicStartTime:[]},T(),x({current:{timer:s.value},saveKey:"classStudentRecordEvaluationRecords"})};P({current:{timer:s.value},saveKey:"classStudentRecordEvaluationRecords",callBack:a=>{s.value=a.timer}});const I=p();return Q(()=>{h()}),()=>e(f,null,[e(W,{"label-placement":"left",inline:!0,style:"flex-wrap: wrap;"},{default:()=>[e(c,null,{default:()=>[e(U,{value:s.value,"onUpdate:value":a=>s.value=a,separator:"至",type:"daterange",class:r.datePicker,startPlaceholder:"评测开始时间",endPlaceholder:"评测结束时间",timerValue:s.value},null)]}),e(c,null,{default:()=>[e(X,{placeholder:"请输入曲目名称",value:t.searchForm.musicSheetName,"onUpdate:value":a=>t.searchForm.musicSheetName=a},null)]}),e(c,null,{default:()=>[e(L,N({options:ee,placeholder:"请输入评测难度",clearable:!0,inline:!0},{value:t.searchForm.heardLevel,"onUpdate:value":a=>t.searchForm.heardLevel=a}),null)]}),e(c,null,{default:()=>[e("div",{class:r.inputRangeSection},[e(B,{placeholder:"最小分值",min:0,max:t.searchForm.maxScore||100,showButton:!1,precision:0,value:t.searchForm.minScore,"onUpdate:value":a=>t.searchForm.minScore=a},null),e("span",{class:r.pair},[i("-")]),e(B,{placeholder:"最大分值",min:t.searchForm.minScore||0,max:100,precision:0,showButton:!1,value:t.searchForm.maxScore,"onUpdate:value":a=>t.searchForm.maxScore=a},null)])]}),e(c,null,{default:()=>[e(L,N({options:[{label:"是",value:!0},{label:"否",value:!1}],placeholder:"请选择是否生成作品",clearable:!0,inline:!0},{value:t.searchForm.userMusicFlag,"onUpdate:value":a=>t.searchForm.userMusicFlag=a}),null)]}),e(c,null,{default:()=>[e(U,N({value:t.searchForm.musicStartTime,"onUpdate:value":a=>t.searchForm.musicStartTime=a,separator:"至",class:r.datePicker,type:"daterange",startPlaceholder:"生成开始时间",endPlaceholder:"生成结束时间"},{clearable:!0},{timerValue:t.searchForm.musicStartTime}),null)]}),e(c,null,{default:()=>[e(G,{justify:"end"},{default:()=>[e(A,{type:"primary",class:"searchBtn",onClick:T},{default:()=>[i("搜索")]}),e(A,{type:"primary",ghost:!0,class:"resetBtn",onClick:w},{default:()=>[i("重置")]})]})]})]}),e("div",{class:r.tableWrap},[e(H,{class:r.classTable,loading:t.loading,columns:n(),data:t.tableList},{empty:()=>e(M,null,null)}),e($,{page:t.pagination.page,"onUpdate:page":a=>t.pagination.page=a,pageSize:t.pagination.rows,"onUpdate:pageSize":a=>t.pagination.rows=a,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":a=>t.pagination.pageTotal=a,onList:h,sync:!0},null)]),e(O,{maskClosable:q,show:g.detailVisiable,"onUpdate:show":a=>g.detailVisiable=a,preset:"card",class:["modalTitle background",r.reportModel],title:"评测报告"},{default:()=>[e("div",{class:r.reportContainer,style:{lineHeight:0}},[e("iframe",{width:"100%",ref:I,frameborder:"0",onLoad:a=>{K(a.target)},src:D.value},null)])]})])}});export{ye as E,he as P,ge as f,De as m};