import{s as o}from"./index.module-7d86a2ea-1724872791500.js";import{d as L,b as te,a as A,u as H,e as I,A as ae,q as E,f as e,N as W,g as b,y as k,x as w,j as y,k as c,aG as Q,l as _,m as B,V as O,F as C,r as N,E as se,w as ce,Q as T,aJ as de,aK as pe,c as me,aL as ge,aM as fe,D as he,L as ye,aA as ve,aB as K,B as be,t as De,v as x}from"./index-d5898469-1724872791500.js";import{C as Te}from"./index-a2b71fe1-1724872791500.js";import{S as re}from"./index-2343cbda-1724872791500.js";import{C as M}from"./index-8351aa81-1724872791500.js";import{P as $}from"./index-7c3a1a20-1724872791500.js";import{h as Fe,i as Ce,j as we,k as Se,l as Ie,m as ke,n as Le}from"./api-f59ea4cf-1724872791500.js";import{T as U}from"./index-81f77935-1724872791500.js";import{U as Ee}from"./index-3082a6bb-1724872791500.js";import{i as z,s as S,g as Ne,a as _e}from"./use-async-be187add-1724872791500.js";import{C as X}from"./index-5094973b-1724872791500.js";import{T as le,a as Be,S as Me}from"./index-31fd5fdc-1724872791500.js";import{d as ne}from"./teacherIcon-b8e3946d-1724872791500.js";import{e as ie}from"./contants-81f70019-1724872791500.js";import{N as oe}from"./Scrollbar-d9cfeed6-1724872791500.js";import{g as j,a as G,b as P,c as R,d as V,N as q}from"./dateFormat-2b5ecfd9-1724872791500.js";import{o as Ae,p as Ue}from"./api-99c6b750-1724872791500.js";import{a as Ye}from"./api-f3af3369-1724872791500.js";import{i as Z,a as J,b as ee}from"./icon-sort-asc-1f640ab4-1724872791500.js";import"./api-a584700f-1724872791500.js";import"./contants-deea6c4d-1724872791500.js";import"./index-8eefb3e6-1724872791500.js";import"./Slider-a3783332-1724872791500.js";import"./urlUtils-72ef455d-1724872791500.js";import"./index-ba618019-1724872791500.js";import"./icon_default-d1bcaf5f-1724872791500.js";import"./useSpeak-6168804b-1724872791500.js";import"./api-06cc7b3f-1724872791500.js";import"./icon-pan-16e35a82-1724872791500.js";import"./api-8001726c-1724872791500.js";import"./index-0022b6d4-1724872791500.js";import"./catchData-dad14be5-1724872791500.js";import"./index-feb53cac-1724872791500.js";import"./index-8df00c37-1724872791500.js";const xe=L({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(m){const f=te(),l=A(),t=H(),n=I({upgradeFlag:m.upgradeFlag==0,searchForm:{keyword:"",gender:"",membership:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],editStatus:!1,activeRow:{}});ae(()=>m.upgradeFlag,()=>{n.upgradeFlag=m.upgradeFlag==0});const h=()=>{n.pagination.page=1,d(),S({current:n.searchForm,saveKey:"classDetailStudent"})},g=()=>{n.searchForm={keyword:"",gender:"",membership:""},h(),S({current:n.searchForm,saveKey:"classDetailStudent"})},d=async()=>{n.loading=!0;try{const r=await Fe({classGroupId:l.query.id,...n.searchForm,...n.pagination});n.tableList=r.data.rows,n.pagination.pageTotal=r.data.total,n.loading=!1}catch(r){n.loading=!1,console.log(r)}};z({current:n.searchForm,saveKey:"classDetailStudent",callBack:r=>{n.searchForm=r}}),E(()=>{d()});const s=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),f.success("复制成功")},a=r=>{t.push({path:"/classStudentDetail",query:{...l.query,studentId:r.id,studentName:r.nickname,upgradeFlag:n.upgradeFlag?0:1}})},u=()=>[{title:"学生姓名",key:"nickname",render:r=>e(O,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>s(r.nickname)},[r.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:r=>e(O,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>s(r.phone)},[r.phone]),default:"点击复制"})},{title:"性别",key:"gender",render(r){return e(C,null,[r.gender+""!="null"?r.gender=="0"?"女":"男":"--"])}},{title:"学生类型",key:"vipMember",render(r){return e(C,null,[r.vipMember?"会员":"普通"])}},{title:"操作",key:"id",render(r){return e(w,null,{default:()=>[e(y,{text:!0,type:"primary",onClick:()=>a(r)},{default:()=>[c("详情")]}),e(y,{text:!0,type:"primary",onClick:()=>p(r),disabled:r.historyClassStudent},{default:()=>[c("修改")]})]})}}],p=r=>{n.editStatus=!0,n.activeRow=r};return()=>e("div",null,[e("div",{class:o.searchList},[e(W,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(re,k({placeholder:"请输入学生姓名"},{class:o.searchInput,searchWord:n.searchForm.keyword,onChangeValue:r=>n.searchForm.keyword=r}),null)]}),e(b,null,{default:()=>[e(M,k({options:[{label:"全部性别",value:""},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:n.searchForm.gender,"onUpdate:value":r=>n.searchForm.gender=r}),null)]}),e(b,null,{default:()=>[e(M,k({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:n.searchForm.membership,"onUpdate:value":r=>n.searchForm.membership=r}),null)]}),e(b,null,{default:()=>[e(w,{justify:"end"},{default:()=>[e(y,{type:"primary",class:"searchBtn",onClick:h},{default:()=>[c("搜索")]}),e(y,{type:"primary",ghost:!0,class:"resetBtn",onClick:g},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:o.tableWrap},[e(Q,{class:o.classTable,loading:n.loading,columns:u(),data:n.tableList},{empty:()=>e(U,null,null)}),e($,{page:n.pagination.page,"onUpdate:page":r=>n.pagination.page=r,pageSize:n.pagination.rows,"onUpdate:pageSize":r=>n.pagination.rows=r,pageTotal:n.pagination.pageTotal,"onUpdate:pageTotal":r=>n.pagination.pageTotal=r,onList:d,sync:!0},null)]),e(_,{maskClosable:B,show:n.editStatus,"onUpdate:show":r=>n.editStatus=r,class:["modalTitle background",o.updateStudent],preset:"card",title:"修改信息"},{default:()=>[e(Ee,{onClose:()=>n.editStatus=!1,onConfirm:()=>d(),row:n.activeRow},null)]})])}}),Re=L({props:{activeRow:{type:Object,default:()=>({id:""})},total:{type:Number,default:0},current:{type:Number,default:0}},name:"classTrainingDetails",emits:["close"],setup(m,{emit:f,expose:l}){const t=N(!1),n=N({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),h=(d,s)=>{let a=[];return d==="EVALUATION"?a=["".concat(ie[s.evaluateDifficult]),s.practiceChapterBegin||s.practiceChapterEnd?"".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"):"全部小节","".concat(s.trainingTimes,"分合格")]:a=["".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"),"速度".concat(s.practiceSpeed),"".concat(s.trainingTimes,"分钟")],a},g=async d=>{t.value=!0;try{const s=await Ce({trainingId:d}),a=s.data.studentLessonTrainingDetails.map(u=>{const p=h(u.trainingType,JSON.parse(u.trainingContent));return{...u,coverImg:u.titleImg,allTimes:JSON.parse(u.trainingContent).trainingTimes,typeList:p||[]}});n.value={...s.data,studentLessonTrainingDetails:a}}catch(s){console.log(s)}t.value=!1};return l({getTrainingDetail:g}),E(()=>{g(m.activeRow.id)}),()=>e("div",{class:[o.trainingDetails]},[e(se,{show:t.value},{default:()=>[e("div",{class:o.studentList},[e("div",{class:o.studentHeaderWrap},[e("div",{class:o.studentHeader},[e("div",{class:o.studentHeaderBorder},[e(ce,{class:o.studentHeaderImg,src:n.value.teacherAvatar?n.value.teacherAvatar:ne,previewDisabled:!0},null)])]),e("div",{class:o.workafterInfo},[e("h4",null,[n.value.teacherName," ",e("div",{class:[o.workafterInfoDot,o.workafterTeacherInfoDot]},[c("老师")])]),e("p",null,[c("开始时间:"),n.value.createTime?T(new Date(n.value.createTime)).format("YYYY-MM-DD"):"--"," ",c("| 结束时间:"),n.value.expireDate?T(new Date(n.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),e(oe,{style:"max-height:400px",trigger:"none"},{default:()=>[e("div",{class:o.workList},[n.value.studentLessonTrainingDetails.map(d=>e(le,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:d},null))])]})]})])}}),qe="_trainSettings_qodsv_1",Oe="_trainBtnGroup_qodsv_1",je="_searchGroup_qodsv_9",Ge="_datetime_qodsv_13",We="_trainList_qodsv_43",$e="_listSection_qodsv_48",ze="_emptySection_qodsv_51",Ke="_list_qodsv_48",Ve="_trainEditModal_qodsv_69",Pe="_selectMusicModal_qodsv_72",F={trainSettings:qe,trainBtnGroup:Oe,searchGroup:je,datetime:Ge,trainList:We,listSection:$e,emptySection:ze,list:Ke,trainEditModal:Ve,selectMusicModal:Pe},He=L({name:"train-settings",props:{detailId:{type:String,default:""},subjectId:{type:String,default:""},classGroupId:{type:String,default:""},courseScheduleId:{type:String,default:""}},emits:["close","confirm"],setup(m,{emit:f}){const l=te(),t=I({type:"add",btnLoading:!1,loadingStatus:!1,editStatus:!1,editItem:{},selectMusicStatus:!1,trainList:[],currentTime:T(T().format("YYYY-MM-DD")).valueOf(),expireDate:T().add(7,"day").format("YYYY-MM-DD")}),n=async()=>{t.loadingStatus=!0;try{const{data:s}=await Ae({coursewareKnowledgeDetailId:m.detailId,subjectId:m.subjectId,page:1,rows:99}),a=s.rows||[],u=[];a.forEach(p=>{const r=h(p.trainingType,p.trainingConfigJson);u.push({typeList:r||[],...p})}),t.trainList=u||[]}catch(s){}t.loadingStatus=!1},h=(s,a)=>{let u=[];return s==="EVALUATION"?u=["".concat(ie[a.evaluateDifficult]),a.practiceChapterBegin||a.practiceChapterEnd?"".concat(a.practiceChapterBegin,"-").concat(a.practiceChapterEnd,"小节"):"全部小节","".concat(a.trainingTimes,"分合格")]:u=["".concat(a.practiceChapterBegin,"-").concat(a.practiceChapterEnd,"小节"),"速度".concat(a.practiceSpeed),"".concat(a.trainingTimes,"分钟")],u},g=async s=>{var p;let a="init",u=null;try{const r=await pe.get(s.xmlFileUrl,{mode:"cors"});u=(p=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("part")[0])==null?void 0:p.getElementsByTagName("measure"),a="success"}catch(r){a="error"}a=="success"?s.practiceChapterMax=u.length:s.practiceChapterMax=0,s.coursewareKnowledgeDetailId=m.detailId,s.subjectId=m.subjectId,t.editItem=s,t.editStatus=!0},d=async()=>{if(!t.expireDate){l.error("请选择截止日期");return}if(t.trainList.length<=0){l.error("训练内容不能为空");return}t.btnLoading=!0;try{const s=t.trainList||[],a=[];s.forEach(p=>{a.push({trainingType:p.trainingType,musicId:p.musicId,trainingConfigJsonObject:p.trainingConfigJson})});const u={lessonTrainingDetails:a,expireDate:t.expireDate+" 23:59:59",classGroupId:m.classGroupId,courseScheduleId:m.courseScheduleId||null};await Ue(u),l.success("布置成功"),f("close"),f("confirm")}catch(s){}t.btnLoading=!1};return E(()=>{m.detailId&&m.subjectId&&n()}),()=>e("div",{class:F.trainSettings},[e("div",{class:F.searchGroup},[e(y,{onClick:()=>{t.selectMusicStatus=!0,t.type="add"}},{default:()=>[c("添加作业")]}),e("div",{class:F.datetime},[e("label",null,[c("截止时间:")]),e(de,{style:{width:"200px"},placeholder:"请选择截止日期","formatted-value":t.expireDate,"onUpdate:formatted-value":s=>t.expireDate=s,type:"date",valueFormat:"yyyy-MM-dd",isDateDisabled:s=>s[e(se,{show:t.loadingStatus},{default:()=>[e("div",{class:[F.listSection,!t.loadingStatus&&t.trainList.length<=0?F.emptySection:""]},[t.trainList.length>0&&e("div",{class:F.list},[t.trainList.map((s,a)=>e(le,{item:s,type:"homework",onEdit:u=>{const{trainingConfigJson:p,id:r,musicId:v,...Y}=u;t.editItem={...Y,id:v,trainId:r,...p},console.log(t.editItem),t.type="update",t.editStatus=!0},onDelete:()=>{t.trainList.splice(a,1)}},null))]),!t.loadingStatus&&t.trainList.length<=0&&e(U,{description:"暂无作业"},null)])]})]}),e(w,{class:F.trainBtnGroup},{default:()=>[e(y,{strong:!0,type:"default",round:!0,onClick:()=>f("close")},{default:()=>[c("取消布置")]}),e(y,{strong:!0,type:"primary",round:!0,disabled:t.trainList.length<=0,onClick:d},{default:()=>[c("立即布置")]})]}),e(_,{maskClosable:B,show:t.editStatus,"onUpdate:show":s=>t.editStatus=s,class:["modalTitle background",F.trainEditModal],preset:"card",title:"作业设置"},{default:()=>[e(Be,{item:t.editItem,type:"homework",onClose:()=>t.editStatus=!1,onConfirm:s=>{console.log(s,"update",t);const a=h(s.trainingType,s.trainingConfigJson);t.type==="update"?t.trainList.forEach(u=>{u.id===s.id&&(u.trainingType=s.trainingType,u.trainingConfigJson=s.trainingConfigJson,u.typeList=a)}):t.trainList.push({...s,id:+new Date,musicName:t.editItem.title,typeList:a}),t.editItem={}}},null)]}),e(_,{maskClosable:B,show:t.selectMusicStatus,"onUpdate:show":s=>t.selectMusicStatus=s,class:["modalTitle",F.selectMusicModal],preset:"card",title:"选择曲目"},{default:()=>[e(Me,{type:"homework",onAdd:s=>{t.selectMusicStatus=!1,g(s)}},null)]})])}}),Qe=L({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(m){const f=H(),l=A(),t=I({upgradeFlag:m.upgradeFlag==0,searchForm:{status:"",timer:[j(new Date().getTime()),G(new Date().getTime())]},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1});ae(()=>m.upgradeFlag,()=>{t.upgradeFlag=m.upgradeFlag==0});const n=()=>{t.pagination.page=1,g(),S({current:t.searchForm,saveKey:"classDetailAfterWork"})},h=()=>{t.searchForm={status:"",timer:[j(new Date().getTime()),G(new Date().getTime())]},n(),S({current:t.searchForm,saveKey:"classDetailAfterWork"})};z({current:t.searchForm,saveKey:"classDetailAfterWork",callBack:a=>{t.searchForm=a}});const g=async()=>{t.loading=!0;try{const{timer:a,...u}=t.searchForm,p=await we({classGroupId:l.query.id,...u,...t.pagination,...P(a,["startTime","endTime"],"YYYY-MM-DD")});t.tableList=p.data.rows,t.pagination.pageTotal=p.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}};E(()=>{g()});const d=()=>[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render(a){return e(C,null,[a.createTime])}},{title:"截止时间",key:"expireDate",render(a){return e(C,null,[a.expireDate])}},{title:"作业状态",key:"status",render(a){return a.status?e("div",{class:o.endDot},[e("span",null,null),c("已结束")]):e("div",{class:o.indDot},[e("span",null,null),c(" 进行中")])}},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"合格人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render(a){return e(C,null,[a.trainingRate,c("%")])}},{title:"合格率",key:"qualifiedRate",render(a){return e(C,null,[a.qualifiedRate,c("%")])}},{title:"操作",key:"id",render(a){return e(w,null,{default:()=>[e(y,{text:!0,type:"primary",onClick:()=>s(a)},{default:()=>[c("详情")]})]})}}],s=a=>{f.push({path:"/afterWorkDetail",query:{...l.query,classGroupId:l.query.id,teacherName:a.teacherName,trainingId:a.id}})};return()=>e("div",null,[e("div",{class:o.searchList},[e(W,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(X,{value:t.searchForm.timer,"onUpdate:value":a=>t.searchForm.timer=a,separator:"至",type:"daterange",timerValue:t.searchForm.timer},null)]}),e(b,null,{default:()=>[e(M,k({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(b,null,{default:()=>[e(w,{justify:"end"},{default:()=>[e(y,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[c("搜索")]}),e(y,{type:"primary",ghost:!0,class:"resetBtn",onClick:h},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:o.tableWrap},[e(Q,{class:o.classTable,loading:t.loading,columns:d(),data:t.tableList},{empty:()=>e(U,null,null)}),e($,{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:g,sync:!0},null)]),e(_,{maskClosable:B,show:t.addWorkVisible,"onUpdate:show":a=>t.addWorkVisible=a,preset:"card",class:[o.attendClassModal,o.trainClassModal],title:"作业设置"},{default:()=>[e(He,{classGroupId:l.query.id,onClose:()=>{g(),t.addWorkVisible=!1}},null)]}),e(_,{maskClosable:B,show:t.detailVisiable,"onUpdate:show":a=>t.detailVisiable=a,preset:"card",class:["modalTitle background",o.wordDetailModel],title:"作业详情"},{default:()=>[e(Re,{onClose:()=>t.detailVisiable=!1,activeRow:t.activeRow},null)]})])}}),Xe="_tableSpace_z26wb_1",Ze="_tableContainer_z26wb_4",Je="_header_z26wb_10",et="_time_z26wb_20",tt="_ntag_z26wb_25",at="_content_z26wb_33",st="_navatar_z26wb_38",rt="_userInfo_z26wb_51",lt="_subjectName_z26wb_65",nt="_nowmpty_z26wb_74",D={tableSpace:Xe,tableContainer:Ze,header:Je,time:et,ntag:tt,content:at,navatar:st,userInfo:rt,subjectName:lt,nowmpty:nt};function it(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!he(m)}const ot=L({name:"class-record",setup(){const m=me(),f=A(),l=()=>{const s=f.query.gradeYear;if(s){const a="".concat(s,"-9-1"),u="".concat(Number(s)+1,"-8-31");return[T(a).valueOf(),T(u).valueOf()]}else{const a=T().format("YYYY-MM-DD");return[T(a).subtract(1,"month").valueOf(),T(a).valueOf()]}},t=I({searchForm:{teacherId:"",createTimer:l()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),n=()=>{t.pagination.page=1,g(),S({current:t.searchForm,saveKey:"classDetailRecord"})},h=()=>{t.searchForm={teacherId:"",createTimer:l()},n(),S({current:t.searchForm,saveKey:"classDetailRecord"})};z({current:t.searchForm,saveKey:"classDetailRecord",callBack:s=>{t.searchForm=s}});const g=async()=>{t.loading=!0;try{const{data:s}=await Se({classGroupId:f.query.id,teacherId:t.searchForm.teacherId,...ye(t.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...t.pagination}),a=s.rows||[];a.forEach(u=>{u.lessonCourseware=u.lessonCoursewareJson?JSON.parse(u.lessonCoursewareJson):{}}),t.tableList=a,t.pagination.pageTotal=s.total,t.loading=!1}catch(s){t.loading=!1}},d=async()=>{var s,a;try{const{data:u}=await Ye({schoolId:(a=(s=m.info.schoolInfos)==null?void 0:s[0])==null?void 0:a.id,page:1,rows:1e3}),p=u.rows||[],r=[];p.forEach(v=>{r.push({label:v.nickname,value:v.id})}),t.teacherList=r}catch(u){}};return E(()=>{d(),g()}),()=>{let s;return e("div",null,[e("div",{class:D.searchList},[e(W,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(M,k({options:[{label:"全部老师",value:""},...t.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:t.searchForm.teacherId,"onUpdate:value":a=>t.searchForm.teacherId=a}),null)]}),e(b,null,{default:()=>[e(X,{value:t.searchForm.createTimer,"onUpdate:value":a=>t.searchForm.createTimer=a,timerValue:t.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),e(b,null,{default:()=>[e(w,{justify:"end"},{default:()=>[e(y,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[c("搜索")]}),e(y,{type:"primary",ghost:!0,class:"resetBtn",onClick:h},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:D.tableWrap},[e(w,{class:D.tableSpace},it(s=t.tableList.map(a=>e("div",{class:D.tableContainer},[e("div",{class:D.header},[e("div",{class:D.time},[T(a.startTime).format("YYYY-MM-DD HH:mm")]),f.query.name&&e(ge,{type:"primary",class:D.ntag,strong:!0},{default:()=>[f.query.name]})]),e("div",{class:D.content},[e(fe,{class:D.navatar,round:!0,src:a.teacherAvatar||ne},null),e("div",{class:D.userInfo},[e("h2",null,[a.teacherName]),e("p",null,[a.subjectName&&e("span",{class:D.subjectName},[a.subjectName]),a.lessonCourseware.lessonCoursewareName,c(" |")," ",a.lessonCourseware.lessonCoursewareDetailName,c("|")," ",a.lessonCourseware.lessonCoursewareKnowledgeDetailName,c("| "),a.useChapterLessonCoursewareName])])])])))?s:{default:()=>[s]}),t.tableList.length>0&&e($,{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:g,pageSizes:[12,24,36,48],sync:!0,saveKey:"classRecord-key"},null),t.tableList.length<=0&&e(U,{class:D.nowEmpty},null)])])}}}),ut=L({name:"student-studentList",setup(m,{emit:f}){const l=I({searchForm:{ase:0,sortType:1,keyword:"",trainingStatus:null,vipFlag:""},searchWord:"",orchestraType:null,courseTypeCode:null,subjectId:null,classId:null,studentType:null,loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],memberNumber:0,testInfo:{practiceDurationAvg:0,vipUserCount:0,practiceUserCount:0},activeRow:null}),t=A(),n=H(),h=()=>{l.pagination.page=1,a(),s(),S({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord"})},g=N([j(new Date().getTime()),G(new Date().getTime())]),d=()=>{g.value=[j(new Date().getTime()),G(new Date().getTime())],l.searchForm={ase:0,sortType:1,keyword:"",trainingStatus:null,vipFlag:""},h(),S({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord"})};z({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord",callBack:i=>{l.searchForm=i,g.value=i.timer}});const s=async()=>{l.loading=!0;try{const i=await Ie({classGroupId:t.query.id,...l.searchForm,...l.pagination,...P(g.value,["startTime","endTime"],"YYYY-MM-DD")});l.tableList=i.data.rows,l.pagination.pageTotal=i.data.total,l.loading=!1}catch(i){l.loading=!1,console.log(i)}},a=async()=>{try{const i=await ke({classGroupId:t.query.id,...P(g.value,["startTime","endTime"],"YYYY-MM-DD")});l.testInfo.practiceDurationAvg=i.data.practiceDurationAvg,l.testInfo.practiceUserCount=i.data.practiceUserCount,l.testInfo.vipUserCount=i.data.vipUserCount}catch(i){console.log(i)}};E(()=>{a(),s()});const u=i=>{n.push({path:"/classStudentRecode",query:{...t.query,studentId:i.studentId,studentName:i.studentName}})},p=I({title(){return e(O,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:o.cell},[c("练习天数"),e("img",{class:o.sortIcon,src:p.sortOrder==="descend"?Z:p.sortOrder==="ascend"?J:ee},null)]),default:p.sortOrder==="descend"?"点击升序":p.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDays",sorter:!0,sortOrder:!1,render(i){return e(C,null,[i.practiceDays?i.practiceDays:0,c("天")])}}),r=I({title(){return e(O,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:o.cell},[c("学练时长"),e("img",{class:o.sortIcon,src:r.sortOrder==="descend"?Z:r.sortOrder==="ascend"?J:ee},null)]),default:r.sortOrder==="descend"?"点击升序":r.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDuration",sorter:!0,sortOrder:!1,render(i){return e(C,null,[i.practiceDuration?R(i.practiceDuration)>0?R(i.practiceDuration)+"分"+V(i.practiceDuration)+"秒":V(i.practiceDuration)+"秒":"0秒"])}}),v=()=>[{title:"学生姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},{title:"性别",key:"sex",render(i){return e(C,null,[i.gender+""!="null"?i.gender=="0"?"女":"男":"--"])}},{title:"学生类型",key:"studentType",render(i){return e(C,null,[i.vipFlag?"会员":"普通"])}},p,r,{title:"操作",key:"id",render(i){return e(y,{text:!0,type:"primary",onClick:()=>{u(i)}},{default:()=>[c("详情")]})}}],Y=i=>{if(!i)l.searchForm.ase=0,l.searchForm.sortType=1,p.sortOrder=!1,r.sortOrder=!1;else{const ue={practiceDuration:1,practiceDays:2};l.searchForm.sortType=ue[i.columnKey],i.columnKey=="practiceDuration"&&(r.sortOrder=i.order,p.sortOrder=!1),i.columnKey=="practiceDays"&&(p.sortOrder=i.order,r.sortOrder=!1),l.searchForm.ase=i.order=="ascend"?1:0}s()};return()=>e("div",null,[e("div",{class:o.searchList},[e(W,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(re,k({placeholder:"请输入学生姓名"},{class:o.searchInput,searchWord:l.searchForm.keyword,onChangeValue:i=>l.searchForm.keyword=i}),null)]}),e(b,null,{default:()=>[e(M,k({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:l.searchForm.vipFlag,"onUpdate:value":i=>l.searchForm.vipFlag=i}),null)]}),e(b,null,{default:()=>[e(X,{value:g.value,"onUpdate:value":i=>g.value=i,separator:"至",type:"daterange",timerValue:g.value},null)]}),e(b,null,{default:()=>[e(w,{justify:"end"},{default:()=>[e(y,{type:"primary",class:"searchBtn",onClick:h},{default:()=>[c("搜索")]}),e(y,{type:"primary",ghost:!0,class:"resetBtn",onClick:d},{default:()=>[c("重置")]})]})]})]})]),e("div",{class:["section-container"]},[e(ve,{"x-gap":"12",cols:8},{default:()=>[e(K,null,{default:()=>[e("div",{class:o.TrainDataItem},[e("div",null,[e("p",{class:o.TrainDataItemTitle},[e("div",null,[e("span",null,[e(q,{from:0,to:l.testInfo.practiceUserCount},null)])," ",c("人")])])]),e("p",{class:o.TrainDataItemsubTitle},[c("练习人数")])])]}),e(K,null,{default:()=>[e("div",{class:o.TrainDataItem},[e("p",{class:o.TrainDataItemTitle},[e("div",null,[e("span",null,[e(q,{from:0,to:l.testInfo.vipUserCount},null)])," ",c("人")])]),e("p",{class:o.TrainDataItemsubTitle},[c("会员人数")])])]}),e(K,null,{default:()=>[e("div",{class:o.TrainDataItem},[e("p",{class:o.TrainDataItemTitle},[R(l.testInfo.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(q,{from:0,to:R(l.testInfo.practiceDurationAvg)},null)])," ",c("分")]):null,e("div",null,[e("span",null,[e(q,{from:0,to:V(l.testInfo.practiceDurationAvg)},null)])," ",c("秒")])]),e("p",{class:o.TrainDataItemsubTitle},[c("平均每天练习时长")])])]})]})]),e("div",{class:[o.tableWrap,o.noSort]},[e(Q,{class:o.classTable,loading:l.loading,columns:v(),data:l.tableList,"onUpdate:sorter":Y},{empty:()=>e(U,null,null)}),e($,{page:l.pagination.page,"onUpdate:page":i=>l.pagination.page=i,pageSize:l.pagination.rows,"onUpdate:pageSize":i=>l.pagination.rows=i,pageTotal:l.pagination.pageTotal,"onUpdate:pageTotal":i=>l.pagination.pageTotal=i,onList:s,sync:!0},null)])])}}),$t=L({name:"base-setting",setup(){const m=sessionStorage.getItem("classDetailTabs"),f=N(m||"student");sessionStorage.removeItem("classDetailTabs");const l=A(),t=N([{name:"班级管理",path:"/classList"},{name:l.query.name,path:"/classDetail"}]);Ne(d=>{d.form.tabName&&(f.value=d.form.tabName)});const n=d=>{_e(d,"tabName",l)},h=N();return(async()=>{try{const d=l.query.id,{data:s}=await Le({id:d});h.value=s.upgradeFlag?1:0}catch(d){}})(),E(()=>{m&&(f.value=m)}),be(()=>{const d=sessionStorage.getItem("classDetailTabs");d&&(f.value=d)}),()=>e("div",null,[e(Te,{list:t.value},null),e("div",{class:[o.listWrap,o.infoListWrap]},[e(De,{class:o.customTabs,value:f.value,"onUpdate:value":[d=>f.value=d,d=>n(d)],size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[e(x,{name:"student",tab:"学员名单"},{default:()=>[e(xe,{upgradeFlag:h.value},null)]}),e(x,{name:"afterWork",tab:"课后作业"},{default:()=>[e(Qe,{upgradeFlag:h.value},null)]}),e(x,{name:"practice",tab:"练习记录"},{default:()=>[e(ut,null,null)]}),e(x,{name:"attendclass",tab:"上课记录"},{default:()=>[e(ot,null,null)]})]})])])}});export{$t as default};