classDetail-legacy-f2dca1e7-1725962701482.js 29 KB

1
  1. System.register(["./index.module-legacy-080f5ce6-1725962701482.js","./index-legacy-f8e66744-1725962701482.js","./index-legacy-c66d766c-1725962701482.js","./index-legacy-1dabf563-1725962701482.js","./index-legacy-0b067d98-1725962701482.js","./index-legacy-a9c0d11a-1725962701482.js","./api-legacy-19fd7dfd-1725962701482.js","./index-legacy-f75a67e8-1725962701482.js","./index-legacy-1d55b8f6-1725962701482.js","./use-async-legacy-803b1971-1725962701482.js","./index-legacy-3013e11b-1725962701482.js","./index-legacy-c04ffc4f-1725962701482.js","./teacherIcon-legacy-3eeb62c3-1725962701482.js","./contants-legacy-ed31834c-1725962701482.js","./Scrollbar-legacy-b623a0cb-1725962701482.js","./dateFormat-legacy-29f86ef3-1725962701482.js","./api-legacy-6969be2f-1725962701482.js","./api-legacy-687a52f7-1725962701482.js","./icon-sort-asc-legacy-e919a334-1725962701482.js","./api-legacy-3788cb1c-1725962701482.js","./contants-legacy-5e2d4c3e-1725962701482.js","./index-legacy-74b80897-1725962701482.js","./Slider-legacy-5a336986-1725962701482.js","./urlUtils-legacy-0ad6488a-1725962701482.js","./index-legacy-8b0820b9-1725962701482.js","./icon_default-legacy-fa9bb009-1725962701482.js","./useSpeak-legacy-719087d1-1725962701482.js","./api-legacy-91b4da66-1725962701482.js","./icon-pan-legacy-9492b61b-1725962701482.js","./api-legacy-43eef34f-1725962701482.js","./index-legacy-ded67b12-1725962701482.js","./catchData-legacy-de01f77c-1725962701482.js","./index-legacy-8320ffad-1725962701482.js","./index-legacy-d4b487a1-1725962701482.js"],(function(e,a){"use strict";var t,l,n,s,r,i,o,d,c,u,p,g,m,v,h,_,y,f,w,b,T,D,F,C,k,S,I,x,q,L,j,z,M,N,U,Y,O,E,B,A,G,R,W,K,$,V,J,P,H,Q,X,Z,ee,ae,te,le,ne,se,re,ie,oe,de,ce,ue,pe,ge,me,ve,he,_e,ye,fe;return{setters:[e=>{t=e.s},e=>{l=e.d,n=e.b,s=e.a,r=e.u,i=e.e,o=e.A,d=e.q,c=e.f,u=e.N,p=e.g,g=e.y,m=e.x,v=e.j,h=e.k,_=e.aG,y=e.l,f=e.m,w=e.V,b=e.F,T=e.r,D=e.E,F=e.w,C=e.Q,k=e.aJ,S=e.aK,I=e.c,x=e.aL,q=e.aM,L=e.D,j=e.L,z=e.aA,M=e.aB,N=e.B,U=e.t,Y=e.v},e=>{O=e.C},e=>{E=e.S},e=>{B=e.C},e=>{A=e.P},e=>{G=e.h,R=e.i,W=e.j,K=e.k,$=e.l,V=e.m,J=e.n},e=>{P=e.T},e=>{H=e.U},e=>{Q=e.i,X=e.s,Z=e.g,ee=e.a},e=>{ae=e.C},e=>{te=e.T,le=e.a,ne=e.S},e=>{se=e.d},e=>{re=e.e},e=>{ie=e.N},e=>{oe=e.g,de=e.a,ce=e.b,ue=e.c,pe=e.d,ge=e.N},e=>{me=e.o,ve=e.p},e=>{he=e.a},e=>{_e=e.i,ye=e.a,fe=e.b},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){var a=document.createElement("style");a.textContent="._trainSettings_qodsv_1 ._trainBtnGroup_qodsv_1{padding:1.66666667vw 0 2.08333333vw;justify-content:center!important}._trainSettings_qodsv_1 ._trainBtnGroup_qodsv_1 .n-button{height:2.5vw!important;padding:0 2.1875vw}._trainSettings_qodsv_1 ._searchGroup_qodsv_9{display:flex;padding:1.35416667vw 2.08333333vw 0}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 ._datetime_qodsv_13{margin-left:2.08333333vw;display:inline-flex;align-items:center}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 ._datetime_qodsv_13 label{font-size:.78125rem;color:#666;line-height:1.09375vw}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 .n-button{border-radius:.41666667vw;height:2.1875vw;font-size:.88541667rem;font-weight:600!important;padding:0 1.40625vw}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 .n-button--default-type{background:#E8F4FF;color:#0378ec}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 .n-button--default-type:not(.n-button--disabled):hover{background:#E8F4FF}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 .n-button--default-type .n-button__border{border:1px solid #198CFE}._trainSettings_qodsv_1 ._searchGroup_qodsv_9 .n-input{border-radius:.41666667vw!important}._trainSettings_qodsv_1 ._trainList_qodsv_43{margin-top:1.45833333vw;max-height:50vh;padding:0 2.08333333vw}._trainSettings_qodsv_1 ._trainList_qodsv_43 ._listSection_qodsv_48{min-height:50vh}._trainSettings_qodsv_1 ._trainList_qodsv_43 ._emptySection_qodsv_51{display:flex;align-items:center}._trainSettings_qodsv_1 ._trainList_qodsv_43 .n-scrollbar-content{display:flex;gap:1.25vw;flex-wrap:wrap}._trainSettings_qodsv_1 ._trainList_qodsv_43 .n-spin-container{width:100%}._trainSettings_qodsv_1 ._trainList_qodsv_43 ._list_qodsv_48{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.04166667vw}._trainEditModal_qodsv_69{width:27.29166667vw}._selectMusicModal_qodsv_72{position:relative;width:70.41666667vw}._selectMusicModal_qodsv_72 .n-card-header{position:absolute;top:0;left:0;right:0}._selectMusicModal_qodsv_72 .n-card-header .n-card-header__main{color:#fff}._tableSpace_z26wb_1{gap:.41666667vw .625vw}._tableContainer_z26wb_4{background:#F4F7FD;border-radius:.83333333vw;width:28.54166667vw;height:10.15625vw}._header_z26wb_10{display:flex;align-items:center;justify-content:space-between;padding:.83333333vw 1.04166667vw;font-size:1.04166667rem;color:#131415;line-height:1.45833333vw;border-bottom:1px solid rgba(0,0,0,.05)}._header_z26wb_10 ._time_z26wb_20{font-size:max(1.04166667rem,14Px);color:#131415;line-height:1.45833333vw}._header_z26wb_10 ._ntag_z26wb_25{color:#2089ff;border-radius:.3125vw;font-size:max(.83333333rem,12Px);--n-border: 1px solid #97C7FF;padding:.10416667vw .72916667vw;--n-height: max(1.45833333vw, 24Px) !important}._content_z26wb_33{padding:1.04166667vw;display:flex;align-items:flex-start}._content_z26wb_33 ._navatar_z26wb_38{width:3.125vw;height:3.125vw;border-radius:50%;padding:.10416667vw;border:1px solid #198CFE;margin-right:.78125vw;flex-shrink:0;background-color:#fff!important}._content_z26wb_33 ._navatar_z26wb_38 img{border-radius:50%}._content_z26wb_33 ._userInfo_z26wb_51{padding-top:.20833333vw}._content_z26wb_33 ._userInfo_z26wb_51 h2{font-size:max(1.04166667rem,14Px);font-weight:600;color:#131415;line-height:1.45833333vw}._content_z26wb_33 ._userInfo_z26wb_51 p{font-size:max(.83333333rem,12Px);color:#777;line-height:1.45833333vw}._content_z26wb_33 ._userInfo_z26wb_51 ._subjectName_z26wb_65{font-size:max(.72916667rem,11Px);font-weight:400;color:#fff;background:#198CFE;border-radius:.26041667vw;padding:.10416667vw .41666667vw;margin-right:.20833333vw}._nowmpty_z26wb_74{margin-top:5.20833333vw}\n",document.head.appendChild(a);const we=l({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(e){const a=n(),l=s(),T=r(),D=i({upgradeFlag:0==e.upgradeFlag,searchForm:{keyword:"",gender:"",membership:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],editStatus:!1,activeRow:{}});o((()=>e.upgradeFlag),(()=>{D.upgradeFlag=0==e.upgradeFlag}));const F=()=>{D.pagination.page=1,k(),X({current:D.searchForm,saveKey:"classDetailStudent"})},C=()=>{D.searchForm={keyword:"",gender:"",membership:""},F(),X({current:D.searchForm,saveKey:"classDetailStudent"})},k=async()=>{D.loading=!0;try{const e=await G({classGroupId:l.query.id,...D.searchForm,...D.pagination});D.tableList=e.data.rows,D.pagination.pageTotal=e.data.total,D.loading=!1}catch(e){D.loading=!1,console.log(e)}};Q({current:D.searchForm,saveKey:"classDetailStudent",callBack:e=>{D.searchForm=e}}),d((()=>{k()}));const S=e=>{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("Copy"),document.body.removeChild(t),a.success("复制成功")},I=()=>[{title:"学生姓名",key:"nickname",render:e=>c(w,{showArrow:!1,placement:"top-start"},{trigger:()=>c("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>S(e.nickname)},[e.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:e=>c(w,{showArrow:!1,placement:"top-start"},{trigger:()=>c("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>S(e.phone)},[e.phone]),default:"点击复制"})},{title:"性别",key:"gender",render:e=>c(b,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"vipMember",render:e=>c(b,null,[e.vipMember?"会员":"普通"])},{title:"操作",key:"id",render:e=>c(m,null,{default:()=>[c(v,{text:!0,type:"primary",onClick:()=>(e=>{T.push({path:"/classStudentDetail",query:{...l.query,studentId:e.id,studentName:e.nickname,upgradeFlag:D.upgradeFlag?0:1}})})(e)},{default:()=>[h("详情")]}),c(v,{text:!0,type:"primary",onClick:()=>x(e),disabled:e.historyClassStudent},{default:()=>[h("修改")]})]})}],x=e=>{D.editStatus=!0,D.activeRow=e};return()=>c("div",null,[c("div",{class:t.searchList},[c(u,{"label-placement":"left",inline:!0},{default:()=>[c(p,null,{default:()=>[c(E,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:D.searchForm.keyword,onChangeValue:e=>D.searchForm.keyword=e}),null)]}),c(p,null,{default:()=>[c(B,g({options:[{label:"全部性别",value:""},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:D.searchForm.gender,"onUpdate:value":e=>D.searchForm.gender=e}),null)]}),c(p,null,{default:()=>[c(B,g({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:D.searchForm.membership,"onUpdate:value":e=>D.searchForm.membership=e}),null)]}),c(p,null,{default:()=>[c(m,{justify:"end"},{default:()=>[c(v,{type:"primary",class:"searchBtn",onClick:F},{default:()=>[h("搜索")]}),c(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[h("重置")]})]})]})]})]),c("div",{class:t.tableWrap},[c(_,{class:t.classTable,loading:D.loading,columns:I(),data:D.tableList},{empty:()=>c(P,null,null)}),c(A,{page:D.pagination.page,"onUpdate:page":e=>D.pagination.page=e,pageSize:D.pagination.rows,"onUpdate:pageSize":e=>D.pagination.rows=e,pageTotal:D.pagination.pageTotal,"onUpdate:pageTotal":e=>D.pagination.pageTotal=e,onList:k,sync:!0},null)]),c(y,{maskClosable:f,show:D.editStatus,"onUpdate:show":e=>D.editStatus=e,class:["modalTitle background",t.updateStudent],preset:"card",title:"修改信息"},{default:()=>[c(H,{onClose:()=>D.editStatus=!1,onConfirm:()=>k(),row:D.activeRow},null)]})])}}),be=l({props:{activeRow:{type:Object,default:()=>({id:""})},total:{type:Number,default:0},current:{type:Number,default:0}},name:"classTrainingDetails",emits:["close"],setup(e,{emit:a,expose:l}){const n=T(!1),s=T({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),r=async e=>{n.value=!0;try{const a=await R({trainingId:e}),t=a.data.studentLessonTrainingDetails.map((e=>{const a=((e,a)=>{let t=[];return t="EVALUATION"===e?[`${re[a.evaluateDifficult]}`,a.practiceChapterBegin||a.practiceChapterEnd?`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`:"全部小节",`${a.trainingTimes}分合格`]:[`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`,`速度${a.practiceSpeed}`,`${a.trainingTimes}分钟`],t})(e.trainingType,JSON.parse(e.trainingContent));return{...e,coverImg:e.titleImg,allTimes:JSON.parse(e.trainingContent).trainingTimes,typeList:a||[]}}));s.value={...a.data,studentLessonTrainingDetails:t}}catch(a){console.log(a)}n.value=!1};return l({getTrainingDetail:r}),d((()=>{r(e.activeRow.id)})),()=>c("div",{class:[t.trainingDetails]},[c(D,{show:n.value},{default:()=>[c("div",{class:t.studentList},[c("div",{class:t.studentHeaderWrap},[c("div",{class:t.studentHeader},[c("div",{class:t.studentHeaderBorder},[c(F,{class:t.studentHeaderImg,src:s.value.teacherAvatar?s.value.teacherAvatar:se,previewDisabled:!0},null)])]),c("div",{class:t.workafterInfo},[c("h4",null,[s.value.teacherName," ",c("div",{class:[t.workafterInfoDot,t.workafterTeacherInfoDot]},[h("老师")])]),c("p",null,[h("开始时间:"),s.value.createTime?C(new Date(s.value.createTime)).format("YYYY-MM-DD"):"--"," ",h("| 结束时间:"),s.value.expireDate?C(new Date(s.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),c(ie,{style:"max-height:400px",trigger:"none"},{default:()=>[c("div",{class:t.workList},[s.value.studentLessonTrainingDetails.map((e=>c(te,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:e},null)))])]})]})])}}),Te="_trainSettings_qodsv_1",De="_trainBtnGroup_qodsv_1",Fe="_searchGroup_qodsv_9",Ce="_datetime_qodsv_13",ke="_trainList_qodsv_43",Se="_listSection_qodsv_48",Ie="_emptySection_qodsv_51",xe="_list_qodsv_48",qe="_trainEditModal_qodsv_69",Le="_selectMusicModal_qodsv_72",je=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(e,{emit:a}){const t=n(),l=i({type:"add",btnLoading:!1,loadingStatus:!1,editStatus:!1,editItem:{},selectMusicStatus:!1,trainList:[],currentTime:C(C().format("YYYY-MM-DD")).valueOf(),expireDate:C().add(7,"day").format("YYYY-MM-DD")}),s=(e,a)=>{let t=[];return t="EVALUATION"===e?[`${re[a.evaluateDifficult]}`,a.practiceChapterBegin||a.practiceChapterEnd?`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`:"全部小节",`${a.trainingTimes}分合格`]:[`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`,`速度${a.practiceSpeed}`,`${a.trainingTimes}分钟`],t},r=async()=>{if(l.expireDate)if(l.trainList.length<=0)t.error("训练内容不能为空");else{l.btnLoading=!0;try{const n=l.trainList||[],s=[];n.forEach((e=>{s.push({trainingType:e.trainingType,musicId:e.musicId,trainingConfigJsonObject:e.trainingConfigJson})}));const r={lessonTrainingDetails:s,expireDate:l.expireDate+" 23:59:59",classGroupId:e.classGroupId,courseScheduleId:e.courseScheduleId||null};await ve(r),t.success("布置成功"),a("close"),a("confirm")}catch{}l.btnLoading=!1}else t.error("请选择截止日期")};return d((()=>{e.detailId&&e.subjectId&&(async()=>{l.loadingStatus=!0;try{const{data:a}=await me({coursewareKnowledgeDetailId:e.detailId,subjectId:e.subjectId,page:1,rows:99}),t=a.rows||[],n=[];t.forEach((e=>{const a=s(e.trainingType,e.trainingConfigJson);n.push({typeList:a||[],...e})})),l.trainList=n||[]}catch{}l.loadingStatus=!1})()})),()=>c("div",{class:Te},[c("div",{class:Fe},[c(v,{onClick:()=>{l.selectMusicStatus=!0,l.type="add"}},{default:()=>[h("添加作业")]}),c("div",{class:Ce},[c("label",null,[h("截止时间:")]),c(k,{style:{width:"200px"},placeholder:"请选择截止日期","formatted-value":l.expireDate,"onUpdate:formatted-value":e=>l.expireDate=e,type:"date",valueFormat:"yyyy-MM-dd",isDateDisabled:e=>e<l.currentTime},null)])]),c(ie,{class:ke},{default:()=>[c(D,{show:l.loadingStatus},{default:()=>[c("div",{class:[Se,!l.loadingStatus&&l.trainList.length<=0?Ie:""]},[l.trainList.length>0&&c("div",{class:xe},[l.trainList.map(((e,a)=>c(te,{item:e,type:"homework",onEdit:e=>{const{trainingConfigJson:a,id:t,musicId:n,...s}=e;l.editItem={...s,id:n,trainId:t,...a},console.log(l.editItem),l.type="update",l.editStatus=!0},onDelete:()=>{l.trainList.splice(a,1)}},null)))]),!l.loadingStatus&&l.trainList.length<=0&&c(P,{description:"暂无作业"},null)])]})]}),c(m,{class:De},{default:()=>[c(v,{strong:!0,type:"default",round:!0,onClick:()=>a("close")},{default:()=>[h("取消布置")]}),c(v,{strong:!0,type:"primary",round:!0,disabled:l.trainList.length<=0,onClick:r},{default:()=>[h("立即布置")]})]}),c(y,{maskClosable:f,show:l.editStatus,"onUpdate:show":e=>l.editStatus=e,class:["modalTitle background",qe],preset:"card",title:"作业设置"},{default:()=>[c(le,{item:l.editItem,type:"homework",onClose:()=>l.editStatus=!1,onConfirm:e=>{console.log(e,"update",l);const a=s(e.trainingType,e.trainingConfigJson);"update"===l.type?l.trainList.forEach((t=>{t.id===e.id&&(t.trainingType=e.trainingType,t.trainingConfigJson=e.trainingConfigJson,t.typeList=a)})):l.trainList.push({...e,id:+new Date,musicName:l.editItem.title,typeList:a}),l.editItem={}}},null)]}),c(y,{maskClosable:f,show:l.selectMusicStatus,"onUpdate:show":e=>l.selectMusicStatus=e,class:["modalTitle",Le],preset:"card",title:"选择曲目"},{default:()=>[c(ne,{type:"homework",onAdd:a=>{l.selectMusicStatus=!1,(async a=>{let t="init",n=null;try{const e=await S.get(a.xmlFileUrl,{mode:"cors"}),l=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("part");n=l[0]?.getElementsByTagName("measure"),t="success"}catch(s){t="error"}a.practiceChapterMax="success"==t?n.length:0,a.coursewareKnowledgeDetailId=e.detailId,a.subjectId=e.subjectId,l.editItem=a,l.editStatus=!0})(a)}},null)]})])}}),ze=l({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(e){const a=r(),l=s(),n=i({upgradeFlag:0==e.upgradeFlag,searchForm:{status:"",timer:[oe((new Date).getTime()),de((new Date).getTime())]},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1});o((()=>e.upgradeFlag),(()=>{n.upgradeFlag=0==e.upgradeFlag}));const w=()=>{n.pagination.page=1,D(),X({current:n.searchForm,saveKey:"classDetailAfterWork"})},T=()=>{n.searchForm={status:"",timer:[oe((new Date).getTime()),de((new Date).getTime())]},w(),X({current:n.searchForm,saveKey:"classDetailAfterWork"})};Q({current:n.searchForm,saveKey:"classDetailAfterWork",callBack:e=>{n.searchForm=e}});const D=async()=>{n.loading=!0;try{const{timer:e,...a}=n.searchForm,t=await W({classGroupId:l.query.id,...a,...n.pagination,...ce(e,["startTime","endTime"],"YYYY-MM-DD")});n.tableList=t.data.rows,n.pagination.pageTotal=t.data.total,n.loading=!1}catch(e){n.loading=!1,console.log(e)}};d((()=>{D()}));const F=e=>{a.push({path:"/afterWorkDetail",query:{...l.query,classGroupId:l.query.id,teacherName:e.teacherName,trainingId:e.id}})};return()=>c("div",null,[c("div",{class:t.searchList},[c(u,{"label-placement":"left",inline:!0},{default:()=>[c(p,null,{default:()=>[c(ae,{value:n.searchForm.timer,"onUpdate:value":e=>n.searchForm.timer=e,separator:"至",type:"daterange",timerValue:n.searchForm.timer},null)]}),c(p,null,{default:()=>[c(B,g({options:[{label:"全部状态",value:""},{label:"已结束",value:1},{label:"进行中",value:0}],placeholder:"作业状态",clearable:!0,inline:!0},{value:n.searchForm.status,"onUpdate:value":e=>n.searchForm.status=e}),null)]}),c(p,null,{default:()=>[c(m,{justify:"end"},{default:()=>[c(v,{type:"primary",class:"searchBtn",onClick:w},{default:()=>[h("搜索")]}),c(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:T},{default:()=>[h("重置")]})]})]})]})]),c("div",{class:t.tableWrap},[c(_,{class:t.classTable,loading:n.loading,columns:[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render:e=>c(b,null,[e.createTime])},{title:"截止时间",key:"expireDate",render:e=>c(b,null,[e.expireDate])},{title:"作业状态",key:"status",render:e=>e.status?c("div",{class:t.endDot},[c("span",null,null),h("已结束")]):c("div",{class:t.indDot},[c("span",null,null),h(" 进行中")])},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"合格人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render:e=>c(b,null,[e.trainingRate,h("%")])},{title:"合格率",key:"qualifiedRate",render:e=>c(b,null,[e.qualifiedRate,h("%")])},{title:"操作",key:"id",render:e=>c(m,null,{default:()=>[c(v,{text:!0,type:"primary",onClick:()=>F(e)},{default:()=>[h("详情")]})]})}],data:n.tableList},{empty:()=>c(P,null,null)}),c(A,{page:n.pagination.page,"onUpdate:page":e=>n.pagination.page=e,pageSize:n.pagination.rows,"onUpdate:pageSize":e=>n.pagination.rows=e,pageTotal:n.pagination.pageTotal,"onUpdate:pageTotal":e=>n.pagination.pageTotal=e,onList:D,sync:!0},null)]),c(y,{maskClosable:f,show:n.addWorkVisible,"onUpdate:show":e=>n.addWorkVisible=e,preset:"card",class:[t.attendClassModal,t.trainClassModal],title:"作业设置"},{default:()=>[c(je,{classGroupId:l.query.id,onClose:()=>{D(),n.addWorkVisible=!1}},null)]}),c(y,{maskClosable:f,show:n.detailVisiable,"onUpdate:show":e=>n.detailVisiable=e,preset:"card",class:["modalTitle background",t.wordDetailModel],title:"作业详情"},{default:()=>[c(be,{onClose:()=>n.detailVisiable=!1,activeRow:n.activeRow},null)]})])}}),Me={tableSpace:"_tableSpace_z26wb_1",tableContainer:"_tableContainer_z26wb_4",header:"_header_z26wb_10",time:"_time_z26wb_20",ntag:"_ntag_z26wb_25",content:"_content_z26wb_33",navatar:"_navatar_z26wb_38",userInfo:"_userInfo_z26wb_51",subjectName:"_subjectName_z26wb_65",nowmpty:"_nowmpty_z26wb_74"},Ne=l({name:"class-record",setup(){const e=I(),a=s(),t=()=>{const e=a.query.gradeYear;if(e){const a=`${e}-9-1`,t=`${Number(e)+1}-8-31`;return[C(a).valueOf(),C(t).valueOf()]}{const e=C().format("YYYY-MM-DD");return[C(e).subtract(1,"month").valueOf(),C(e).valueOf()]}},l=i({searchForm:{teacherId:"",createTimer:t()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),n=()=>{l.pagination.page=1,o(),X({current:l.searchForm,saveKey:"classDetailRecord"})},r=()=>{l.searchForm={teacherId:"",createTimer:t()},n(),X({current:l.searchForm,saveKey:"classDetailRecord"})};Q({current:l.searchForm,saveKey:"classDetailRecord",callBack:e=>{l.searchForm=e}});const o=async()=>{l.loading=!0;try{const{data:e}=await K({classGroupId:a.query.id,teacherId:l.searchForm.teacherId,...j(l.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...l.pagination}),t=e.rows||[];t.forEach((e=>{e.lessonCourseware=e.lessonCoursewareJson?JSON.parse(e.lessonCoursewareJson):{}})),l.tableList=t,l.pagination.pageTotal=e.total,l.loading=!1}catch(e){l.loading=!1}};return d((()=>{(async()=>{try{const{data:a}=await he({schoolId:e.info.schoolInfos?.[0]?.id,page:1,rows:1e3}),t=a.rows||[],n=[];t.forEach((e=>{n.push({label:e.nickname,value:e.id})})),l.teacherList=n}catch{}})(),o()})),()=>{let e;return c("div",null,[c("div",{class:Me.searchList},[c(u,{"label-placement":"left",inline:!0},{default:()=>[c(p,null,{default:()=>[c(B,g({options:[{label:"全部老师",value:""},...l.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:l.searchForm.teacherId,"onUpdate:value":e=>l.searchForm.teacherId=e}),null)]}),c(p,null,{default:()=>[c(ae,{value:l.searchForm.createTimer,"onUpdate:value":e=>l.searchForm.createTimer=e,timerValue:l.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),c(p,null,{default:()=>[c(m,{justify:"end"},{default:()=>[c(v,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[h("搜索")]}),c(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:r},{default:()=>[h("重置")]})]})]})]})]),c("div",{class:Me.tableWrap},[c(m,{class:Me.tableSpace},(t=e=l.tableList.map((e=>c("div",{class:Me.tableContainer},[c("div",{class:Me.header},[c("div",{class:Me.time},[C(e.startTime).format("YYYY-MM-DD HH:mm")]),a.query.name&&c(x,{type:"primary",class:Me.ntag,strong:!0},{default:()=>[a.query.name]})]),c("div",{class:Me.content},[c(q,{class:Me.navatar,round:!0,src:e.teacherAvatar||se},null),c("div",{class:Me.userInfo},[c("h2",null,[e.teacherName]),c("p",null,[e.subjectName&&c("span",{class:Me.subjectName},[e.subjectName]),e.lessonCourseware.lessonCoursewareName,h(" |")," ",e.lessonCourseware.lessonCoursewareDetailName,h("|")," ",e.lessonCourseware.lessonCoursewareKnowledgeDetailName,h("| "),e.useChapterLessonCoursewareName])])])]))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)?e:{default:()=>[e]})),l.tableList.length>0&&c(A,{page:l.pagination.page,"onUpdate:page":e=>l.pagination.page=e,pageSize:l.pagination.rows,"onUpdate:pageSize":e=>l.pagination.rows=e,pageTotal:l.pagination.pageTotal,"onUpdate:pageTotal":e=>l.pagination.pageTotal=e,onList:o,pageSizes:[12,24,36,48],sync:!0,saveKey:"classRecord-key"},null),l.tableList.length<=0&&c(P,{class:Me.nowEmpty},null)])]);var t}}}),Ue=l({name:"student-studentList",setup(e,{emit:a}){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}),n=s(),o=r(),y=()=>{l.pagination.page=1,C(),F(),X({current:{...l.searchForm,timer:f.value},saveKey:"classDetailTestRecord"})},f=T([oe((new Date).getTime()),de((new Date).getTime())]),D=()=>{f.value=[oe((new Date).getTime()),de((new Date).getTime())],l.searchForm={ase:0,sortType:1,keyword:"",trainingStatus:null,vipFlag:""},y(),X({current:{...l.searchForm,timer:f.value},saveKey:"classDetailTestRecord"})};Q({current:{...l.searchForm,timer:f.value},saveKey:"classDetailTestRecord",callBack:e=>{l.searchForm=e,f.value=e.timer}});const F=async()=>{l.loading=!0;try{const e=await $({classGroupId:n.query.id,...l.searchForm,...l.pagination,...ce(f.value,["startTime","endTime"],"YYYY-MM-DD")});l.tableList=e.data.rows,l.pagination.pageTotal=e.data.total,l.loading=!1}catch(e){l.loading=!1,console.log(e)}},C=async()=>{try{const e=await V({classGroupId:n.query.id,...ce(f.value,["startTime","endTime"],"YYYY-MM-DD")});l.testInfo.practiceDurationAvg=e.data.practiceDurationAvg,l.testInfo.practiceUserCount=e.data.practiceUserCount,l.testInfo.vipUserCount=e.data.vipUserCount}catch(e){console.log(e)}};d((()=>{C(),F()}));const k=i({title:()=>c(w,{showArrow:!1,placement:"top-start"},{trigger:()=>c("div",{class:t.cell},[h("练习天数"),c("img",{class:t.sortIcon,src:"descend"===k.sortOrder?_e:"ascend"===k.sortOrder?ye:fe},null)]),default:"descend"===k.sortOrder?"点击升序":"ascend"===k.sortOrder?"取消排序":"点击降序"}),key:"practiceDays",sorter:!0,sortOrder:!1,render:e=>c(b,null,[e.practiceDays?e.practiceDays:0,h("天")])}),S=i({title:()=>c(w,{showArrow:!1,placement:"top-start"},{trigger:()=>c("div",{class:t.cell},[h("学练时长"),c("img",{class:t.sortIcon,src:"descend"===S.sortOrder?_e:"ascend"===S.sortOrder?ye:fe},null)]),default:"descend"===S.sortOrder?"点击升序":"ascend"===S.sortOrder?"取消排序":"点击降序"}),key:"practiceDuration",sorter:!0,sortOrder:!1,render:e=>c(b,null,[e.practiceDuration?ue(e.practiceDuration)>0?ue(e.practiceDuration)+"分"+pe(e.practiceDuration)+"秒":pe(e.practiceDuration)+"秒":"0秒"])}),I=()=>[{title:"学生姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},{title:"性别",key:"sex",render:e=>c(b,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"studentType",render:e=>c(b,null,[e.vipFlag?"会员":"普通"])},k,S,{title:"操作",key:"id",render:e=>c(v,{text:!0,type:"primary",onClick:()=>{(e=>{o.push({path:"/classStudentRecode",query:{...n.query,studentId:e.studentId,studentName:e.studentName}})})(e)}},{default:()=>[h("详情")]})}],x=e=>{if(e){const a={practiceDuration:1,practiceDays:2};l.searchForm.sortType=a[e.columnKey],"practiceDuration"==e.columnKey&&(S.sortOrder=e.order,k.sortOrder=!1),"practiceDays"==e.columnKey&&(k.sortOrder=e.order,S.sortOrder=!1),l.searchForm.ase="ascend"==e.order?1:0}else l.searchForm.ase=0,l.searchForm.sortType=1,k.sortOrder=!1,S.sortOrder=!1;F()};return()=>c("div",null,[c("div",{class:t.searchList},[c(u,{"label-placement":"left",inline:!0},{default:()=>[c(p,null,{default:()=>[c(E,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:l.searchForm.keyword,onChangeValue:e=>l.searchForm.keyword=e}),null)]}),c(p,null,{default:()=>[c(B,g({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:l.searchForm.vipFlag,"onUpdate:value":e=>l.searchForm.vipFlag=e}),null)]}),c(p,null,{default:()=>[c(ae,{value:f.value,"onUpdate:value":e=>f.value=e,separator:"至",type:"daterange",timerValue:f.value},null)]}),c(p,null,{default:()=>[c(m,{justify:"end"},{default:()=>[c(v,{type:"primary",class:"searchBtn",onClick:y},{default:()=>[h("搜索")]}),c(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:D},{default:()=>[h("重置")]})]})]})]})]),c("div",{class:["section-container"]},[c(z,{"x-gap":"12",cols:8},{default:()=>[c(M,null,{default:()=>[c("div",{class:t.TrainDataItem},[c("div",null,[c("p",{class:t.TrainDataItemTitle},[c("div",null,[c("span",null,[c(ge,{from:0,to:l.testInfo.practiceUserCount},null)])," ",h("人")])])]),c("p",{class:t.TrainDataItemsubTitle},[h("练习人数")])])]}),c(M,null,{default:()=>[c("div",{class:t.TrainDataItem},[c("p",{class:t.TrainDataItemTitle},[c("div",null,[c("span",null,[c(ge,{from:0,to:l.testInfo.vipUserCount},null)])," ",h("人")])]),c("p",{class:t.TrainDataItemsubTitle},[h("会员人数")])])]}),c(M,null,{default:()=>[c("div",{class:t.TrainDataItem},[c("p",{class:t.TrainDataItemTitle},[ue(l.testInfo.practiceDurationAvg)>0?c("div",null,[c("span",null,[c(ge,{from:0,to:ue(l.testInfo.practiceDurationAvg)},null)])," ",h("分")]):null,c("div",null,[c("span",null,[c(ge,{from:0,to:pe(l.testInfo.practiceDurationAvg)},null)])," ",h("秒")])]),c("p",{class:t.TrainDataItemsubTitle},[h("平均每天练习时长")])])]})]})]),c("div",{class:[t.tableWrap,t.noSort]},[c(_,{class:t.classTable,loading:l.loading,columns:I(),data:l.tableList,"onUpdate:sorter":x},{empty:()=>c(P,null,null)}),c(A,{page:l.pagination.page,"onUpdate:page":e=>l.pagination.page=e,pageSize:l.pagination.rows,"onUpdate:pageSize":e=>l.pagination.rows=e,pageTotal:l.pagination.pageTotal,"onUpdate:pageTotal":e=>l.pagination.pageTotal=e,onList:F,sync:!0},null)])])}});e("default",l({name:"base-setting",setup(){const e=sessionStorage.getItem("classDetailTabs"),a=T(e||"student");sessionStorage.removeItem("classDetailTabs");const l=s(),n=T([{name:"班级管理",path:"/classList"},{name:l.query.name,path:"/classDetail"}]);Z((e=>{e.form.tabName&&(a.value=e.form.tabName)}));const r=T();return(async()=>{try{const e=l.query.id,{data:a}=await J({id:e});r.value=a.upgradeFlag?1:0}catch{}})(),d((()=>{e&&(a.value=e)})),N((()=>{const e=sessionStorage.getItem("classDetailTabs");e&&(a.value=e)})),()=>c("div",null,[c(O,{list:n.value},null),c("div",{class:[t.listWrap,t.infoListWrap]},[c(U,{class:t.customTabs,value:a.value,"onUpdate:value":[e=>a.value=e,e=>(e=>{ee(e,"tabName",l)})(e)],size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[c(Y,{name:"student",tab:"学员名单"},{default:()=>[c(we,{upgradeFlag:r.value},null)]}),c(Y,{name:"afterWork",tab:"课后作业"},{default:()=>[c(ze,{upgradeFlag:r.value},null)]}),c(Y,{name:"practice",tab:"练习记录"},{default:()=>[c(Ue,null,null)]}),c(Y,{name:"attendclass",tab:"上课记录"},{default:()=>[c(Ne,null,null)]})]})])])}}))}}}));