1 |
- import{S as L}from"./index-b4f60be6-1720699367816.js";import{C as I}from"./index-0a5ab27a-1720699367816.js";import{P as N}from"./index-3d012fb0-1720699367816.js";import{q as R,r as A}from"./api-8195f6bd-1720699367816.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-b48b51d2-1720699367816.js";import{C as j}from"./index-aeb65bef-1720699367816.js";import{d as G}from"./teacherIcon-b8e3946d-1720699367816.js";import{t as z}from"./searchArray-24a79f64-1720699367816.js";import{T as O}from"./TrainingDetails-7a28fbd0-1720699367816.js";import{T as J}from"./index-a2dc20f3-1720699367816.js";import{e as Q}from"./index-43a4a5ce-1720699367816.js";import"./index.module-18dca782-1720699367816.js";import"./index-6c3327f3-1720699367816.js";import"./api-ae9134d7-1720699367816.js";import"./index-96385afb-1720699367816.js";import"./Slider-e8b4d094-1720699367816.js";import"./urlUtils-72ef455d-1720699367816.js";import"./Scrollbar-74a02354-1720699367816.js";import"./icon_default-d1bcaf5f-1720699367816.js";import"./icon-plus-t-35f4cdeb-1720699367816.js";import"./api-b5ee56f7-1720699367816.js";import"./icon-pan-16e35a82-1720699367816.js";import"./api-53c4c1b8-1720699367816.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},je=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{je as default};
|