classDetail-b18fc855-1743496079034.js 31 KB

1
  1. import{s as l}from"./index.module-eed6ff4d-1743496079034.js";import{d as R,b as te,a as V,u as ae,e as b,a5 as ue,q as Y,f as e,k as c,N as Q,g as S,y as O,x as M,j as C,aU as se,l as q,m as j,aq as $,ai as G,r as A,a9 as ce,w as he,aj as N,aY as ye,aZ as ve,a_ as De,c as Te,a$ as be,b0 as Ce,a8 as Fe,af as Se,a6 as we,t as Ie,v as H}from"./index-32ff339b-1743496079034.js";import{C as ke}from"./index-4b28fbc5-1743496079034.js";import{S as de}from"./index-c5d2dc80-1743496079034.js";import{C as z}from"./index-80138d53-1743496079034.js";import{P as X}from"./index-2da90e33-1743496079034.js";import{h as Le,i as Ne,j as Ee,k as Be,l as Ae,m as _e,n as Me}from"./api-d57212df-1743496079034.js";import{T as P}from"./index-f645f05d-1743496079034.js";import{U as Ue}from"./index-6c27e330-1743496079034.js";import{i as J,s as U,g as Oe,a as Re}from"./use-async-1a70e441-1743496079034.js";import{N as w,g as K,a as W,b as ee,f as ie,c as x,d as Z,e as oe,i as Ye,h as xe,j as qe}from"./icon-sort-asc-809a837a-1743496079034.js";import{C as re}from"./index-17547037-1743496079034.js";import{T as pe,a as je,S as $e,b as Ge,R as Ke}from"./index-7bfe5f9f-1743496079034.js";import{d as me}from"./teacherIcon-b8e3946d-1743496079034.js";import{e as ge}from"./contants-84ba384e-1743496079034.js";import{N as fe}from"./Scrollbar-116ac88a-1743496079034.js";import{s as We,u as ze}from"./index-b35a1314-1743496079034.js";import{a as Ve}from"./api-33b7275a-1743496079034.js";import{g as Pe,i as He}from"./api-76a11410-1743496079034.js";import"./api-70305ea7-1743496079034.js";import"./contants-fb27bec1-1743496079034.js";import"./index-1b97ce1c-1743496079034.js";import"./Slider-6d04791b-1743496079034.js";import"./urlUtils-b5855a3c-1743496079034.js";import"./index-f6cdd761-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"./Cascader-3026ed48-1743496079034.js";import"./index-f30ec7e4-1743496079034.js";import"./catchData-e5072c59-1743496079034.js";import"./deep-clone-c0d00fc2-1743496079034.js";import"./index-e2ab6121-1743496079034.js";import"./index-a098cb7e-1743496079034.js";const Ze=R({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(g){const o=te(),u=V(),t=ae(),f=b({vipStudentNum:0,studentNum:0}),n=b({upgradeFlag:g.upgradeFlag==0,searchForm:{keyword:"",gender:"",membership:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],editStatus:!1,activeRow:{}});ue(()=>g.upgradeFlag,()=>{n.upgradeFlag=g.upgradeFlag==0});const h=()=>{n.pagination.page=1,d(),U({current:n.searchForm,saveKey:"classDetailStudent"})},m=()=>{n.searchForm={keyword:"",gender:"",membership:""},h(),U({current:n.searchForm,saveKey:"classDetailStudent"})},d=async()=>{n.loading=!0;try{const s=await Le({classGroupId:u.query.id,...n.searchForm,...n.pagination});n.tableList=s.data.rows,n.pagination.pageTotal=s.data.total,n.loading=!1}catch(s){n.loading=!1,console.log(s)}};J({current:n.searchForm,saveKey:"classDetailStudent",callBack:s=>{n.searchForm=s}});const a=async()=>{try{const{data:s}=await Ne({classGroupId:u.query.id});f.studentNum=s.studentNum||0,f.vipStudentNum=s.vipStudentNum||0}catch(s){console.log(s)}};Y(()=>{a(),d()});const y=s=>{const p=document.createElement("input");p.value=s,document.body.appendChild(p),p.select(),p.setSelectionRange(0,p.value.length),document.execCommand("Copy"),document.body.removeChild(p),o.success("复制成功")},I=s=>{t.push({path:"/classStudentDetail",query:{...u.query,studentId:s.id,studentName:s.nickname,upgradeFlag:n.upgradeFlag?0:1}})},F=()=>[{title:"学生姓名",key:"nickname",render:s=>e($,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>y(s.nickname)},[s.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:s=>e($,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>y(s.phone)},[s.phone]),default:"点击复制"})},{title:"性别",key:"gender",render(s){return e(G,null,[s.gender+""!="null"?s.gender=="0"?"女":"男":"--"])}},{title:"学生类型",key:"vipMember",render(s){return e(G,null,[s.vipMember?"会员":"普通"])}},{title:"操作",key:"id",render(s){return e(M,null,{default:()=>[e(C,{text:!0,type:"primary",onClick:()=>I(s)},{default:()=>[c("详情")]}),e(C,{text:!0,type:"primary",onClick:()=>i(s),disabled:s.historyClassStudent},{default:()=>[c("修改")]})]})}}],i=s=>{n.editStatus=!0,n.activeRow=s};return()=>e("div",null,[e("div",{class:["section-container"]},[e("div",{class:l.TrainDataTop},[e("div",{class:l.TrainDataTopLeft},[e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[e("div",null,[e("span",null,[e(w,{from:0,to:f.studentNum},null)]),c("人")])]),e("p",{class:l.TrainDataItemsubTitle},[c("班级人数")])]),e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[e("div",null,[e("span",null,[e(w,{from:0,to:f.vipStudentNum},null)]),c("人")])]),e("p",{class:l.TrainDataItemsubTitle},[c("会员人数")])])]),e("div",{class:l.TrainDataTopRight},null)])]),e("div",{class:l.searchList},[e(Q,{"label-placement":"left",inline:!0},{default:()=>[e(S,null,{default:()=>[e(de,O({placeholder:"请输入学生姓名"},{class:l.searchInput,searchWord:n.searchForm.keyword,onChangeValue:s=>n.searchForm.keyword=s}),null)]}),e(S,null,{default:()=>[e(z,O({options:[{label:"全部性别",value:""},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:n.searchForm.gender,"onUpdate:value":s=>n.searchForm.gender=s}),null)]}),e(S,null,{default:()=>[e(z,O({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:n.searchForm.membership,"onUpdate:value":s=>n.searchForm.membership=s}),null)]}),e(S,null,{default:()=>[e(M,{justify:"end"},{default:()=>[e(C,{type:"primary",class:"searchBtn",onClick:h},{default:()=>[c("搜索")]}),e(C,{type:"primary",ghost:!0,class:"resetBtn",onClick:m},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:l.tableWrap},[e(se,{class:l.classTable,loading:n.loading,columns:F(),data:n.tableList},{empty:()=>e(P,null,null)}),e(X,{page:n.pagination.page,"onUpdate:page":s=>n.pagination.page=s,pageSize:n.pagination.rows,"onUpdate:pageSize":s=>n.pagination.rows=s,pageTotal:n.pagination.pageTotal,"onUpdate:pageTotal":s=>n.pagination.pageTotal=s,onList:d,sync:!0},null)]),e(q,{maskClosable:j,show:n.editStatus,"onUpdate:show":s=>n.editStatus=s,class:["modalTitle background",l.updateStudent],preset:"card",title:"修改信息"},{default:()=>[e(Ue,{onClose:()=>n.editStatus=!1,onConfirm:()=>d(),row:n.activeRow},null)]})])}}),Qe=R({props:{activeRow:{type:Object,default:()=>({id:""})},total:{type:Number,default:0},current:{type:Number,default:0}},name:"classTrainingDetails",emits:["close"],setup(g,{emit:o,expose:u}){const t=A(!1),f=A({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),n=(m,d)=>{let a=[];return m==="EVALUATION"?a=["".concat(ge[d.evaluateDifficult]),"".concat(d.practiceChapterBegin||0,"-").concat(d.practiceChapterEnd||0,"小节"),"速度".concat(d.evaluateSpeed||0),"".concat(d.trainingTimes,"分达标")]:a=["".concat(d.practiceChapterBegin,"-").concat(d.practiceChapterEnd,"小节"),"速度".concat(d.practiceSpeed||0),"".concat(d.trainingTimes,"分钟")],a},h=async m=>{t.value=!0;try{const d=await Ee({trainingId:m}),a=d.data.studentLessonTrainingDetails.map(y=>{const I=n(y.trainingType,JSON.parse(y.trainingContent));return{...y,coverImg:y.titleImg,allTimes:JSON.parse(y.trainingContent).trainingTimes,typeList:I||[]}});f.value={...d.data,studentLessonTrainingDetails:a}}catch(d){console.log(d)}t.value=!1};return u({getTrainingDetail:h}),Y(()=>{h(g.activeRow.id)}),()=>e("div",{class:[l.trainingDetails]},[e(ce,{show:t.value},{default:()=>[e("div",{class:l.studentList},[e("div",{class:l.studentHeaderWrap},[e("div",{class:l.studentHeader},[e("div",{class:l.studentHeaderBorder},[e(he,{class:l.studentHeaderImg,src:f.value.teacherAvatar?f.value.teacherAvatar:me,previewDisabled:!0},null)])]),e("div",{class:l.workafterInfo},[e("h4",null,[f.value.teacherName," ",e("div",{class:[l.workafterInfoDot,l.workafterTeacherInfoDot]},[c("老师")])]),e("p",null,[c("开始时间:"),f.value.createTime?N(new Date(f.value.createTime)).format("YYYY-MM-DD"):"--"," ",c("| 结束时间:"),f.value.expireDate?N(new Date(f.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),e(fe,{style:"max-height:400px",trigger:"none"},{default:()=>[e("div",{class:l.workList},[f.value.studentLessonTrainingDetails.map(m=>e(pe,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:m},null))])]})]})])}}),Xe="_trainSettings_qodsv_1",Je="_trainBtnGroup_qodsv_1",et="_searchGroup_qodsv_9",tt="_datetime_qodsv_13",at="_trainList_qodsv_43",st="_listSection_qodsv_48",rt="_emptySection_qodsv_51",lt="_list_qodsv_48",nt="_trainEditModal_qodsv_69",it="_selectMusicModal_qodsv_72",B={trainSettings:Xe,trainBtnGroup:Je,searchGroup:et,datetime:tt,trainList:at,listSection:st,emptySection:rt,list:lt,trainEditModal:nt,selectMusicModal:it},ot=R({name:"train-settings",props:{detailId:{type:String,default:""},subjectId:{type:String,default:""},classGroupId:{type:String,default:""},courseScheduleId:{type:String,default:""}},emits:["close","confirm"],setup(g,{emit:o}){const u=te(),t=b({type:"add",btnLoading:!1,loadingStatus:!1,editStatus:!1,editItem:{},selectMusicStatus:!1,trainList:[],currentTime:N(N().format("YYYY-MM-DD")).valueOf(),expireDate:N().add(7,"day").format("YYYY-MM-DD")}),f=A(!1),n=A([]),h=async()=>{t.loadingStatus=!0;try{const{data:i}=await We({coursewareKnowledgeDetailId:g.detailId,subjectId:g.subjectId,page:1,rows:99}),s=i.rows||[],p=[];s.forEach(T=>{const D=m(T.trainingType,T.trainingConfigJson);p.push({typeList:D||[],...T})}),t.trainList=p||[]}catch(i){}t.loadingStatus=!1},m=(i,s)=>{let p=[];return i==="EVALUATION"?p=["".concat(ge[s.evaluateDifficult]),"".concat(s.practiceChapterBegin||0,"-").concat(s.practiceChapterEnd||0,"小节"),"速度".concat(s.evaluateSpeed||0),"".concat(s.trainingTimes,"分达标")]:p=["".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"),"速度".concat(s.practiceSpeed||0),"".concat(s.trainingTimes,"分钟")],p},d=async i=>{var T,D;let s="init",p=null;try{const E=await ve.get(i.xmlFileUrl,{mode:"cors"}),k=new DOMParser().parseFromString(E,"text/xml");(Array.from(k==null?void 0:k.querySelectorAll("systems"))||[]).forEach(_=>{(Array.from(_==null?void 0:_.querySelectorAll("system"))||[]).forEach(v=>{_==null||_.removeChild(v)})}),p=(T=k.getElementsByTagName("part")[0])==null?void 0:T.getElementsByTagName("measure"),s="success"}catch(E){s="error"}s=="success"?(i.firstMeasureIsZero=((D=p==null?void 0:p[0])==null?void 0:D.getAttribute("number"))==="0",i.practiceChapterMax=i.firstMeasureIsZero?p.length-1:p.length):i.practiceChapterMax=0,i.coursewareKnowledgeDetailId=g.detailId,i.subjectId=g.subjectId,t.editItem=i,t.editStatus=!0},a=b({show:!1,msg:"",confirmButtonText:"",cancelBtn:!1,type:"CLASS"});function y(i){const{type:s,errList:p}=i;if(a.type=s,s==="CLASS"||s==="PERSON"){f.value=!0;const T=p.map(D=>({classGroupId:D.classGroupId,classGroupName:D.classGroupName}));n.value=T}else if(s==="MUSIC"){a.cancelBtn=!1,a.confirmButtonText="我知道了";const T=p.map(D=>'<div>曲目<span style="color:#F44541">【'.concat(D.musicSheetName,'】</span>不支持<span style="color:#F44541">【').concat(D.instrumentName,'】</span>练习,请更换曲目或取消<span style="color:#F44541">【').concat(D.instrumentName,"】</span>的学生").concat(p.length>1?";":"","</div>"));a.msg=T.join("")}a.show=!0}function I(){["CLASS","PERSON"].includes(a.type)?De.push({path:"/classList"}):a.type==="MUSIC"&&(a.show=!1)}const F=async()=>{if(!t.expireDate){u.error("请选择截止日期");return}if(t.trainList.length<=0){u.error("训练内容不能为空");return}t.btnLoading=!0;try{const i=t.trainList||[],s=[];i.forEach(D=>{s.push({trainingType:D.trainingType,musicId:D.musicId,trainingConfigJsonObject:D.trainingConfigJson})});const p={lessonTrainingDetails:s,expireDate:t.expireDate+" 23:59:59",classGroupId:g.classGroupId,courseScheduleId:g.courseScheduleId||null},T=await ze(p);T.code===200&&(T.data.status?(u.success("布置成功"),o("close"),o("confirm")):y(T.data))}catch(i){}t.btnLoading=!1};return Y(()=>{g.detailId&&g.subjectId&&h()}),()=>e("div",{class:B.trainSettings},[e("div",{class:B.searchGroup},[e(C,{onClick:()=>{t.selectMusicStatus=!0,t.type="add"}},{default:()=>[c("添加作业")]}),e("div",{class:B.datetime},[e("label",null,[c("截止时间:")]),e(ye,{style:{width:"200px"},placeholder:"请选择截止日期","formatted-value":t.expireDate,"onUpdate:formatted-value":i=>t.expireDate=i,type:"date",valueFormat:"yyyy-MM-dd",isDateDisabled:i=>i<t.currentTime},null)])]),e(fe,{class:B.trainList},{default:()=>[e(ce,{show:t.loadingStatus},{default:()=>[e("div",{class:[B.listSection,!t.loadingStatus&&t.trainList.length<=0?B.emptySection:""]},[t.trainList.length>0&&e("div",{class:B.list},[t.trainList.map((i,s)=>e(pe,{item:i,type:"homework",onEdit:p=>{const{trainingConfigJson:T,id:D,musicId:E,...k}=p;t.editItem={...k,id:E,trainId:D,...T},console.log(t.editItem),t.type="update",t.editStatus=!0},onDelete:()=>{t.trainList.splice(s,1)}},null))]),!t.loadingStatus&&t.trainList.length<=0&&e(P,{description:"暂无作业"},null)])]})]}),e(M,{class:B.trainBtnGroup},{default:()=>[e(C,{strong:!0,type:"default",round:!0,onClick:()=>o("close")},{default:()=>[c("取消布置")]}),e(C,{strong:!0,type:"primary",round:!0,disabled:t.trainList.length<=0,onClick:F},{default:()=>[c("立即布置")]})]}),e(q,{maskClosable:j,show:t.editStatus,"onUpdate:show":i=>t.editStatus=i,class:["modalTitle background",B.trainEditModal],preset:"card",title:"作业设置"},{default:()=>[e(je,{item:t.editItem,type:"homework",onClose:()=>t.editStatus=!1,onConfirm:i=>{console.log(i,"update",t);const s=m(i.trainingType,i.trainingConfigJson);t.type==="update"?t.trainList.forEach(p=>{p.id===i.id&&(p.trainingType=i.trainingType,p.trainingConfigJson=i.trainingConfigJson,p.typeList=s)}):t.trainList.push({...i,id:+new Date,musicName:t.editItem.title,typeList:s}),t.editItem={}}},null)]}),e(q,{maskClosable:j,show:t.selectMusicStatus,"onUpdate:show":i=>t.selectMusicStatus=i,class:["modalTitle",B.selectMusicModal],preset:"card",title:"选择曲目"},{default:()=>[e($e,{type:"homework",onAdd:i=>{t.selectMusicStatus=!1,d(i)}},null)]}),e(Ge,{show:a.show,content:a.msg,onClose:()=>{a.show=!1},onConfirm:I,cancelButtonText:"暂不设置",cancelBtn:a.cancelBtn,confirmButtonText:a.confirmButtonText},null),e(q,{maskClosable:j,show:f.value,"onUpdate:show":i=>f.value=i,style:{width:"392px"},"display-directive":"if",preset:"card",class:["modalTitleNew"],title:"选择乐器"},{default:()=>[e(Ke,{activeRow:n.value,onClose:()=>f.value=!1},null)]})])}}),ut=R({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(g){const o=ae(),u=V(),t=b({upgradeFlag:g.upgradeFlag==0,searchForm:{status:"",timer:[K(new Date().getTime()),W(new Date().getTime())]},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1});ue(()=>g.upgradeFlag,()=>{t.upgradeFlag=g.upgradeFlag==0});const f=()=>{t.pagination.page=1,h(),U({current:t.searchForm,saveKey:"classDetailAfterWork"})},n=()=>{t.searchForm={status:"",timer:[K(new Date().getTime()),W(new Date().getTime())]},f(),U({current:t.searchForm,saveKey:"classDetailAfterWork"})};J({current:t.searchForm,saveKey:"classDetailAfterWork",callBack:a=>{t.searchForm=a}});const h=async()=>{t.loading=!0;try{const{timer:a,...y}=t.searchForm,I=await Be({classGroupId:u.query.id,...y,...t.pagination,...ee(a,["startTime","endTime"],"YYYY-MM-DD")});t.tableList=I.data.rows,t.pagination.pageTotal=I.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}};Y(()=>{h()});const m=()=>[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render(a){return e(G,null,[a.createTime])}},{title:"截止时间",key:"expireDate",render(a){return a.expireDate?N(a.expireDate).format("YYYY-MM-DD"):"--"}},{title:"作业状态",key:"status",render(a){return a.status?e("div",{class:l.endDot},[e("span",null,null),c("已结束")]):e("div",{class:l.indDot},[e("span",null,null),c(" 进行中")])}},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"达标人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render(a){return e(G,null,[a.trainingRate,c("%")])}},{title:"达标率",key:"qualifiedRate",render(a){return e(G,null,[a.qualifiedRate,c("%")])}},{title:"操作",key:"id",render(a){return e(M,null,{default:()=>[e(C,{text:!0,type:"primary",onClick:()=>d(a)},{default:()=>[c("详情")]})]})}}],d=a=>{o.push({path:"/afterWorkDetail",query:{...u.query,classGroupId:u.query.id,teacherName:a.teacherName,trainingId:a.id}})};return()=>e("div",null,[e("div",{class:l.searchList},[e(Q,{"label-placement":"left",inline:!0},{default:()=>[e(S,null,{default:()=>[e(re,{value:t.searchForm.timer,"onUpdate:value":a=>t.searchForm.timer=a,separator:"至",type:"daterange",timerValue:t.searchForm.timer},null)]}),e(S,null,{default:()=>[e(z,O({options:[{label:"全部状态",value:""},{label:"已结束",value:1},{label:"进行中",value:0}],placeholder:"作业状态",clearable:!0,inline:!0},{value:t.searchForm.status,"onUpdate:value":a=>t.searchForm.status=a}),null)]}),e(S,null,{default:()=>[e(M,{justify:"end"},{default:()=>[e(C,{type:"primary",class:"searchBtn",onClick:f},{default:()=>[c("搜索")]}),e(C,{type:"primary",ghost:!0,class:"resetBtn",onClick:n},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:l.tableWrap},[e(se,{class:l.classTable,loading:t.loading,columns:m(),data:t.tableList},{empty:()=>e(P,null,null)}),e(X,{page:t.pagination.page,"onUpdate:page":a=>t.pagination.page=a,pageSize:t.pagination.rows,"onUpdate:pageSize":a=>t.pagination.rows=a,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":a=>t.pagination.pageTotal=a,onList:h,sync:!0},null)]),e(q,{maskClosable:j,show:t.addWorkVisible,"onUpdate:show":a=>t.addWorkVisible=a,preset:"card",class:[l.attendClassModal,l.trainClassModal],title:"作业设置"},{default:()=>[e(ot,{classGroupId:u.query.id,onClose:()=>{h(),t.addWorkVisible=!1}},null)]}),e(q,{maskClosable:j,show:t.detailVisiable,"onUpdate:show":a=>t.detailVisiable=a,preset:"card",class:["modalTitle background",l.wordDetailModel],title:"作业详情"},{default:()=>[e(Qe,{onClose:()=>t.detailVisiable=!1,activeRow:t.activeRow},null)]})])}}),ct="_tableSpace_z26wb_1",dt="_tableContainer_z26wb_4",pt="_header_z26wb_10",mt="_time_z26wb_20",gt="_ntag_z26wb_25",ft="_content_z26wb_33",ht="_navatar_z26wb_38",yt="_userInfo_z26wb_51",vt="_subjectName_z26wb_65",Dt="_nowmpty_z26wb_74",L={tableSpace:ct,tableContainer:dt,header:pt,time:mt,ntag:gt,content:ft,navatar:ht,userInfo:yt,subjectName:vt,nowmpty:Dt};function Tt(g){return typeof g=="function"||Object.prototype.toString.call(g)==="[object Object]"&&!Fe(g)}const bt=R({name:"class-record",setup(){const g=Te(),o=V(),u=()=>{const d=o.query.gradeYear;if(d){const a="".concat(d,"-9-1"),y="".concat(Number(d)+1,"-8-31");return[N(a).valueOf(),N(y).valueOf()]}else{const a=N().format("YYYY-MM-DD");return[N(a).subtract(1,"month").valueOf(),N(a).valueOf()]}},t=b({searchForm:{teacherId:"",createTimer:u()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),f=()=>{t.pagination.page=1,h(),U({current:t.searchForm,saveKey:"classDetailRecord"})},n=()=>{t.searchForm={teacherId:"",createTimer:u()},f(),U({current:t.searchForm,saveKey:"classDetailRecord"})};J({current:t.searchForm,saveKey:"classDetailRecord",callBack:d=>{t.searchForm=d}});const h=async()=>{t.loading=!0;try{const{data:d}=await Ae({classGroupId:o.query.id,teacherId:t.searchForm.teacherId,...Se(t.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...t.pagination}),a=d.rows||[];a.forEach(y=>{y.lessonCourseware=y.lessonCoursewareJson?JSON.parse(y.lessonCoursewareJson):{}}),t.tableList=a,t.pagination.pageTotal=d.total,t.loading=!1}catch(d){t.loading=!1}},m=async()=>{var d,a;try{const{data:y}=await Ve({schoolId:(a=(d=g.info.schoolInfos)==null?void 0:d[0])==null?void 0:a.id,page:1,rows:1e3}),I=y.rows||[],F=[];I.forEach(i=>{F.push({label:i.nickname,value:i.id})}),t.teacherList=F}catch(y){}};return Y(()=>{m(),h()}),()=>{let d;return e("div",null,[e("div",{class:L.searchList},[e(Q,{"label-placement":"left",inline:!0},{default:()=>[e(S,null,{default:()=>[e(z,O({options:[{label:"全部老师",value:""},...t.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:t.searchForm.teacherId,"onUpdate:value":a=>t.searchForm.teacherId=a}),null)]}),e(S,null,{default:()=>[e(re,{value:t.searchForm.createTimer,"onUpdate:value":a=>t.searchForm.createTimer=a,timerValue:t.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),e(S,null,{default:()=>[e(M,{justify:"end"},{default:()=>[e(C,{type:"primary",class:"searchBtn",onClick:f},{default:()=>[c("搜索")]}),e(C,{type:"primary",ghost:!0,class:"resetBtn",onClick:n},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:L.tableWrap},[e(M,{class:L.tableSpace},Tt(d=t.tableList.map(a=>e("div",{class:L.tableContainer},[e("div",{class:L.header},[e("div",{class:L.time},[N(a.startTime).format("YYYY-MM-DD HH:mm")]),o.query.name&&e(be,{type:"primary",class:L.ntag,strong:!0},{default:()=>[o.query.name]})]),e("div",{class:L.content},[e(Ce,{class:L.navatar,round:!0,src:a.teacherAvatar||me},null),e("div",{class:L.userInfo},[e("h2",null,[a.teacherName]),e("p",null,[a.subjectName&&e("span",{class:L.subjectName},[a.subjectName]),a.lessonCourseware.lessonCoursewareName,c(" |")," ",a.lessonCourseware.lessonCoursewareDetailName,c("|")," ",a.lessonCourseware.lessonCoursewareKnowledgeDetailName,c("| "),a.useChapterLessonCoursewareName])])])])))?d:{default:()=>[d]}),t.tableList.length>0&&e(X,{page:t.pagination.page,"onUpdate:page":a=>t.pagination.page=a,pageSize:t.pagination.rows,"onUpdate:pageSize":a=>t.pagination.rows=a,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":a=>t.pagination.pageTotal=a,onList:h,pageSizes:[12,24,36,48],sync:!0,saveKey:"classRecord-key"},null),t.tableList.length<=0&&e(P,{class:L.nowEmpty},null)])])}}}),Ct=R({name:"student-studentList",setup(){const g=te(),o=b({searchForm:{orderBy:null,sort:null,keyword:"",vipFlag:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[]}),u=b({practiceDuration:0,evaluateUserCount:0,evaluateFrequency:0,publishUserCount:0,publishCount:0,practiceUserCount:0,paymentAmount:0,practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0}),t=V(),f=ae(),n=()=>{o.pagination.page=1,y(),a(),U({current:{...o.searchForm,timer:h.value},saveKey:"classDetailTestRecord"})},h=A([K(new Date().getTime()),W(new Date().getTime())]),m=A([K(new Date().getTime()),W(new Date().getTime())]),d=()=>{h.value=[K(new Date().getTime()),W(new Date().getTime())],o.searchForm={orderBy:null,sort:null,keyword:"",vipFlag:""},n(),U({current:{...o.searchForm,timer:h.value},saveKey:"classDetailTestRecord"})};J({current:{...o.searchForm,timer:h.value},saveKey:"classDetailTestRecord",callBack:r=>{o.searchForm=r,h.value=r.timer}});const a=async()=>{o.loading=!0;try{const r=o.searchForm,v=await _e({classGroupId:t.query.id,studentName:r.keyword,vipFlag:r.vipFlag,orderBy:r.orderBy,sort:r.sort,...o.pagination,...ee(h.value,["startTime","endTime"],"YYYY-MM-DD")});m.value=h.value,o.tableList=v.data.rows,o.pagination.pageTotal=v.data.total,o.loading=!1}catch(r){o.loading=!1,console.log(r)}},y=async()=>{try{const r=o.searchForm,{data:v}=await Pe({page:1,rows:999,studentName:r.keyword,vipFlag:r.vipFlag,orderBy:r.orderBy,sort:r.sort,classGroupId:t.query.id,...ee(h.value,["startTime","endTime"],"YYYY-MM-DD")});u.practiceDuration=v.practiceDuration,u.practiceDurationAvg=v.practiceDurationAvg,u.practiceUserCount=v.practiceUserCount,u.evaluateUserCount=v.evaluateUserCount,u.evaluateFrequency=v.evaluateFrequency,u.publishUserCount=v.publishUserCount,u.publishCount=v.publishCount}catch(r){console.log(r)}};Y(()=>{y(),a()});const I=r=>{f.push({path:"/classStudentRecode",query:{...t.query,studentId:r.studentId,studentName:r.studentName,times:JSON.stringify(m.value)}})},F=(r,v)=>e($,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:l.cell},[r,e("img",{class:l.sortIcon,src:v.sortOrder==="descend"?Ye:v.sortOrder==="ascend"?xe:qe},null)]),default:v.sortOrder==="descend"?"点击升序":v.sortOrder==="ascend"?"取消排序":"点击降序"}),i=b({title(){return F("练习总时长",i)},key:"practiceDuration",sorter:!0,sortOrder:!1,render(r){return ie(r.practiceDuration||0)}}),s=b({title(){return F("练习天数",s)},key:"practiceDays",sorter:!0,sortOrder:!1}),p=b({title(){return F("平均练习时长",p)},key:"practiceDurationAvg",sorter:!0,sortOrder:!1,render(r){return ie(r.practiceDurationAvg||0)}}),T=b({title(){return F("评测次数",T)},key:"evaluateFrequency",sorter:!0,sortOrder:!1}),D=b({title(){return F("作品数量",D)},key:"publishCount",sorter:!0,sortOrder:!1,render(r){return r.publishCount||0}}),E=b({title(){return F("最新作品分数",E)},key:"publishScore",sorter:!0,sortOrder:!1,render(r){return r.publishScore===null?"--":r.publishScore}}),k=b({title(){return F("最新作品时间",k)},key:"publishTime",sorter:!0,sortOrder:!1,render(r){return r.publishTime||"--"}}),le=r=>{const v=document.createElement("input");v.value=r,document.body.appendChild(v),v.select(),v.setSelectionRange(0,v.value.length),document.execCommand("Copy"),document.body.removeChild(v),g.success("复制成功")},ne=()=>[{title:"学生姓名",key:"studentName",render:r=>e($,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>le(r.studentName)},[r.studentName]),default:"点击复制"})},{title:"性别",key:"sex",render(r){return r.gender+""!="null"?r.gender=="0"?"女":"男":"--"}},{title:"学生类型",key:"vipFlag",render(r){return r.vipFlag?"会员":"普通"}},{title:"乐器",key:"instrumentName",render(r){return r.instrumentName||"--"}},i,s,p,T,{title:()=>e("span",{style:{display:"flex",alignItems:"center"}},[c("发布作品")," ",e($,{showArrow:!1},{trigger:()=>e("img",{src:He,class:l.tipImg},null),default:()=>"筛选时间段内评测是否发布作品"})]),key:"publishFlag",render:r=>r.publishFlag?"是":"否"},D,E,k,{title:"操作",key:"titleImg",render:r=>e(C,{type:"primary",text:!0,onClick:()=>{I(r)}},{default:()=>[c("详情")]})}],_=r=>{r.order?(o.searchForm.orderBy=r.columnKey,i.sortOrder=!1,s.sortOrder=!1,p.sortOrder=!1,T.sortOrder=!1,D.sortOrder=!1,E.sortOrder=!1,k.sortOrder=!1,r.columnKey=="practiceDuration"&&(i.sortOrder=r.order),r.columnKey=="practiceDays"&&(s.sortOrder=r.order),r.columnKey=="practiceDurationAvg"&&(p.sortOrder=r.order),r.columnKey=="evaluateFrequency"&&(T.sortOrder=r.order),r.columnKey=="publishCount"&&(D.sortOrder=r.order),r.columnKey=="publishScore"&&(E.sortOrder=r.order),r.columnKey=="publishTime"&&(k.sortOrder=r.order),o.searchForm.sort=r.order=="ascend"?"asc":"desc"):(o.searchForm.orderBy="",o.searchForm.sort="",i.sortOrder=!1,s.sortOrder=!1,p.sortOrder=!1,T.sortOrder=!1,D.sortOrder=!1,E.sortOrder=!1,k.sortOrder=!1),a()};return()=>e("div",null,[e("div",{class:l.searchList},[e(Q,{"label-placement":"left",inline:!0},{default:()=>[e(S,null,{default:()=>[e(de,O({placeholder:"请输入学生姓名"},{class:l.searchInput,searchWord:o.searchForm.keyword,onChangeValue:r=>o.searchForm.keyword=r}),null)]}),e(S,null,{default:()=>[e(z,O({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:o.searchForm.vipFlag,"onUpdate:value":r=>o.searchForm.vipFlag=r}),null)]}),e(S,null,{default:()=>[e(re,{value:h.value,"onUpdate:value":r=>h.value=r,separator:"至",type:"daterange",timerValue:h.value},null)]}),e(S,null,{default:()=>[e(M,{justify:"end"},{default:()=>[e(C,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[c("搜索")]}),e(C,{type:"primary",ghost:!0,class:"resetBtn",onClick:d},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:["section-container"]},[e("div",{class:l.TrainDataTop},[e("div",{class:l.TrainDataTopLeft},[e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[e("div",null,[e("span",null,[e(w,{from:0,to:u.practiceUserCount},null)]),c("人")])]),e("p",{class:l.TrainDataItemsubTitle},[c("练习人数")])]),e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[x(u.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(w,{from:0,to:x(u.practiceDurationAvg)},null)]),c("时")]):null,x(u.practiceDurationAvg)>0||Z(u.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(w,{from:0,to:Z(u.practiceDurationAvg)},null)]),c("分")]):null,e("div",null,[e("span",null,[e(w,{from:0,to:oe(u.practiceDurationAvg)},null)]),c("秒")])]),e("p",{class:l.TrainDataItemsubTitle},[c("平均每天练习时长")])]),e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[x(u.practiceDuration)>0?e("div",null,[e("span",null,[e(w,{from:0,to:x(u.practiceDuration)},null)]),c("时")]):null,x(u.practiceDuration)>0||Z(u.practiceDuration)>0?e("div",null,[e("span",null,[e(w,{from:0,to:Z(u.practiceDuration)},null)]),c("分")]):null,e("div",null,[e("span",null,[e(w,{from:0,to:oe(u.practiceDuration)},null)]),c("秒")])]),e("p",{class:l.TrainDataItemsubTitle},[c("练习总时长")])]),e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[e("div",null,[e("span",null,[e(w,{from:0,to:u.evaluateUserCount},null),c("/"),e(w,{from:0,to:u.evaluateFrequency},null)])])]),e("p",{class:l.TrainDataItemsubTitle},[c("评测人数/次数")])]),e("div",{class:l.TrainDataItem},[e("p",{class:l.TrainDataItemTitle},[e("div",null,[e("span",null,[e(w,{from:0,to:u.publishUserCount},null),c("/"),e(w,{from:0,to:u.publishCount},null)])])]),e("p",{class:l.TrainDataItemsubTitle},[c("作品人数/数量")])])]),e("div",{class:l.TrainDataTopRight},null)])]),e("div",{class:[l.tableWrap,l.noSort]},[e(se,{class:l.classTable,loading:o.loading,columns:ne(),data:o.tableList,"onUpdate:sorter":_},{empty:()=>e(P,null,null)}),e(X,{page:o.pagination.page,"onUpdate:page":r=>o.pagination.page=r,pageSize:o.pagination.rows,"onUpdate:pageSize":r=>o.pagination.rows=r,pageTotal:o.pagination.pageTotal,"onUpdate:pageTotal":r=>o.pagination.pageTotal=r,onList:a,sync:!0},null)])])}}),ra=R({name:"base-setting",setup(){const g=sessionStorage.getItem("classDetailTabs"),o=A(g||"afterWork");sessionStorage.removeItem("classDetailTabs");const u=V(),t=A([{name:"班级管理",path:"/classList"},{name:u.query.name,path:"/classDetail"}]);Oe(m=>{m.form.tabName&&(o.value=m.form.tabName)});const f=m=>{Re(m,"tabName",u)},n=A();return(async()=>{try{const m=u.query.id,{data:d}=await Me({id:m});n.value=d.upgradeFlag?1:0}catch(m){}})(),Y(()=>{g&&(o.value=g)}),we(()=>{const m=sessionStorage.getItem("classDetailTabs");m&&(o.value=m)}),()=>e("div",null,[e(ke,{list:t.value},null),e("div",{class:[l.listWrap,l.infoListWrap]},[e(Ie,{class:l.customTabs,value:o.value,"onUpdate:value":[m=>o.value=m,m=>f(m)],size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[e(H,{name:"afterWork",tab:"课后作业"},{default:()=>[e(ut,{upgradeFlag:n.value},null)]}),e(H,{name:"practice",tab:"学练记录"},{default:()=>[e(Ct,null,null)]}),e(H,{name:"attendclass",tab:"上课记录"},{default:()=>[e(bt,null,null)]}),e(H,{name:"student",tab:"学员名单"},{default:()=>[e(Ze,{upgradeFlag:n.value},null)]})]})])])}});export{ra as default};