1 |
- import{S as L}from"./index-717042f2-1715840129614.js";import{C as v}from"./index-0c60b72d-1715840129614.js";import{P as N}from"./index-2abd505e-1715840129614.js";import{c as R,d as A}from"./api-b4d35f81-1715840129614.js";import{d as B,a as H,e as M,r as I,p as Y,S as U,f as t,v as W,k as o,M as _,w as C,b7 as p,N as V,g as u,x as d,j as T,aE as $,l as G}from"./index-27f38392-1715840129614.js";import{C as P}from"./index-d619acc0-1715840129614.js";import{d as q}from"./teacherIcon-b8e3946d-1715840129614.js";import{t as j}from"./searchArray-d5f42180-1715840129614.js";import{T as z}from"./index-f592738f-1715840129614.js";import{T as O}from"./TrainingDetails-27d331c4-1715840129614.js";import{e as J}from"./index-28769104-1715840129614.js";import"./api-ada3b0f5-1715840129614.js";import"./index.module-18dca782-1715840129614.js";import"./index-9ce264f4-1715840129614.js";import"./api-0aa82bae-1715840129614.js";import"./index-f4afcac5-1715840129614.js";import"./Slider-17a69cd3-1715840129614.js";import"./urlUtils-a03c114e-1715840129614.js";import"./Scrollbar-b72aeac2-1715840129614.js";import"./icon_default-d1bcaf5f-1715840129614.js";import"./icon-plus-t-35f4cdeb-1715840129614.js";import"./api-279396c0-1715840129614.js";import"./icon-pan-16e35a82-1715840129614.js";import"./api-642b417f-1715840129614.js";const K="_listWrap_4go2b_1",Q="_teacherSection_4go2b_7",X="_tTemp_4go2b_14",Z="_infos_4go2b_18",ee="_homeTitle_4go2b_24",te="_homeContent_4go2b_31",ae="_homeworkText_4go2b_34",ne="_pSection_4go2b_38",oe="_p1_4go2b_41",ie="_p2_4go2b_42",se="_title_4go2b_70",re="_text_4go2b_75",le="_stitcTitle_4go2b_83",ce="_stitcConent_4go2b_102",ue="_contentRect_4go2b_105",pe="_nums_4go2b_116",de="_teacherList_4go2b_137",ge="_teacherHeader_4go2b_154",me="_teacherHeaderBorder_4go2b_162",fe="_teacherHeaderImg_4go2b_174",he="_workafterInfo_4go2b_180",ve="_wordDetailModel_4go2b_200",a={listWrap:K,teacherSection:Q,tTemp:X,infos:Z,homeTitle:ee,homeContent:te,homeworkText:ae,pSection:ne,p1:oe,p2:ie,title:se,text:re,stitcTitle:le,stitcConent:ce,contentRect:ue,nums:pe,teacherList:de,teacherHeader:ge,teacherHeaderBorder:me,teacherHeaderImg:fe,workafterInfo:he,wordDetailModel:ve},Ge=B({name:"homewrok-record-detail",setup(){const g=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}),m=I(),F=I([{name:"作业",path:"/homework-record"},{name:g.query.name,path:"/homework-record-detail"}]),w=()=>{e.pagination.page=1,c()},E=()=>{e.searchForm={keyword:"",vipFlag:null,trainingStatus:"",classGroupId:""},w()},c=async(n,i)=>{e.loading=!0;try{const l=await R({trainingId:g.query.id,...e.searchForm,...e.pagination,page:i||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,k()):n==="prev"&&(e.index=e.tableList.length+1,b())}catch(l){e.loading=!1,console.log(l)}},D=async()=>{try{const i=(await A({id:g.query.id})).data||{};let l="",f="";i.studentLessonTrainingDetails&&i.studentLessonTrainingDetails.length>0&&i.studentLessonTrainingDetails.forEach(r=>{const s=r.trainingContent?JSON.parse(r.trainingContent):null;if(r.trainingType==="PRACTICE"&&r.musicName&&(l+="《"+r.musicName+"》",s)){const h=["".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"),"速度".concat(s.practiceSpeed),"".concat(s.trainingTimes,"分钟")];l+=h.join(" | ")+";"}if(r.trainingType==="EVALUATION"&&r.musicName&&(f+="《"+r.musicName+"》",s)){const h=["".concat(J[s.evaluateDifficult]),s.practiceChapterBegin||s.practiceChapterEnd?"".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"):"全部小节","".concat(s.trainingTimes,"分合格")];f+=h.join(" | ")+";"}}),i.pTitle=l,i.eTitle=f,e.workInfo=i,(i.studentClassGroup||[]).forEach(r=>{e.studentClassList.push({label:r.name,value:r.id})})}catch(n){console.log(n)}},x=(n,i)=>{console.log(i,"index"),e.index=i+1,e.activeRow=n,e.detailVisiable=!0};Y(()=>{D(),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},[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:()=>{x(n,i)}},{default:()=>[o("详情")]})}}],k=()=>{e.index>=e.tableList.length?c("next",e.pagination.page+1):(++e.index,e.activeRow=e.tableList[e.index-1],m.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},b=()=>{e.index===1&&e.pagination.page!==1?c("prev",e.pagination.page-1):(--e.index,e.activeRow=e.tableList[e.index-1],m.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},S=U(()=>e.index+(e.pagination.page-1)*e.pagination.rows);return()=>t("div",null,[t(P,{list:F.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||q,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 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,[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(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,[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(V,{"label-placement":"left",inline:!0},{default:()=>[t(u,null,{default:()=>[t(L,d({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:e.searchForm.keyword,onChangeValue:n=>e.searchForm.keyword=n}),null)]}),t(u,null,{default:()=>[t(v,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(v,d({options:[{label:"全部状态",value:""},...j],placeholder:"作业状态",clearable:!0,inline:!0},{value:e.searchForm.trainingStatus,"onUpdate:value":n=>e.searchForm.trainingStatus=n}),null)]}),t(u,null,{default:()=>[t(v,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(T,{type:"primary",class:"searchBtn",onClick:w},{default:()=>[o("搜索")]}),t(T,{type:"primary",ghost:!0,class:"resetBtn",onClick:E},{default:()=>[o("重置")]})]})]})]})]),t("div",{class:a.tableWrap},[t($,{class:a.classTable,loading:e.loading,columns:y(),data:e.tableList},{empty:()=>t(z,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:c},null)])]),t(G,{show:e.detailVisiable,"onUpdate:show":n=>e.detailVisiable=n,preset:"card",class:["modalTitle background",a.wordDetailModel],title:"作业详情"},{default:()=>[t(O,{onNext:()=>k(),onPre:()=>b(),ref:m,onClose:()=>e.detailVisiable=!1,total:e.pagination.pageTotal,current:S.value,activeRow:e.activeRow},null)]})])}});export{Ge as default};
|