index-20f9ec4d-1709546248219.js 7.5 KB

1
  1. import{S as x}from"./index-54c7ecd2-1709546248219.js";import{C as E}from"./index-f8ede596-1709546248219.js";import{P as N}from"./index-f2685a19-1709546248219.js";import{c as R,d as b}from"./api-0c5c1a19-1709546248219.js";import{d as A,a as S,e as L,r as _,p as B,f as e,v as H,k as n,L as p,w as T,br as r,N as M,g as f,x as h,j as g,a0 as Y,l as W}from"./index-272deb89-1709546248219.js";import{C as U}from"./index-91efe800-1709546248219.js";import{d as V}from"./teacherIcon-b8e3946d-1709546248219.js";import{t as P}from"./searchArray-c7af0ccc-1709546248219.js";import{T as q}from"./index-6c16f4bf-1709546248219.js";import{T as j}from"./TrainingDetails-06b1f2e9-1709546248219.js";import"./index-879ba1d6-1709546248219.js";import"./Slider-ab734baa-1709546248219.js";import"./urlUtils-080cac35-1709546248219.js";import"./api-16cb6453-1709546248219.js";import"./index.module-93293dfa-1709546248219.js";import"./index-aabff934-1709546248219.js";import"./index-4bc70690-1709546248219.js";import"./api-5ac1da35-1709546248219.js";import"./Scrollbar-c14fca94-1709546248219.js";const z="_listWrap_1w1am_1",G="_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",ne="_stitcConent_1w1am_95",ie="_contentRect_1w1am_98",se="_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:z,teacherSection:G,tTemp:O,infos:J,homeTitle:K,homeContent:Q,homeworkText:X,pSection:Z,p1:$,p2:ee,title:te,text:ae,stitcTitle:oe,stitcConent:ne,contentRect:ie,nums:se,teacherList:re,teacherHeader:le,teacherHeaderBorder:ce,teacherHeaderImg:ue,workafterInfo:de,wordDetailModel:me},Ae=A({name:"homewrok-record-detail",setup(){const l=S(),t=L({searchForm:{keyword:"",trainingStatus:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],workInfo:{},detailVisiable:!1,activeRow:null,index:0}),c=_(),k=_([{name:"作业",path:"/homework-record"},{name:l.query.name,path:"/homework-record-detail"}]),w=()=>{t.pagination.page=1,u()},v=()=>{t.searchForm={keyword:"",trainingStatus:""},w()},u=async()=>{t.loading=!0;try{const o=await R({trainingId:l.query.id,...t.searchForm,...t.pagination});t.tableList=o.data.rows,t.pagination.pageTotal=o.data.total,t.loading=!1}catch(o){t.loading=!1,console.log(o)}},I=async()=>{try{const i=(await b({id:l.query.id})).data||{};let d="",m="";i.studentLessonTrainingDetails&&i.studentLessonTrainingDetails.length>0&&i.studentLessonTrainingDetails.forEach(s=>{s.trainingType==="PRACTICE"&&s.musicName&&(d+=d?"、《"+s.musicName+"》":"练习曲目《"+s.musicName+"》"),s.trainingType==="EVALUATION"&&s.musicName&&(m+=m?"、《"+s.musicName+"》":"评测曲目《"+s.musicName+"》")}),i.pTitle=d,i.eTitle=m,t.workInfo=i}catch(o){console.log(o)}},D=(o,i)=>{console.log(i,"index"),t.index=i+1,t.activeRow=o,t.detailVisiable=!0};B(()=>{I(),u()});const y=()=>[{title:"学生姓名",key:"studentName"},{title:"最后提交时间",key:"submitTime",render(o){return o.submitTime?p(o.submitTime).format("YYYY-MM-DD"):"--"}},{title:"作业状态",key:"sex",render(o){return e("div",null,[o.trainingStatus=="UNSUBMITTED"?e("p",{class:a.nosub},[n("未提交")]):null,o.trainingStatus=="SUBMITTED"?e("p",{class:a.ison},[n("不合格")]):null,o.trainingStatus=="TARGET"?e("p",{class:a.isok},[n("合格")]):null])}},{title:"操作",key:"id",render(o,i){return e(g,{text:!0,type:"primary",onClick:()=>{D(o,i)}},{default:()=>[n("详情")]})}}],F=()=>{++t.index,t.activeRow=t.tableList[t.index-1],c.value.getTrainingDetail(t.activeRow.studentLessonTrainingId)},C=()=>{--t.index,t.activeRow=t.tableList[t.index-1],c.value.getTrainingDetail(t.activeRow.studentLessonTrainingId)};return()=>e("div",null,[e(U,{list:k.value},null),e("div",{class:a.listWrap},[e("div",{class:a.teacherSection},[e("div",{class:a.teacherList},[e("div",{class:a.tTemp},[e("div",{class:a.teacherHeader},[e("div",{class:a.teacherHeaderBorder},[e(H,{class:a.teacherHeaderImg,src:t.workInfo.teacherAvatar||V,previewDisabled:!0},null)])]),e("div",{class:a.workafterInfo},[e("h4",null,[t.workInfo.teacherName]),t.workInfo.createTime&&e("p",null,[n("布置时间:"),t.workInfo.createTime&&p(t.workInfo.createTime).format("YYYY-MM-DD HH:mm")," ",n("|")," ",e("span",null,[n("截止时间:"),t.workInfo.expireDate&&p(t.workInfo.expireDate).format("YYYY-MM-DD HH:mm")])])])]),e("div",{class:a.infos},[e("div",{class:a.homeTitle},[t.workInfo.name]),e("div",{class:[a.homeContent,a.homeworkText]},[e("div",{class:a.pSection},[t.workInfo.pTitle&&e("p",{class:[a.text,a.p1]},[t.workInfo.pTitle]),t.workInfo.eTitle&&e("p",{class:[a.text,a.p2]},[t.workInfo.eTitle])])])])]),e("div",null,[e("div",{class:a.stitcTitle},[n("作业完成情况")]),e("div",{class:a.stitcConent},[e(T,{size:[38,0]},{default:()=>[e(r,{percentage:t.workInfo.trainingRate||0,"offset-degree":180,type:"circle",strokeWidth:6,"rail-color":"EDEFFA",color:"#64A5FF"},{default:()=>[e("div",{class:a.contentRect},[e("div",{class:a.nums},[t.workInfo.trainingNum||0,e("i",null,[n("/")]),t.workInfo.expectNum||0,e("span",null,[n("人")])]),e("div",{class:a.text},[n("已提交")])])]}),e(r,{percentage:t.workInfo.trainingRate||0,"offset-degree":180,strokeWidth:6,type:"circle","rail-color":"EDEFFA",color:"#64A5FF"},{default:()=>[e("div",{class:a.contentRect},[e("div",{class:a.nums},[t.workInfo.trainingRate||0,n("%")]),e("div",{class:a.text},[n("提交率")])])]}),e(r,{percentage:t.workInfo.qualifiedRate||0,"offset-degree":180,strokeWidth:6,type:"circle","rail-color":"EDEFFA",color:"#40CEAE"},{default:()=>[e("div",{class:a.contentRect},[e("div",{class:a.nums},[t.workInfo.standardNum||0,e("span",null,[n("人")])]),e("div",{class:a.text},[n("合格人数")])])]}),e(r,{percentage:t.workInfo.qualifiedRate||0,"offset-degree":180,strokeWidth:6,type:"circle","rail-color":"EDEFFA",color:"#40CEAE"},{default:()=>[e("div",{class:a.contentRect},[e("div",{class:a.nums},[t.workInfo.qualifiedRate||0,n("%")]),e("div",{class:a.text},[n("合格率")])])]})]})])])]),e("div",{class:a.searchList},[e(M,{"label-placement":"left",inline:!0},{default:()=>[e(f,null,{default:()=>[e(x,h({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:t.searchForm.keyword,onChangeValue:o=>t.searchForm.keyword=o}),null)]}),e(f,null,{default:()=>[e(E,h({options:[{label:"全部状态",value:""},...P],placeholder:"作业状态",clearable:!0,inline:!0},{value:t.searchForm.trainingStatus,"onUpdate:value":o=>t.searchForm.trainingStatus=o}),null)]}),e(f,null,{default:()=>[e(T,{justify:"end"},{default:()=>[e(g,{type:"primary",class:"searchBtn",onClick:w},{default:()=>[n("搜索")]}),e(g,{type:"primary",ghost:!0,class:"resetBtn",onClick:v},{default:()=>[n("重置")]})]})]})]})]),e("div",{class:a.tableWrap},[e(Y,{class:a.classTable,loading:t.loading,columns:y(),data:t.tableList},{empty:()=>e(q,null,null)}),e(N,{page:t.pagination.page,"onUpdate:page":o=>t.pagination.page=o,pageSize:t.pagination.rows,"onUpdate:pageSize":o=>t.pagination.rows=o,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":o=>t.pagination.pageTotal=o,onList:u},null)])]),e(W,{show:t.detailVisiable,"onUpdate:show":o=>t.detailVisiable=o,preset:"card",class:["modalTitle background",a.wordDetailModel],title:"作业详情"},{default:()=>[e(j,{onNext:()=>F(),onPre:()=>C(),ref:c,onClose:()=>t.detailVisiable=!1,total:t.tableList.length,current:t.index,activeRow:t.activeRow},null)]})])}});export{Ae as default};