1 |
- import{S as b}from"./index-649eea9c-1715235715601.js";import{C as k}from"./index-0d13e876-1715235715601.js";import{P as L}from"./index-dfb57ae1-1715235715601.js";import{c as N,d as S}from"./api-fbc1f62a-1715235715601.js";import{d as R,a as A,e as B,r as v,p as H,S as M,f as t,v as Y,k as n,M as g,w as I,b7 as c,N as W,g as u,x as f,j as w,aE as U,l as V}from"./index-87f0ccd8-1715235715601.js";import{C as G}from"./index-d2e27601-1715235715601.js";import{d as P}from"./teacherIcon-b8e3946d-1715235715601.js";import{t as q}from"./searchArray-2151d9dd-1715235715601.js";import{T as j}from"./index-d2b77ddd-1715235715601.js";import{T as z}from"./TrainingDetails-065b608d-1715235715601.js";import"./index-5b28f511-1715235715601.js";import"./Slider-a113e213-1715235715601.js";import"./urlUtils-ae95598a-1715235715601.js";import"./index-4c0a6eac-1715235715601.js";import"./icon_default-d1bcaf5f-1715235715601.js";import"./icon-plus-t-35f4cdeb-1715235715601.js";import"./api-d1a4d565-1715235715601.js";import"./icon-pan-16e35a82-1715235715601.js";import"./api-86302a73-1715235715601.js";import"./api-55aee601-1715235715601.js";import"./index.module-2dcd19b9-1715235715601.js";import"./index-f38970b6-1715235715601.js";import"./index-e2c84908-1715235715601.js";import"./api-d06a41d0-1715235715601.js";import"./Scrollbar-9e37a29f-1715235715601.js";const O="_listWrap_1w1am_1",J="_teacherSection_1w1am_7",K="_tTemp_1w1am_14",Q="_infos_1w1am_18",X="_homeTitle_1w1am_24",Z="_homeContent_1w1am_31",$="_homeworkText_1w1am_34",ee="_pSection_1w1am_38",te="_p1_1w1am_41",ae="_p2_1w1am_42",oe="_title_1w1am_65",ne="_text_1w1am_70",ie="_stitcTitle_1w1am_76",se="_stitcConent_1w1am_95",re="_contentRect_1w1am_98",le="_nums_1w1am_109",ce="_teacherList_1w1am_130",ue="_teacherHeader_1w1am_147",de="_teacherHeaderBorder_1w1am_155",pe="_teacherHeaderImg_1w1am_167",me="_workafterInfo_1w1am_173",ge="_wordDetailModel_1w1am_193",a={listWrap:O,teacherSection:J,tTemp:K,infos:Q,homeTitle:X,homeContent:Z,homeworkText:$,pSection:ee,p1:te,p2:ae,title:oe,text:ne,stitcTitle:ie,stitcConent:se,contentRect:re,nums:le,teacherList:ce,teacherHeader:ue,teacherHeaderBorder:de,teacherHeaderImg:pe,workafterInfo:me,wordDetailModel:ge},Ve=R({name:"homewrok-record-detail",setup(){const d=A(),e=B({searchForm:{keyword:"",trainingStatus:"",classGroupId:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},studentClassList:[],tableList:[],workInfo:{},detailVisiable:!1,activeRow:null,index:0}),p=v(),x=v([{name:"作业",path:"/homework-record"},{name:d.query.name,path:"/homework-record-detail"}]),h=()=>{e.pagination.page=1,l()},C=()=>{e.searchForm={keyword:"",trainingStatus:"",classGroupId:""},h()},l=async(o,i)=>{e.loading=!0;try{const r=await N({trainingId:d.query.id,...e.searchForm,...e.pagination,page:i||e.pagination.page});e.tableList=r.data.rows,e.pagination.pageTotal=r.data.total,e.pagination.page=r.data.current,e.loading=!1,o==="next"?(e.index=0,_()):o==="prev"&&(e.index=e.tableList.length+1,T())}catch(r){e.loading=!1,console.log(r)}},D=async()=>{try{const i=(await S({id:d.query.id})).data||{};let r="",m="";i.studentLessonTrainingDetails&&i.studentLessonTrainingDetails.length>0&&i.studentLessonTrainingDetails.forEach(s=>{s.trainingType==="PRACTICE"&&s.musicName&&(r+=r?"、《"+s.musicName+"》":"练习曲目《"+s.musicName+"》"),s.trainingType==="EVALUATION"&&s.musicName&&(m+=m?"、《"+s.musicName+"》":"评测曲目《"+s.musicName+"》")}),i.pTitle=r,i.eTitle=m,e.workInfo=i,(i.studentClassGroup||[]).forEach(s=>{e.studentClassList.push({label:s.name,value:s.id})})}catch(o){console.log(o)}},F=(o,i)=>{console.log(i,"index"),e.index=i+1,e.activeRow=o,e.detailVisiable=!0};H(()=>{D(),l()});const y=()=>[{title:"学生姓名",key:"studentName"},{title:"最后提交时间",key:"submitTime",render(o){return o.submitTime?g(o.submitTime).format("YYYY-MM-DD"):"--"}},{title:"所属班级",key:"classGroupName"},{title:"作业状态",key:"sex",render(o){return t("div",null,[o.trainingStatus=="UNSUBMITTED"?t("p",{class:a.nosub},[n("未提交")]):null,o.trainingStatus=="SUBMITTED"?t("p",{class:a.ison},[n("不合格")]):null,o.trainingStatus=="TARGET"?t("p",{class:a.isok},[n("合格")]):null])}},{title:"操作",key:"id",render(o,i){return t(w,{text:!0,type:"primary",onClick:()=>{F(o,i)}},{default:()=>[n("详情")]})}}],_=()=>{e.index>=e.tableList.length?l("next",e.pagination.page+1):(++e.index,e.activeRow=e.tableList[e.index-1],p.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},T=()=>{e.index===1&&e.pagination.page!==1?l("prev",e.pagination.page-1):(--e.index,e.activeRow=e.tableList[e.index-1],p.value.getTrainingDetail(e.activeRow.studentLessonTrainingId))},E=M(()=>e.index+(e.pagination.page-1)*e.pagination.rows);return()=>t("div",null,[t(G,{list:x.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(Y,{class:a.teacherHeaderImg,src:e.workInfo.teacherAvatar||P,previewDisabled:!0},null)])]),t("div",{class:a.workafterInfo},[t("h4",null,[e.workInfo.teacherName]),e.workInfo.createTime&&t("p",null,[n("布置时间:"),e.workInfo.createTime&&g(e.workInfo.createTime).format("YYYY-MM-DD HH:mm")," ",n("|")," ",t("span",null,[n("截止时间:"),e.workInfo.expireDate&&g(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]},[e.workInfo.pTitle]),e.workInfo.eTitle&&t("p",{class:[a.text,a.p2]},[e.workInfo.eTitle])])])])]),t("div",null,[t("div",{class:a.stitcTitle},[n("作业完成情况")]),t("div",{class:a.stitcConent},[t(I,{size:[38,0]},{default:()=>[t(c,{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,[n("/")]),e.workInfo.expectNum||0,t("span",null,[n("人")])]),t("div",{class:a.text},[n("已提交")])])]}),t(c,{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,n("%")]),t("div",{class:a.text},[n("提交率")])])]}),t(c,{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,[n("人")])]),t("div",{class:a.text},[n("合格人数")])])]}),t(c,{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,n("%")]),t("div",{class:a.text},[n("合格率")])])]})]})])])]),t("div",{class:a.searchList},[t(W,{"label-placement":"left",inline:!0},{default:()=>[t(u,null,{default:()=>[t(b,f({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:e.searchForm.keyword,onChangeValue:o=>e.searchForm.keyword=o}),null)]}),t(u,null,{default:()=>[t(k,f({options:[{label:"全部班级",value:""},...e.studentClassList],placeholder:"全部班级",clearable:!0,inline:!0},{value:e.searchForm.classGroupId,"onUpdate:value":o=>e.searchForm.classGroupId=o}),null)]}),t(u,null,{default:()=>[t(k,f({options:[{label:"全部状态",value:""},...q],placeholder:"作业状态",clearable:!0,inline:!0},{value:e.searchForm.trainingStatus,"onUpdate:value":o=>e.searchForm.trainingStatus=o}),null)]}),t(u,null,{default:()=>[t(I,{justify:"end"},{default:()=>[t(w,{type:"primary",class:"searchBtn",onClick:h},{default:()=>[n("搜索")]}),t(w,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[n("重置")]})]})]})]})]),t("div",{class:a.tableWrap},[t(U,{class:a.classTable,loading:e.loading,columns:y(),data:e.tableList},{empty:()=>t(j,null,null)}),t(L,{page:e.pagination.page,"onUpdate:page":o=>e.pagination.page=o,pageSize:e.pagination.rows,"onUpdate:pageSize":o=>e.pagination.rows=o,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":o=>e.pagination.pageTotal=o,onList:l},null)])]),t(V,{show:e.detailVisiable,"onUpdate:show":o=>e.detailVisiable=o,preset:"card",class:["modalTitle background",a.wordDetailModel],title:"作业详情"},{default:()=>[t(z,{onNext:()=>_(),onPre:()=>T(),ref:p,onClose:()=>e.detailVisiable=!1,total:e.pagination.pageTotal,current:E.value,activeRow:e.activeRow},null)]})])}});export{Ve as default};
|