1 |
- import{S as L}from"./index-c5d2dc80-1743496079034.js";import{C as I}from"./index-80138d53-1743496079034.js";import{P as A}from"./index-2da90e33-1743496079034.js";import{q as N,r as R}from"./api-d57212df-1743496079034.js";import{d as B,e as H,r as F,a as M,q as W,J as Y,f as t,w as U,k as o,aj as _,x as E,b1 as p,N as q,g as d,y as h,j as T,aU as V,l as $,m as P}from"./index-32ff339b-1743496079034.js";import{C as j}from"./index-4b28fbc5-1743496079034.js";import{d as z}from"./teacherIcon-b8e3946d-1743496079034.js";import{t as G}from"./searchArray-fcbe278d-1743496079034.js";import{T as J}from"./TrainingDetails-ac0265a9-1743496079034.js";import{T as O}from"./index-f645f05d-1743496079034.js";import{e as K}from"./contants-84ba384e-1743496079034.js";import"./index.module-eed6ff4d-1743496079034.js";import"./index-e168b504-1743496079034.js";import"./api-70305ea7-1743496079034.js";import"./index-f6cdd761-1743496079034.js";import"./Slider-6d04791b-1743496079034.js";import"./index-1b97ce1c-1743496079034.js";import"./urlUtils-b5855a3c-1743496079034.js";import"./icon_default-d1bcaf5f-1743496079034.js";import"./useSpeak-f0fad1e8-1743496079034.js";import"./api-a4f14706-1743496079034.js";import"./icon-pan-16e35a82-1743496079034.js";import"./Scrollbar-116ac88a-1743496079034.js";const Q="_listWrap_sr8om_1",X="_teacherSection_sr8om_7",Z="_tTemp_sr8om_14",ee="_infos_sr8om_18",te="_homeTitle_sr8om_24",ae="_homeContent_sr8om_31",ne="_homeworkText_sr8om_34",oe="_pSection_sr8om_38",ie="_p1_sr8om_41",se="_p2_sr8om_42",re="_title_sr8om_70",le="_text_sr8om_75",ce="_stitcTitle_sr8om_83",ue="_stitcConent_sr8om_102",pe="_contentRect_sr8om_105",de="_nums_sr8om_116",me="_teacherList_sr8om_137",ge="_teacherHeader_sr8om_154",fe="_teacherHeaderBorder_sr8om_162",_e="_teacherHeaderImg_sr8om_174",he="_workafterInfo_sr8om_180",Te="_wordDetailModel_sr8om_200",ve="_isok_sr8om_203",ke="_ison_sr8om_207",we="_nosub_sr8om_211",a={listWrap:Q,teacherSection:X,tTemp:Z,infos:ee,homeTitle:te,homeContent:ae,homeworkText:ne,pSection:oe,p1:ie,p2:se,title:re,text:le,stitcTitle:ce,stitcConent:ue,contentRect:pe,nums:de,teacherList:me,teacherHeader:ge,teacherHeaderBorder:fe,teacherHeaderImg:_e,workafterInfo:he,wordDetailModel:Te,isok:ve,ison:ke,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=F(),c=M(),D=F([{name:"班级管理",path:"/classList"},{name:c.query.name,path:"/classDetail"},{name:c.query.teacherName,path:"/afterWorkDetail"}]),v=()=>{e.pagination.page=1,u(),console.log("search",e)},C=()=>{e.searchForm={keyword:"",trainingStatus:"",vipFlag:null},v()},u=async(n,i)=>{e.loading=!0;try{const r=await N({classGroupId:c.query.classGroupId||"",trainingId:c.query.trainingId,...e.searchForm,...e.pagination,page:i||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,k()):n==="prev"&&(e.index=e.tableList.length+1,w())}catch(r){e.loading=!1,console.log(r)}},x=async()=>{try{const i=(await R({trainingId:c.query.trainingId})).data||{};let r="",g="";i.studentLessonTrainingDetails&&i.studentLessonTrainingDetails.length>0&&i.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||0),"".concat(s.trainingTimes,"分钟")];r+=f.join(" | ")+";"}if(l.trainingType==="EVALUATION"&&l.musicName&&(g+="《"+l.musicName+"》",s)){const f=["".concat(K[s.evaluateDifficult]),"".concat(s.practiceChapterBegin||0,"-").concat(s.practiceChapterEnd||0,"小节"),"速度".concat(s.evaluateSpeed||0),"".concat(s.trainingTimes,"分达标")];g+=f.join(" | ")+";"}}),i.pTitle=r,i.eTitle=g,e.workInfo=i}catch(n){console.log(n)}},y=(n,i)=>{e.index=i+1,e.activeRow=n,e.detailVisiable=!0};W(()=>{x(),u()});const b=()=>[{title:"学生姓名",key:"studentName"},{title:"最后提交时间",key:"submitTime",render(n){return n.submitTime?_(n.submitTime).format("YYYY-MM-DD"):"--"}},{title:"作业状态",key:"trainingStatus",render(n){return t("div",null,[n.trainingStatus=="UNSUBMITTED"?t("p",{class:a.nosub},[o("未提交")]):null,n.trainingStatus=="SUBMITTED"?t("p",{class:a.ison},[o("未达标")]):null,n.trainingStatus=="TARGET"?t("p",{class:a.isok},[o("达标")]):null])}},{title:"是否会员",key:"vipFlag",render(n){return n.vipFlag?"是":"否"}},{title:"操作",key:"id",render(n,i){return t(T,{text:!0,type:"primary",onClick:()=>{y(n,i)}},{default:()=>[o("详情")]})}}],k=()=>{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||z,previewDisabled:!0},null)])]),t("div",{class:a.workafterInfo},[t("h4",null,[e.workInfo.teacherName]),e.workInfo.createTime&&t("p",null,[o("布置时间:"),e.workInfo.createTime&&_(e.workInfo.createTime).format("YYYY-MM-DD HH:mm")," ",o("|")," ",t("span",null,[o("截止时间:"),e.workInfo.expireDate&&_(e.workInfo.expireDate).format("YYYY-MM-DD")])])])]),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,[o("练习曲目:")]),t("p",null,[e.workInfo.pTitle])])]),e.workInfo.eTitle&&t("p",{class:[a.text,a.p2]},[t("div",null,[t("span",null,[o("评测曲目:")]),t("p",null,[e.workInfo.eTitle])])])])])])]),t("div",null,[t("div",{class:a.stitcTitle},[o("作业完成情况")]),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,[o("/")]),e.workInfo.expectNum||0,t("span",null,[o("人")])]),t("div",{class:a.text},[o("已提交")])])]}),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,o("%")]),t("div",{class:a.text},[o("提交率")])])]}),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,[o("人")])]),t("div",{class:a.text},[o("达标人数")])])]}),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,o("%")]),t("div",{class:a.text},[o("达标率")])])]})]})])])]),t("div",{class:a.searchList},[t(q,{"label-placement":"left",inline:!0},{default:()=>[t(d,null,{default:()=>[t(L,h({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:e.searchForm.keyword,onChangeValue:n=>e.searchForm.keyword=n}),null)]}),t(d,null,{default:()=>[t(I,h({options:[{label:"全部状态",value:""},...G],placeholder:"作业状态",clearable:!0,inline:!0},{value:e.searchForm.trainingStatus,"onUpdate:value":n=>e.searchForm.trainingStatus=n}),null)]}),t(d,null,{default:()=>[t(I,h({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(T,{type:"primary",class:"searchBtn",onClick:v},{default:()=>[o("搜索")]}),t(T,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[o("重置")]})]})]})]})]),t("div",{class:a.tableWrap},[t(V,{class:a.classTable,loading:e.loading,columns:b(),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:u},null)])]),t($,{maskClosable:P,show:e.detailVisiable,"onUpdate:show":n=>e.detailVisiable=n,preset:"card",class:["modalTitle background",a.wordDetailModel],title:"作业详情"},{default:()=>[t(J,{onNext:()=>k(),onPre:()=>w(),ref:m,onClose:()=>e.detailVisiable=!1,total:e.pagination.pageTotal,current:S.value,activeRow:e.activeRow},null)]})])}});export{je as default};
|