index-109def99-1714304141006.js 8.1 KB

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