classDetail-legacy-69bfe5b2-1708220053196.js 28 KB

1
  1. System.register(["./index.module-legacy-49c63b78-1708220053196.js","./index-legacy-2f7e396d-1708220053196.js","./index-legacy-20022b30-1708220053196.js","./index-legacy-b2e85ed5-1708220053196.js","./index-legacy-9daf4bed-1708220053196.js","./index-legacy-63a8ba26-1708220053196.js","./api-legacy-57cc81fd-1708220053196.js","./index-legacy-67c9779c-1708220053196.js","./index-legacy-231a22f7-1708220053196.js","./use-async-legacy-8d45d672-1708220053196.js","./index-legacy-ba4f1c65-1708220053196.js","./index-legacy-aed204d6-1708220053196.js","./teacherIcon-legacy-3eeb62c3-1708220053196.js","./index-legacy-fb5d35d5-1708220053196.js","./dateFormat-legacy-76dc4c53-1708220053196.js","./index-legacy-09218b47-1708220053196.js","./api-legacy-541880ce-1708220053196.js","./NumberAnimation-legacy-ead05e2f-1708220053196.js","./api-legacy-381e138c-1708220053196.js","./contants-legacy-7370e0da-1708220053196.js","./urlUtils-legacy-6df7f30c-1708220053196.js","./Slider-legacy-c48b949a-1708220053196.js","./isCollaose-legacy-86271af3-1708220053196.js","./icon-collect-active-legacy-b7c75e66-1708220053196.js","./index-legacy-2f3ca4fb-1708220053196.js","./index-legacy-a4a65e2a-1708220053196.js","./catchData-legacy-6bcf87eb-1708220053196.js","./index-legacy-1d98fb36-1708220053196.js","./index-legacy-3af43a4c-1708220053196.js"],(function(e,a){"use strict";var t,l,n,i,r,s,o,c,d,u,p,g,m,h,_,y,v,b,f,w,T,D,F,j,k,C,I,S,x,L,M,N,U,Y,E,B,R,A,G,W,q,z,$,K,O,V,J,P,H,Q,X,Z,ee,ae,te,le,ne,ie,re,se,oe,ce,de,ue,pe,ge,me;return{setters:[e=>{t=e.s},e=>{l=e.d,n=e.b,i=e.a,r=e.u,s=e.e,o=e.y,c=e.p,d=e.f,u=e.N,p=e.g,g=e.x,m=e.w,h=e.j,_=e.k,y=e.$,v=e.l,b=e.R,f=e.F,w=e.r,T=e.A,D=e.v,F=e.K,j=e.a5,k=e.a6,C=e.c,I=e.a7,S=e.a8,x=e.a3,L=e.G,M=e.a9,N=e.aa,U=e.q,Y=e.t},e=>{E=e.C},e=>{B=e.S},e=>{R=e.C},e=>{A=e.P},e=>{G=e.h,W=e.i,q=e.j,z=e.k,$=e.l,K=e.m,O=e.n},e=>{V=e.T},e=>{J=e.U},e=>{P=e.i,H=e.s,Q=e.g,X=e.a},e=>{Z=e.C},e=>{ee=e.T},e=>{ae=e.d},e=>{te=e.N,le=e.k,ne=e.m,ie=e.n},e=>{re=e.g,se=e.a,oe=e.b,ce=e.c,de=e.d},e=>{ue=e.T,pe=e.S},e=>{ge=e.a},e=>{me=e.N},null,null,null,null,null,null,null,null,null,null,null],execute:function(){var a=document.createElement("style");a.textContent="._trainSettings_htbat_1 ._trainBtnGroup_htbat_1{padding:1.66666667vw 0 2.08333333vw;justify-content:center!important}._trainSettings_htbat_1 ._trainBtnGroup_htbat_1 .n-button{height:2.5vw!important;padding:0 2.1875vw}._trainSettings_htbat_1 ._searchGroup_htbat_9{display:flex;padding:1.35416667vw 2.08333333vw 0}._trainSettings_htbat_1 ._searchGroup_htbat_9 ._datetime_htbat_13{margin-left:2.08333333vw;display:inline-flex;align-items:center}._trainSettings_htbat_1 ._searchGroup_htbat_9 ._datetime_htbat_13 label{font-size:.78125rem;color:#666;line-height:1.09375vw}._trainSettings_htbat_1 ._searchGroup_htbat_9 .n-button{border-radius:.41666667vw;height:2.1875vw;font-size:.88541667rem;font-weight:600!important;padding:0 1.40625vw}._trainSettings_htbat_1 ._searchGroup_htbat_9 .n-button--default-type{background:#E8F4FF;color:#0378ec}._trainSettings_htbat_1 ._searchGroup_htbat_9 .n-button--default-type:not(.n-button--disabled):hover{background:#E8F4FF}._trainSettings_htbat_1 ._searchGroup_htbat_9 .n-button--default-type .n-button__border{border:1px solid #198CFE}._trainSettings_htbat_1 ._searchGroup_htbat_9 .n-input{border-radius:.41666667vw!important}._trainSettings_htbat_1 ._trainList_htbat_43{margin-top:1.45833333vw;max-height:50vh;padding:0 2.08333333vw}._trainSettings_htbat_1 ._trainList_htbat_43 ._listSection_htbat_48{min-height:50vh}._trainSettings_htbat_1 ._trainList_htbat_43 ._emptySection_htbat_51{display:flex;align-items:center}._trainSettings_htbat_1 ._trainList_htbat_43 .n-scrollbar-content{display:flex;gap:1.25vw;flex-wrap:wrap}._trainSettings_htbat_1 ._trainList_htbat_43 .n-spin-container{width:100%}._trainSettings_htbat_1 ._trainList_htbat_43 ._list_htbat_48{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.04166667vw}._trainEditModal_htbat_69{width:25.72916667vw}._selectMusicModal_htbat_72{position:relative;width:70.41666667vw}._selectMusicModal_htbat_72 .n-card-header{position:absolute;top:0;left:0;right:0}._selectMusicModal_htbat_72 .n-card-header .n-card-header__main{color:#fff}._tableSpace_18j6c_1{gap:.41666667vw .625vw}._tableContainer_18j6c_4{background:#F7F9FF;border-radius:.83333333vw;width:28.54166667vw;height:10.15625vw}._header_18j6c_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_18j6c_10 ._time_18j6c_20{font-size:max(1.04166667rem,14Px);color:#131415;line-height:1.45833333vw}._header_18j6c_10 ._ntag_18j6c_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_18j6c_33{padding:1.04166667vw;display:flex;align-items:flex-start}._content_18j6c_33 ._navatar_18j6c_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_18j6c_33 ._navatar_18j6c_38 img{border-radius:50%}._content_18j6c_33 ._userInfo_18j6c_51{padding-top:.20833333vw}._content_18j6c_33 ._userInfo_18j6c_51 h2{font-size:max(1.04166667rem,14Px);font-weight:600;color:#131415;line-height:1.45833333vw}._content_18j6c_33 ._userInfo_18j6c_51 p{font-size:max(.83333333rem,12Px);color:#777;line-height:1.45833333vw}._content_18j6c_33 ._userInfo_18j6c_51 ._subjectName_18j6c_65{font-size:max(.72916667rem,11Px);font-weight:400;color:#fff;background:#198CFE;border-radius:.26041667vw;padding:.10416667vw .41666667vw;margin-right:.20833333vw}._nowEmpty_18j6c_74{margin-top:5.20833333vw}\n",document.head.appendChild(a);const he=l({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(e){const a=n(),l=i(),w=r(),T=s({upgradeFlag:0==e.upgradeFlag,searchForm:{keyword:"",gender:"",membership:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],editStatus:!1,activeRow:{}});o((()=>e.upgradeFlag),(()=>{T.upgradeFlag=0==e.upgradeFlag}));const D=()=>{T.pagination.page=1,j(),H({current:T.searchForm,saveKey:"classDetailStudent"})},F=()=>{T.searchForm={keyword:"",gender:"",membership:""},D(),H({current:T.searchForm,saveKey:"classDetailStudent"})},j=async()=>{T.loading=!0;try{const e=await G({classGroupId:l.query.id,...T.searchForm,...T.pagination});T.tableList=e.data.rows,T.pagination.pageTotal=e.data.total,T.loading=!1}catch(e){T.loading=!1,console.log(e)}};P({current:T.searchForm,saveKey:"classDetailStudent",callBack:e=>{T.searchForm=e}}),c((()=>{j()}));const k=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("复制成功")},C=()=>[{title:"学生姓名",key:"nickname",render:e=>d(b,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>k(e.nickname)},[e.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:e=>d(b,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>k(e.phone)},[e.phone]),default:"点击复制"})},{title:"性别",key:"gender",render:e=>d(f,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"vipMember",render:e=>d(f,null,[e.vipMember?"会员":"普通"])},{title:"操作",key:"id",render:e=>d(m,null,{default:()=>[d(h,{text:!0,type:"primary",onClick:()=>(e=>{w.push({path:"/classStudentDetail",query:{...l.query,studentId:e.id,studentName:e.nickname,upgradeFlag:T.upgradeFlag?0:1}})})(e)},{default:()=>[_("详情")]}),d(h,{text:!0,type:"primary",onClick:()=>I(e)},{default:()=>[_("修改")]})]})}],I=e=>{T.editStatus=!0,T.activeRow=e};return()=>d("div",null,[d("div",{class:t.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(B,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:T.searchForm.keyword,onChangeValue:e=>T.searchForm.keyword=e}),null)]}),d(p,null,{default:()=>[d(R,g({options:[{label:"全部性别",value:""},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:T.searchForm.gender,"onUpdate:value":e=>T.searchForm.gender=e}),null)]}),d(p,null,{default:()=>[d(R,g({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:T.searchForm.membership,"onUpdate:value":e=>T.searchForm.membership=e}),null)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:D},{default:()=>[_("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:F},{default:()=>[_("重置")]})]})]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:T.loading,columns:C(),data:T.tableList},{empty:()=>d(V,null,null)}),d(A,{page:T.pagination.page,"onUpdate:page":e=>T.pagination.page=e,pageSize:T.pagination.rows,"onUpdate:pageSize":e=>T.pagination.rows=e,pageTotal:T.pagination.pageTotal,"onUpdate:pageTotal":e=>T.pagination.pageTotal=e,onList:j,sync:!0},null)]),d(v,{show:T.editStatus,"onUpdate:show":e=>T.editStatus=e,class:["modalTitle background",t.updateStudent],preset:"card",title:"修改信息"},{default:()=>[d(J,{onClose:()=>T.editStatus=!1,onConfirm:()=>j(),row:T.activeRow},null)]})])}}),_e=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=w(!1),i=w({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),r=async e=>{n.value=!0;try{const a=await W({trainingId:e}),t=a.data.studentLessonTrainingDetails.map((e=>{const a=((e,a)=>{let t=[];return t="EVALUATION"===e?[`${le[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||[]}}));i.value={...a.data,studentLessonTrainingDetails:t}}catch(a){console.log(a)}n.value=!1};return l({getTrainingDetail:r}),c((()=>{r(e.activeRow.id)})),()=>d("div",{class:[t.trainingDetails]},[d(T,{show:n.value},{default:()=>[d("div",{class:t.studentList},[d("div",{class:t.studentHeaderWrap},[d("div",{class:t.studentHeader},[d("div",{class:t.studentHeaderBorder},[d(D,{class:t.studentHeaderImg,src:i.value.teacherAvatar?i.value.teacherAvatar:ae,previewDisabled:!0},null)])]),d("div",{class:t.workafterInfo},[d("h4",null,[i.value.teacherName," ",d("div",{class:[t.workafterInfoDot,t.workafterTeacherInfoDot]},[_("老师")])]),d("p",null,[_("开始时间:"),i.value.createTime?F(new Date(i.value.createTime)).format("YYYY-MM-DD"):"--"," ",_("| 结束时间:"),i.value.expireDate?F(new Date(i.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),d(te,{style:"max-height:400px",trigger:"none"},{default:()=>[d("div",{class:t.workList},[i.value.studentLessonTrainingDetails.map((e=>d(ee,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isCLassWork:!0,item:e},null)))])]})]})])}}),ye="_trainSettings_htbat_1",ve="_trainBtnGroup_htbat_1",be="_searchGroup_htbat_9",fe="_datetime_htbat_13",we="_trainList_htbat_43",Te="_listSection_htbat_48",De="_emptySection_htbat_51",Fe="_list_htbat_48",je="_trainEditModal_htbat_69",ke="_selectMusicModal_htbat_72",Ce=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=s({type:"add",btnLoading:!1,loadingStatus:!1,editStatus:!1,editItem:{},selectMusicStatus:!1,trainList:[],currentTime:F(F().format("YYYY-MM-DD")).valueOf(),expireDate:F().add(7,"day").format("YYYY-MM-DD")}),i=(e,a)=>{let t=[];return t="EVALUATION"===e?[`${le[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||[],i=[];n.forEach((e=>{i.push({trainingType:e.trainingType,musicId:e.musicId,trainingConfigJsonObject:e.trainingConfigJson})}));const r={lessonTrainingDetails:i,expireDate:l.expireDate+" 23:59:59",classGroupId:e.classGroupId,courseScheduleId:e.courseScheduleId||null};await ie(r),t.success("布置成功"),a("close"),a("confirm")}catch{}l.btnLoading=!1}else t.error("请选择截止日期")};return c((()=>{e.detailId&&e.subjectId&&(async()=>{l.loadingStatus=!0;try{const{data:a}=await ne({coursewareKnowledgeDetailId:e.detailId,subjectId:e.subjectId,page:1,rows:99}),t=a.rows||[],n=[];t.forEach((e=>{const a=i(e.trainingType,e.trainingConfigJson);n.push({typeList:a||[],...e})})),l.trainList=n||[]}catch{}l.loadingStatus=!1})()})),()=>d("div",{class:ye},[d("div",{class:be},[d(h,{onClick:()=>{l.selectMusicStatus=!0,l.type="add"}},{default:()=>[_("添加作业")]}),d("div",{class:fe},[d("label",null,[_("截止时间:")]),d(j,{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)])]),d(te,{class:we},{default:()=>[d(T,{show:l.loadingStatus},{default:()=>[d("div",{class:[Te,!l.loadingStatus&&l.trainList.length<=0?De:""]},[l.trainList.length>0&&d("div",{class:Fe},[l.trainList.map(((e,a)=>d(ee,{item:e,type:"homework",onEdit:e=>{const{trainingConfigJson:a,id:t,musicId:n,...i}=e;l.editItem={...i,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&&d(V,{description:"暂无作业"},null)])]})]}),d(m,{class:ve},{default:()=>[d(h,{strong:!0,type:"default",round:!0,onClick:()=>a("close")},{default:()=>[_("取消布置")]}),d(h,{strong:!0,type:"primary",round:!0,disabled:l.trainList.length<=0,onClick:r},{default:()=>[_("立即布置")]})]}),d(v,{show:l.editStatus,"onUpdate:show":e=>l.editStatus=e,class:["modalTitle background",je],preset:"card",title:"作业设置"},{default:()=>[d(ue,{item:l.editItem,type:"homework",onClose:()=>l.editStatus=!1,onConfirm:e=>{console.log(e,"update",l);const a=i(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)]}),d(v,{show:l.selectMusicStatus,"onUpdate:show":e=>l.selectMusicStatus=e,class:["modalTitle",ke],preset:"card",title:"选择曲目"},{default:()=>[d(pe,{type:"homework",onAdd:a=>{l.selectMusicStatus=!1,(async a=>{let t="init",n=null;try{const e=await k.get(a.xmlFileUrl,{mode:"cors"}),l=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("part");n=l[0]?.getElementsByTagName("measure"),t="success"}catch(i){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)]})])}}),Ie=l({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(e){const a=r(),l=i(),n=s({upgradeFlag:0==e.upgradeFlag,searchForm:{status:"",timer:[re((new Date).getTime()),se((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 b=()=>{n.pagination.page=1,T(),H({current:n.searchForm,saveKey:"classDetailAfterWork"})},w=()=>{n.searchForm={status:"",timer:[re((new Date).getTime()),se((new Date).getTime())]},b(),H({current:n.searchForm,saveKey:"classDetailAfterWork"})};P({current:n.searchForm,saveKey:"classDetailAfterWork",callBack:e=>{n.searchForm=e}});const T=async()=>{n.loading=!0;try{const{timer:e,...a}=n.searchForm,t=await q({classGroupId:l.query.id,...a,...n.pagination,...oe(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)}};c((()=>{T()}));const D=e=>{console.log(e),a.push({path:"/afterWorkDetail",query:{...l.query,teacherName:e.teacherName,trainingId:e.id}})},F=e=>{n.activeRow=e,n.detailVisiable=!0};return()=>d("div",null,[d("div",{class:t.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(Z,{value:n.searchForm.timer,"onUpdate:value":e=>n.searchForm.timer=e,separator:"至",type:"daterange",timerValue:n.searchForm.timer},null)]}),d(p,null,{default:()=>[d(R,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)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:b},{default:()=>[_("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:w},{default:()=>[_("重置")]})]})]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:n.loading,columns:[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render:e=>d(f,null,[e.createTime])},{title:"截止时间",key:"expireDate",render:e=>d(f,null,[e.expireDate])},{title:"作业状态",key:"status",render:e=>0==e.status?d("div",{class:t.indDot},[" ",d("span",null,null),_(" 进行中")]):d("div",{class:t.endDot},[d("span",null,null),_("已结束")])},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"合格人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render:e=>d(f,null,[e.trainingRate,_("%")])},{title:"合格率",key:"qualifiedRate",render:e=>d(f,null,[e.qualifiedRate,_("%")])},{title:"操作",key:"id",render:e=>d(m,null,{default:()=>[d(h,{text:!0,type:"primary",onClick:()=>D(e)},{default:()=>[_("详情")]}),d(h,{text:!0,type:"primary",onClick:()=>F(e)},{default:()=>[_("作业详情")]})]})}],data:n.tableList},{empty:()=>d(V,null,null)}),d(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:T,sync:!0},null)]),d(v,{show:n.addWorkVisible,"onUpdate:show":e=>n.addWorkVisible=e,preset:"card",class:[t.attendClassModal,t.trainClassModal],title:"作业设置"},{default:()=>[d(Ce,{classGroupId:l.query.id,onClose:()=>{T(),n.addWorkVisible=!1}},null)]}),d(v,{show:n.detailVisiable,"onUpdate:show":e=>n.detailVisiable=e,preset:"card",class:["modalTitle background",t.wordDetailModel],title:"作业详情"},{default:()=>[d(_e,{onClose:()=>n.detailVisiable=!1,activeRow:n.activeRow},null)]})])}}),Se={tableSpace:"_tableSpace_18j6c_1",tableContainer:"_tableContainer_18j6c_4",header:"_header_18j6c_10",time:"_time_18j6c_20",ntag:"_ntag_18j6c_25",content:"_content_18j6c_33",navatar:"_navatar_18j6c_38",userInfo:"_userInfo_18j6c_51",subjectName:"_subjectName_18j6c_65",nowEmpty:"_nowEmpty_18j6c_74"},xe=l({name:"class-record",setup(){const e=C(),a=i(),t=()=>{const e=a.query.gradeYear;if(e){const a=`${e}-9-1`,t=`${Number(e)+1}-8-31`;return[F(a).valueOf(),F(t).valueOf()]}{const e=F().format("YYYY-MM-DD");return[F(e).subtract(1,"month").valueOf(),F(e).valueOf()]}},l=s({searchForm:{teacherId:"",createTimer:t()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),n=()=>{l.pagination.page=1,o(),H({current:l.searchForm,saveKey:"classDetailRecord"})},r=()=>{l.searchForm={teacherId:"",createTimer:t()},n(),H({current:l.searchForm,saveKey:"classDetailRecord"})};P({current:l.searchForm,saveKey:"classDetailRecord",callBack:e=>{l.searchForm=e}});const o=async()=>{l.loading=!0;try{const{data:e}=await z({classGroupId:a.query.id,teacherId:l.searchForm.teacherId,...L(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 c((()=>{(async()=>{try{const{data:a}=await ge({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 d("div",null,[d("div",{class:Se.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(R,g({options:[{label:"全部老师",value:""},...l.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:l.searchForm.teacherId,"onUpdate:value":e=>l.searchForm.teacherId=e}),null)]}),d(p,null,{default:()=>[d(Z,{value:l.searchForm.createTimer,"onUpdate:value":e=>l.searchForm.createTimer=e,timerValue:l.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[_("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:r},{default:()=>[_("重置")]})]})]})]})]),d("div",{class:Se.tableWrap},[d(m,{class:Se.tableSpace},(t=e=l.tableList.map((e=>d("div",{class:Se.tableContainer},[d("div",{class:Se.header},[d("div",{class:Se.time},[F(e.startTime).format("YYYY-MM-DD HH:mm")]),a.query.name&&d(I,{type:"primary",class:Se.ntag,strong:!0},{default:()=>[a.query.name]})]),d("div",{class:Se.content},[d(S,{class:Se.navatar,round:!0,src:e.teacherAvatar||ae},null),d("div",{class:Se.userInfo},[d("h2",null,[e.teacherName]),d("p",null,[e.subjectName&&d("span",{class:Se.subjectName},[e.subjectName]),e.lessonCourseware.lessonCoursewareName,_(" |")," ",e.lessonCourseware.lessonCoursewareDetailName,_("|")," ",e.lessonCourseware.lessonCoursewareKnowledgeDetailName])])])]))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!x(t)?e:{default:()=>[e]})),l.tableList.length>0&&d(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&&d(V,{class:Se.nowEmpty},null)])]);var t}}}),Le=l({name:"student-studentList",setup(e,{emit:a}){const l=s({searchForm:{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=i(),o=r(),v=()=>{l.pagination.page=1,F(),D(),H({current:{...l.searchForm,timer:b.value},saveKey:"classDetailTestRecord"})},b=w([re((new Date).getTime()),se((new Date).getTime())]),T=()=>{b.value=[re((new Date).getTime()),se((new Date).getTime())],l.searchForm={keyword:"",trainingStatus:null,vipFlag:""},v(),H({current:{...l.searchForm,timer:b.value},saveKey:"classDetailTestRecord"})};P({current:{...l.searchForm,timer:b.value},saveKey:"classDetailTestRecord",callBack:e=>{l.searchForm=e,b.value=e.timer}});const D=async()=>{l.loading=!0;try{const e=await $({classGroupId:n.query.id,...l.searchForm,...l.pagination,...oe(b.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)}},F=async()=>{try{const e=await K({classGroupId:n.query.id,...oe(b.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)}};c((()=>{F(),D()}));const j=()=>[{title:"学生姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},{title:"性别",key:"sex",render:e=>d(f,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"studentType",render:e=>d(f,null,[e.vipFlag?"会员":"普通"])},{title:"练习天数",key:"practiceDays",render:e=>d(f,null,[e.practiceDays?e.practiceDays:0,_("天")])},{title:"学练时长",key:"studentType",render:e=>d(f,null,[e.practiceDuration?ce(e.practiceDuration)>0?ce(e.practiceDuration)+"分"+de(e.practiceDuration)+"秒":de(e.practiceDuration)+"秒":"0秒"])},{title:"操作",key:"id",render:e=>d(h,{text:!0,type:"primary",onClick:()=>{(e=>{o.push({path:"/classStudentRecode",query:{...n.query,studentId:e.studentId,studentName:e.studentName}})})(e)}},{default:()=>[_("详情")]})}];return()=>d("div",null,[d("div",{class:t.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(B,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:l.searchForm.keyword,onChangeValue:e=>l.searchForm.keyword=e}),null)]}),d(p,null,{default:()=>[d(R,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)]}),d(p,null,{default:()=>[d(Z,{value:b.value,"onUpdate:value":e=>b.value=e,separator:"至",type:"daterange",timerValue:b.value},null)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:v},{default:()=>[_("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:T},{default:()=>[_("重置")]})]})]})]})]),d("div",{class:["section-container"]},[d(M,{"x-gap":"12",cols:8},{default:()=>[d(N,null,{default:()=>[d("div",{class:t.TrainDataItem},[d("div",null,[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(me,{from:0,to:l.testInfo.practiceUserCount},null)])," ",_("人")])])]),d("p",{class:t.TrainDataItemsubTitle},[_("练习人数")])])]}),d(N,null,{default:()=>[d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(me,{from:0,to:l.testInfo.vipUserCount},null)])," ",_("人")])]),d("p",{class:t.TrainDataItemsubTitle},[_("会员人数")])])]}),d(N,null,{default:()=>[d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[ce(l.testInfo.practiceDurationAvg)>0?d("div",null,[d("span",null,[d(me,{from:0,to:ce(l.testInfo.practiceDurationAvg)},null)])," ",_("分")]):null,d("div",null,[d("span",null,[d(me,{from:0,to:de(l.testInfo.practiceDurationAvg)},null)])," ",_("秒")])]),d("p",{class:t.TrainDataItemsubTitle},[_("平均每天练习时长")])])]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:l.loading,columns:j(),data:l.tableList},{empty:()=>d(V,null,null)}),d(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:D,sync:!0},null)])])}});e("default",l({name:"base-setting",setup(){const e=sessionStorage.getItem("classDetailTabs"),a=w(e||"student");sessionStorage.removeItem("classDetailTabs");const l=i(),n=w([{name:"班级管理",path:"/classList"},{name:l.query.name,path:"/classDetail"}]);Q((e=>{e.form.tabName&&(a.value=e.form.tabName)}));const r=w();return(async()=>{try{const e=l.query.id,{data:a}=await O({id:e});r.value=a.upgradeFlag?1:0}catch{}})(),c((()=>{e&&(a.value=e)})),()=>d("div",null,[d(E,{list:n.value},null),d("div",{class:[t.listWrap,t.infoListWrap]},[d(U,{class:t.customTabs,value:a.value,"onUpdate:value":[e=>a.value=e,e=>(e=>{X(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:()=>[d(Y,{name:"student",tab:"学员名单"},{default:()=>[d(he,{upgradeFlag:r.value},null)]}),d(Y,{name:"afterWork",tab:"课后作业"},{default:()=>[d(Ie,{upgradeFlag:r.value},null)]}),d(Y,{name:"practice",tab:"练习记录"},{default:()=>[d(Le,null,null)]}),d(Y,{name:"attendclass",tab:"上课记录"},{default:()=>[d(xe,null,null)]})]})])])}}))}}}));