import{S}from"./index-1c1bf5e5-1731319840132.js";import{C as h}from"./index-108fa044-1731319840132.js";import{P as A}from"./index-9710e333-1731319840132.js";import{c as B,d as N}from"./api-e1c56b76-1731319840132.js";import{d as R,a as H,e as M,r as I,q as U,U as Y,f as t,w as W,k as i,Q as _,x as C,aO as p,N as V,g as u,y as d,j as v,aG as G,l as $,m as q}from"./index-6198d9d3-1731319840132.js";import{C as P}from"./index-e298ada2-1731319840132.js";import{d as j}from"./teacherIcon-b8e3946d-1731319840132.js";import{t as z}from"./searchArray-3567ea02-1731319840132.js";import{T as O}from"./index-eedcb178-1731319840132.js";import{T as J}from"./TrainingDetails-3fa2e4d9-1731319840132.js";import{e as Q}from"./contants-333a16ae-1731319840132.js";import"./api-de5ca66f-1731319840132.js";import"./index.module-f5d3eb8e-1731319840132.js";import"./index-682c2bb7-1731319840132.js";import"./api-7fc192d9-1731319840132.js";import"./index-114185ea-1731319840132.js";import"./Slider-25b157fd-1731319840132.js";import"./index-d85dbeb3-1731319840132.js";import"./urlUtils-72ef455d-1731319840132.js";import"./icon_default-d1bcaf5f-1731319840132.js";import"./useSpeak-f6847790-1731319840132.js";import"./api-70d4d585-1731319840132.js";import"./icon-pan-16e35a82-1731319840132.js";import"./api-5a9c06c7-1731319840132.js";import"./Scrollbar-924d915b-1731319840132.js";const K="_listWrap_1kcpn_1",X="_teacherSection_1kcpn_7",Z="_tTemp_1kcpn_14",ee="_infos_1kcpn_18",te="_homeTitle_1kcpn_24",ae="_homeContent_1kcpn_31",ne="_homeworkText_1kcpn_34",ie="_pSection_1kcpn_38",oe="_p1_1kcpn_41",se="_p2_1kcpn_42",re="_title_1kcpn_70",le="_text_1kcpn_75",ce="_stitcTitle_1kcpn_83",ue="_stitcConent_1kcpn_102",pe="_contentRect_1kcpn_105",de="_nums_1kcpn_116",me="_teacherList_1kcpn_137",ge="_teacherHeader_1kcpn_154",fe="_teacherHeaderBorder_1kcpn_162",ke="_teacherHeaderImg_1kcpn_174",he="_workafterInfo_1kcpn_180",_e="_wordDetailModel_1kcpn_200",ve="_isok_1kcpn_203",Te="_ison_1kcpn_207",we="_nosub_1kcpn_211",a={listWrap:K,teacherSection:X,tTemp:Z,infos:ee,homeTitle:te,homeContent:ae,homeworkText:ne,pSection:ie,p1:oe,p2:se,title:re,text:le,stitcTitle:ce,stitcConent:ue,contentRect:pe,nums:de,teacherList:me,teacherHeader:ge,teacherHeaderBorder:fe,teacherHeaderImg:ke,workafterInfo:he,wordDetailModel:_e,isok:ve,ison:Te,nosub:we},Oe=R({name:"homewrok-record-detail",setup(){const m=H(),e=M({searchForm:{keyword:"",vipFlag:null,trainingStatus:"",classGroupId:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},studentClassList:[],tableList:[],workInfo:{},detailVisiable:!1,activeRow:null,index:0}),g=I(),E=I([{name:"作业",path:"/homework-record"},{name:m.query.name,path:"/homework-record-detail"}]),T=()=>{e.pagination.page=1,c()},D=()=>{e.searchForm={keyword:"",vipFlag:null,trainingStatus:"",classGroupId:""},T()},c=async(n,o)=>{e.loading=!0;try{const l=await B({trainingId:m.query.id,...e.searchForm,...e.pagination,page:o||e.pagination.page});e.tableList=l.data.rows,e.pagination.pageTotal=l.data.total,e.pagination.page=l.data.current,e.loading=!1,n==="next"?(e.index=0,w()):n==="prev"&&(e.index=e.tableList.length+1,F())}catch(l){e.loading=!1,console.log(l)}},x=async()=>{try{const o=(await N({id:m.query.id})).data||{};let l="",f="";o.studentLessonTrainingDetails&&o.studentLessonTrainingDetails.length>0&&o.studentLessonTrainingDetails.forEach(r=>{const s=r.trainingContent?JSON.parse(r.trainingContent):null;if(r.trainingType==="PRACTICE"&&r.musicName&&(l+="《"+r.musicName+"》",s)){const k=["".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"),"速度".concat(s.practiceSpeed),"".concat(s.trainingTimes,"分钟")];l+=k.join(" | ")+";"}if(r.trainingType==="EVALUATION"&&r.musicName&&(f+="《"+r.musicName+"》",s)){const k=["".concat(Q[s.evaluateDifficult]),s.practiceChapterBegin||s.practiceChapterEnd?"".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"):"全部小节","".concat(s.trainingTimes,"分达标")];f+=k.join(" | ")+";"}}),o.pTitle=l,o.eTitle=f,e.workInfo=o,(o.studentClassGroup||[]).forEach(r=>{e.studentClassList.push({label:r.name,value:r.id})})}catch(n){console.log(n)}},b=(n,o)=>{console.log(o,"index"),e.index=o+1,e.activeRow=n,e.detailVisiable=!0};U(()=>{x(),c()});const y=()=>[{title:"学生姓名",key:"studentName"},{title:"最后提交时间",key:"submitTime",render(n){return n.submitTime?_(n.submitTime).format("YYYY-MM-DD"):"--"}},{title:"所属班级",key:"classGroupName"},{title:"作业状态",key:"trainingStatus",render(n){return t("div",null,[n.trainingStatus=="UNSUBMITTED"?t("p",{class:a.nosub},[i("未提交")]):null,n.trainingStatus=="SUBMITTED"?t("p",{class:a.ison},[i("未达标")]):null,n.trainingStatus=="TARGET"?t("p",{class:a.isok},[i("达标")]):null])}},{title:"是否会员",key:"vipFlag",render(n){return n.vipFlag?"是":"否"}},{title:"操作",key:"id",render(n,o){return t(v,{text:!0,type:"primary",onClick:()=>{b(n,o)}},{default:()=>[i("详情")]})}}],w=()=>{e.index>=e.tableList.length?c("next",e.pagination.page+1):(++e.index,e.activeRow=e.tableList[e.index-1],g.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},F=()=>{e.index===1&&e.pagination.page!==1?c("prev",e.pagination.page-1):(--e.index,e.activeRow=e.tableList[e.index-1],g.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},L=Y(()=>e.index+(e.pagination.page-1)*e.pagination.rows);return()=>t("div",null,[t(P,{list:E.value},null),t("div",{class:a.listWrap},[t("div",{class:a.teacherSection},[t("div",{class:a.teacherList},[t("div",{class:a.tTemp},[t("div",{class:a.teacherHeader},[t("div",{class:a.teacherHeaderBorder},[t(W,{class:a.teacherHeaderImg,src:e.workInfo.teacherAvatar||j,previewDisabled:!0},null)])]),t("div",{class:a.workafterInfo},[t("h4",null,[e.workInfo.teacherName]),e.workInfo.createTime&&t("p",null,[i("布置时间:"),e.workInfo.createTime&&_(e.workInfo.createTime).format("YYYY-MM-DD HH:mm")," ",i("|")," ",t("span",null,[i("截止时间:"),e.workInfo.expireDate&&_(e.workInfo.expireDate).format("YYYY-MM-DD HH:mm")])])])]),t("div",{class:a.infos},[t("div",{class:a.homeTitle},[e.workInfo.name]),t("div",{class:[a.homeContent,a.homeworkText]},[t("div",{class:a.pSection},[e.workInfo.pTitle&&t("p",{class:[a.text,a.p1]},[t("div",null,[t("span",null,[i("练习曲目:")]),t("p",null,[e.workInfo.pTitle])])]),e.workInfo.eTitle&&t("p",{class:[a.text,a.p2]},[t("div",null,[t("span",null,[i("评测曲目:")]),t("p",null,[e.workInfo.eTitle])])])])])])]),t("div",null,[t("div",{class:a.stitcTitle},[i("作业完成情况")]),t("div",{class:a.stitcConent},[t(C,{size:[38,0]},{default:()=>[t(p,{percentage:e.workInfo.trainingRate||0,"offset-degree":180,type:"circle",strokeWidth:6,"rail-color":"EDEFFA",color:"#64A5FF"},{default:()=>[t("div",{class:a.contentRect},[t("div",{class:a.nums},[e.workInfo.trainingNum||0,t("i",null,[i("/")]),e.workInfo.expectNum||0,t("span",null,[i("人")])]),t("div",{class:a.text},[i("已提交")])])]}),t(p,{percentage:e.workInfo.trainingRate||0,"offset-degree":180,strokeWidth:6,type:"circle","rail-color":"EDEFFA",color:"#64A5FF"},{default:()=>[t("div",{class:a.contentRect},[t("div",{class:a.nums},[e.workInfo.trainingRate||0,i("%")]),t("div",{class:a.text},[i("提交率")])])]}),t(p,{percentage:e.workInfo.qualifiedRate||0,"offset-degree":180,strokeWidth:6,type:"circle","rail-color":"EDEFFA",color:"#40CEAE"},{default:()=>[t("div",{class:a.contentRect},[t("div",{class:a.nums},[e.workInfo.standardNum||0,t("span",null,[i("人")])]),t("div",{class:a.text},[i("达标人数")])])]}),t(p,{percentage:e.workInfo.qualifiedRate||0,"offset-degree":180,strokeWidth:6,type:"circle","rail-color":"EDEFFA",color:"#40CEAE"},{default:()=>[t("div",{class:a.contentRect},[t("div",{class:a.nums},[e.workInfo.qualifiedRate||0,i("%")]),t("div",{class:a.text},[i("达标率")])])]})]})])])]),t("div",{class:a.searchList},[t(V,{"label-placement":"left",inline:!0},{default:()=>[t(u,null,{default:()=>[t(S,d({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:e.searchForm.keyword,onChangeValue:n=>e.searchForm.keyword=n}),null)]}),t(u,null,{default:()=>[t(h,d({options:[{label:"全部班级",value:""},...e.studentClassList],placeholder:"全部班级",clearable:!0,inline:!0},{value:e.searchForm.classGroupId,"onUpdate:value":n=>e.searchForm.classGroupId=n}),null)]}),t(u,null,{default:()=>[t(h,d({options:[{label:"全部状态",value:""},...z],placeholder:"作业状态",clearable:!0,inline:!0},{value:e.searchForm.trainingStatus,"onUpdate:value":n=>e.searchForm.trainingStatus=n}),null)]}),t(u,null,{default:()=>[t(h,d({options:[{label:"是",value:!0},{label:"否",value:!1}],placeholder:"是否会员",clearable:!0,inline:!0},{value:e.searchForm.vipFlag,"onUpdate:value":n=>e.searchForm.vipFlag=n}),null)]}),t(u,null,{default:()=>[t(C,{justify:"end"},{default:()=>[t(v,{type:"primary",class:"searchBtn",onClick:T},{default:()=>[i("搜索")]}),t(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:D},{default:()=>[i("重置")]})]})]})]})]),t("div",{class:a.tableWrap},[t(G,{class:a.classTable,loading:e.loading,columns:y(),data:e.tableList},{empty:()=>t(O,null,null)}),t(A,{page:e.pagination.page,"onUpdate:page":n=>e.pagination.page=n,pageSize:e.pagination.rows,"onUpdate:pageSize":n=>e.pagination.rows=n,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":n=>e.pagination.pageTotal=n,onList:c},null)])]),t($,{maskClosable:q,show:e.detailVisiable,"onUpdate:show":n=>e.detailVisiable=n,preset:"card",class:["modalTitle background",a.wordDetailModel],title:"作业详情"},{default:()=>[t(J,{onNext:()=>w(),onPre:()=>F(),ref:g,onClose:()=>e.detailVisiable=!1,total:e.pagination.pageTotal,current:L.value,activeRow:e.activeRow},null)]})])}});export{Oe as default};