import{S as L}from"./index-2343cbda-1724872791500.js";import{C as I}from"./index-8351aa81-1724872791500.js";import{P as N}from"./index-7c3a1a20-1724872791500.js";import{q as R,r as A}from"./api-f59ea4cf-1724872791500.js";import{d as B,e as H,r as C,a as M,q as W,U as Y,f as t,w as U,k as i,Q as k,x as F,aN as p,N as q,g as d,y as _,j as h,aG as V,l as $,m as P}from"./index-d5898469-1724872791500.js";import{C as j}from"./index-a2b71fe1-1724872791500.js";import{d as G}from"./teacherIcon-b8e3946d-1724872791500.js";import{t as z}from"./searchArray-7d27a5ef-1724872791500.js";import{T as O}from"./TrainingDetails-a8cf005f-1724872791500.js";import{T as J}from"./index-81f77935-1724872791500.js";import{e as Q}from"./contants-81f70019-1724872791500.js";import"./index.module-7d86a2ea-1724872791500.js";import"./index-323ee661-1724872791500.js";import"./api-a584700f-1724872791500.js";import"./index-ba618019-1724872791500.js";import"./Slider-a3783332-1724872791500.js";import"./index-8eefb3e6-1724872791500.js";import"./urlUtils-72ef455d-1724872791500.js";import"./icon_default-d1bcaf5f-1724872791500.js";import"./useSpeak-6168804b-1724872791500.js";import"./api-06cc7b3f-1724872791500.js";import"./icon-pan-16e35a82-1724872791500.js";import"./api-8001726c-1724872791500.js";import"./Scrollbar-d9cfeed6-1724872791500.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",_e="_workafterInfo_1kcpn_180",he="_wordDetailModel_1kcpn_200",Te="_isok_1kcpn_203",ve="_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:_e,wordDetailModel:he,isok:Te,ison:ve,nosub:we},Ge=B({name:"student-studentList",setup(){const e=H({searchForm:{keyword:"",vipFlag:null,trainingStatus:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},studentClassList:[],tableList:[],workInfo:{},detailVisiable:!1,activeRow:null,index:0}),m=C(),c=M(),D=C([{name:"班级管理",path:"/classList"},{name:c.query.name,path:"/classDetail"},{name:c.query.teacherName,path:"/afterWorkDetail"}]),T=()=>{e.pagination.page=1,u(),console.log("search",e)},E=()=>{e.searchForm={keyword:"",trainingStatus:"",vipFlag:null},T()},u=async(n,o)=>{e.loading=!0;try{const r=await R({classGroupId:c.query.classGroupId||"",trainingId:c.query.trainingId,...e.searchForm,...e.pagination,page:o||e.pagination.page});e.tableList=r.data.rows,e.pagination.page=r.data.current,e.pagination.pageTotal=r.data.total,e.loading=!1,n==="next"?(e.index=0,v()):n==="prev"&&(e.index=e.tableList.length+1,w())}catch(r){e.loading=!1,console.log(r)}},x=async()=>{try{const o=(await A({trainingId:c.query.trainingId})).data||{};let r="",g="";o.studentLessonTrainingDetails&&o.studentLessonTrainingDetails.length>0&&o.studentLessonTrainingDetails.forEach(l=>{const s=l.trainingContent?JSON.parse(l.trainingContent):null;if(l.trainingType==="PRACTICE"&&l.musicName&&(r+="《"+l.musicName+"》",s)){const f=["".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"),"速度".concat(s.practiceSpeed),"".concat(s.trainingTimes,"分钟")];r+=f.join(" | ")+";"}if(l.trainingType==="EVALUATION"&&l.musicName&&(g+="《"+l.musicName+"》",s)){const f=["".concat(Q[s.evaluateDifficult]),s.practiceChapterBegin||s.practiceChapterEnd?"".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"):"全部小节","".concat(s.trainingTimes,"分合格")];g+=f.join(" | ")+";"}}),o.pTitle=r,o.eTitle=g,e.workInfo=o}catch(n){console.log(n)}},y=(n,o)=>{e.index=o+1,e.activeRow=n,e.detailVisiable=!0};W(()=>{x(),u()});const b=()=>[{title:"学生姓名",key:"studentName"},{title:"最后提交时间",key:"submitTime",render(n){return n.submitTime?k(n.submitTime).format("YYYY-MM-DD"):"--"}},{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(h,{text:!0,type:"primary",onClick:()=>{y(n,o)}},{default:()=>[i("详情")]})}}],v=()=>{e.index>=e.tableList.length?u("next",e.pagination.page+1):(++e.index,e.activeRow=e.tableList[e.index-1],m.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},w=()=>{e.index===1&&e.pagination.page!==1?u("prev",e.pagination.page-1):(--e.index,e.activeRow=e.tableList[e.index-1],m.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},S=Y(()=>e.index+(e.pagination.page-1)*e.pagination.rows);return()=>t("div",null,[t(j,{list:D.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(U,{class:a.teacherHeaderImg,src:e.workInfo.teacherAvatar||G,previewDisabled:!0},null)])]),t("div",{class:a.workafterInfo},[t("h4",null,[e.workInfo.teacherName]),e.workInfo.createTime&&t("p",null,[i("布置时间:"),e.workInfo.createTime&&k(e.workInfo.createTime).format("YYYY-MM-DD HH:mm")," ",i("|")," ",t("span",null,[i("截止时间:"),e.workInfo.expireDate&&k(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(F,{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(q,{"label-placement":"left",inline:!0},{default:()=>[t(d,null,{default:()=>[t(L,_({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:e.searchForm.keyword,onChangeValue:n=>e.searchForm.keyword=n}),null)]}),t(d,null,{default:()=>[t(I,_({options:[{label:"全部状态",value:""},...z],placeholder:"作业状态",clearable:!0,inline:!0},{value:e.searchForm.trainingStatus,"onUpdate:value":n=>e.searchForm.trainingStatus=n}),null)]}),t(d,null,{default:()=>[t(I,_({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(d,null,{default:()=>[t(F,{justify:"end"},{default:()=>[t(h,{type:"primary",class:"searchBtn",onClick:T},{default:()=>[i("搜索")]}),t(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:E},{default:()=>[i("重置")]})]})]})]})]),t("div",{class:a.tableWrap},[t(V,{class:a.classTable,loading:e.loading,columns:b(),data:e.tableList},{empty:()=>t(J,null,null)}),t(N,{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:u},null)])]),t($,{maskClosable:P,show:e.detailVisiable,"onUpdate:show":n=>e.detailVisiable=n,preset:"card",class:["modalTitle background",a.wordDetailModel],title:"作业详情"},{default:()=>[t(O,{onNext:()=>v(),onPre:()=>w(),ref:m,onClose:()=>e.detailVisiable=!1,total:e.pagination.pageTotal,current:S.value,activeRow:e.activeRow},null)]})])}});export{Ge as default};