1 |
- import{S as L}from"./index-7f4ffec0-1734950731618.js";import{C as I}from"./index-c7074e8f-1734950731618.js";import{P as A}from"./index-4013b1bc-1734950731618.js";import{q as B,r as N}from"./api-23af9df8-1734950731618.js";import{d as R,e as H,r as F,a as M,q as W,U as Y,f as t,w as U,k as i,Q as k,x as E,aO as p,N as q,g as d,y as _,j as h,aG as V,l as $,m as P}from"./index-efb66432-1734950731618.js";import{C as j}from"./index-4b5fede7-1734950731618.js";import{d as G}from"./teacherIcon-b8e3946d-1734950731618.js";import{t as z}from"./searchArray-e332cd94-1734950731618.js";import{T as O}from"./TrainingDetails-8760148e-1734950731618.js";import{T as J}from"./index-043f1db0-1734950731618.js";import{e as Q}from"./contants-84ba384e-1734950731618.js";import"./index.module-f5d3eb8e-1734950731618.js";import"./index-320e7fe8-1734950731618.js";import"./api-5d798bfa-1734950731618.js";import"./index-b40f8126-1734950731618.js";import"./Slider-f8e18c57-1734950731618.js";import"./index-1071cbc8-1734950731618.js";import"./urlUtils-7f82c85e-1734950731618.js";import"./icon_default-d1bcaf5f-1734950731618.js";import"./useSpeak-591a8844-1734950731618.js";import"./api-9f0dec79-1734950731618.js";import"./icon-pan-16e35a82-1734950731618.js";import"./api-d3492aaa-1734950731618.js";import"./Scrollbar-10f58cff-1734950731618.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=R({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=F(),c=M(),C=F([{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)},D=()=>{e.searchForm={keyword:"",trainingStatus:"",vipFlag:null},T()},u=async(n,o)=>{e.loading=!0;try{const r=await B({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 N({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:C.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(E,{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(E,{justify:"end"},{default:()=>[t(h,{type:"primary",class:"searchBtn",onClick:T},{default:()=>[i("搜索")]}),t(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:D},{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(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: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};
|