classDetail-legacy-6ba4d53d-1734950731618.js 31 KB

1
  1. System.register(["./index.module-legacy-7948c6f2-1734950731618.js","./index-legacy-4630884d-1734950731618.js","./index-legacy-2af42881-1734950731618.js","./index-legacy-83c28d0b-1734950731618.js","./index-legacy-cd7fea03-1734950731618.js","./index-legacy-a561af25-1734950731618.js","./api-legacy-37b6770f-1734950731618.js","./index-legacy-e3a3b720-1734950731618.js","./index-legacy-46a911b2-1734950731618.js","./use-async-legacy-6ec257e8-1734950731618.js","./index-legacy-4143c402-1734950731618.js","./index-legacy-78d44dfd-1734950731618.js","./teacherIcon-legacy-3eeb62c3-1734950731618.js","./contants-legacy-71300fc2-1734950731618.js","./Scrollbar-legacy-0b9059a1-1734950731618.js","./icon-sort-asc-legacy-3e69fa82-1734950731618.js","./api-legacy-f6c76495-1734950731618.js","./api-legacy-784f07d7-1734950731618.js","./api-legacy-ffcfe147-1734950731618.js","./contants-legacy-685d9204-1734950731618.js","./index-legacy-d4e0b22b-1734950731618.js","./Slider-legacy-7133cde0-1734950731618.js","./urlUtils-legacy-47a65e18-1734950731618.js","./index-legacy-308e11e0-1734950731618.js","./icon_default-legacy-fa9bb009-1734950731618.js","./useSpeak-legacy-4037e929-1734950731618.js","./api-legacy-9d2d8545-1734950731618.js","./icon-pan-legacy-9492b61b-1734950731618.js","./api-legacy-3c6cf578-1734950731618.js","./index-legacy-64cb7403-1734950731618.js","./catchData-legacy-786f1507-1734950731618.js","./index-legacy-76ca2135-1734950731618.js","./index-legacy-4b375817-1734950731618.js"],(function(e,a){"use strict";var t,n,l,s,r,i,o,c,d,u,p,g,m,v,h,y,_,f,w,b,T,D,S,C,F,I,k,x,L,q,j,N,z,M,U,Y,B,O,A,E,$,G,R,W,K,V,J,P,H,Q,X,Z,ee,ae,te,ne,le,se,re,ie,oe,ce,de,ue,pe,ge,me,ve,he,ye,_e,fe,we,be,Te,De;return{setters:[e=>{t=e.s},e=>{n=e.d,l=e.b,s=e.a,r=e.u,i=e.e,o=e.A,c=e.q,d=e.f,u=e.N,p=e.g,g=e.y,m=e.x,v=e.j,h=e.k,y=e.aG,_=e.l,f=e.m,w=e.V,b=e.F,T=e.r,D=e.E,S=e.w,C=e.Q,F=e.aJ,I=e.aK,k=e.aL,x=e.c,L=e.aM,q=e.aN,j=e.D,N=e.L,z=e.aB,M=e.aC,U=e.B,Y=e.t,B=e.v},e=>{O=e.C},e=>{A=e.S},e=>{E=e.C},e=>{$=e.P},e=>{G=e.h,R=e.i,W=e.j,K=e.k,V=e.l,J=e.m,P=e.n},e=>{H=e.T},e=>{Q=e.U},e=>{X=e.i,Z=e.s,ee=e.g,ae=e.a},e=>{te=e.C},e=>{ne=e.T,le=e.a,se=e.S,re=e.b},e=>{ie=e.d},e=>{oe=e.e},e=>{ce=e.N},e=>{de=e.g,ue=e.a,pe=e.b,ge=e.i,me=e.c,ve=e.d,he=e.f,ye=e.N,_e=e.e,fe=e.h,we=e.j},e=>{be=e.r,Te=e.s},e=>{De=e.a},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 Se=n({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(e){const a=l(),n=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 S=()=>{D.pagination.page=1,F(),Z({current:D.searchForm,saveKey:"classDetailStudent"})},C=()=>{D.searchForm={keyword:"",gender:"",membership:""},S(),Z({current:D.searchForm,saveKey:"classDetailStudent"})},F=async()=>{D.loading=!0;try{const e=await G({classGroupId:n.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)}};X({current:D.searchForm,saveKey:"classDetailStudent",callBack:e=>{D.searchForm=e}}),c((()=>{F()}));const I=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("复制成功")},k=()=>[{title:"学生姓名",key:"nickname",render:e=>d(w,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>I(e.nickname)},[e.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:e=>d(w,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>I(e.phone)},[e.phone]),default:"点击复制"})},{title:"性别",key:"gender",render:e=>d(b,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"vipMember",render:e=>d(b,null,[e.vipMember?"会员":"普通"])},{title:"操作",key:"id",render:e=>d(m,null,{default:()=>[d(v,{text:!0,type:"primary",onClick:()=>(e=>{T.push({path:"/classStudentDetail",query:{...n.query,studentId:e.id,studentName:e.nickname,upgradeFlag:D.upgradeFlag?0:1}})})(e)},{default:()=>[h("详情")]}),d(v,{text:!0,type:"primary",onClick:()=>x(e),disabled:e.historyClassStudent},{default:()=>[h("修改")]})]})}],x=e=>{D.editStatus=!0,D.activeRow=e};return()=>d("div",null,[d("div",{class:t.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(A,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:D.searchForm.keyword,onChangeValue:e=>D.searchForm.keyword=e}),null)]}),d(p,null,{default:()=>[d(E,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)]}),d(p,null,{default:()=>[d(E,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)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(v,{type:"primary",class:"searchBtn",onClick:S},{default:()=>[h("搜索")]}),d(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[h("重置")]})]})]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:D.loading,columns:k(),data:D.tableList},{empty:()=>d(H,null,null)}),d($,{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:F,sync:!0},null)]),d(_,{maskClosable:f,show:D.editStatus,"onUpdate:show":e=>D.editStatus=e,class:["modalTitle background",t.updateStudent],preset:"card",title:"修改信息"},{default:()=>[d(Q,{onClose:()=>D.editStatus=!1,onConfirm:()=>F(),row:D.activeRow},null)]})])}}),Ce=n({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:n}){const l=T(!1),s=T({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),r=async e=>{l.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?[`${oe[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)}l.value=!1};return n({getTrainingDetail:r}),c((()=>{r(e.activeRow.id)})),()=>d("div",{class:[t.trainingDetails]},[d(D,{show:l.value},{default:()=>[d("div",{class:t.studentList},[d("div",{class:t.studentHeaderWrap},[d("div",{class:t.studentHeader},[d("div",{class:t.studentHeaderBorder},[d(S,{class:t.studentHeaderImg,src:s.value.teacherAvatar?s.value.teacherAvatar:ie,previewDisabled:!0},null)])]),d("div",{class:t.workafterInfo},[d("h4",null,[s.value.teacherName," ",d("div",{class:[t.workafterInfoDot,t.workafterTeacherInfoDot]},[h("老师")])]),d("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"):"--"])])])]),d(ce,{style:"max-height:400px",trigger:"none"},{default:()=>[d("div",{class:t.workList},[s.value.studentLessonTrainingDetails.map((e=>d(ne,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:e},null)))])]})]})])}}),Fe="_trainSettings_qodsv_1",Ie="_trainBtnGroup_qodsv_1",ke="_searchGroup_qodsv_9",xe="_datetime_qodsv_13",Le="_trainList_qodsv_43",qe="_listSection_qodsv_48",je="_emptySection_qodsv_51",Ne="_list_qodsv_48",ze="_trainEditModal_qodsv_69",Me="_selectMusicModal_qodsv_72",Ue=n({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=l(),n=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?[`${oe[a.evaluateDifficult]}`,a.practiceChapterBegin||a.practiceChapterEnd?`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`:"全部小节",`${a.trainingTimes}分达标`]:[`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`,`速度${a.practiceSpeed}`,`${a.trainingTimes}分钟`],t},r=i({show:!1,msg:"",confirmButtonText:"",cancelBtn:!1,type:"CLASS"});function o(){["CLASS","PERSON"].includes(r.type)?k.push({path:"/classList"}):"MUSIC"===r.type&&(r.show=!1)}const u=async()=>{if(n.expireDate)if(n.trainList.length<=0)t.error("训练内容不能为空");else{n.btnLoading=!0;try{const l=n.trainList||[],s=[];l.forEach((e=>{s.push({trainingType:e.trainingType,musicId:e.musicId,trainingConfigJsonObject:e.trainingConfigJson})}));const i={lessonTrainingDetails:s,expireDate:n.expireDate+" 23:59:59",classGroupId:e.classGroupId,courseScheduleId:e.courseScheduleId||null},o=await Te(i);200===o.code&&(o.data.status?(t.success("布置成功"),a("close"),a("confirm")):function(e){const{type:a,errList:t}=e;if(r.type=a,"CLASS"===a){r.cancelBtn=!0,r.confirmButtonText="去设置";const e=t.map((e=>`<div><span style="color:#F44541">【${e.classGroupName}】</span>未设置乐器,请设置乐器后布置作业${t.length>1?";":""}</div>`));r.msg=e.join("")}else if("PERSON"===a){r.cancelBtn=!0,r.confirmButtonText="去设置";const e=t.map((e=>`<div><span style="color:#F44541">【${e.studentName}】</span>所在<span style="color:#F44541">【${e.classGroupName}】</span>未设置乐器,请设置乐器后布置作业${t.length>1?";":""}</div>`));r.msg=e.join("")}else if("MUSIC"===a){r.cancelBtn=!1,r.confirmButtonText="我知道了";const e=t.map((e=>`<div>曲目<span style="color:#F44541">【${e.musicSheetName}】</span>不支持<span style="color:#F44541">【${e.instrumentName}】</span>练习,请更换曲目或取消<span style="color:#F44541">【${e.instrumentName}】</span>的学生${t.length>1?";":""}</div>`));r.msg=e.join("")}r.show=!0}(o.data))}catch{}n.btnLoading=!1}else t.error("请选择截止日期")};return c((()=>{e.detailId&&e.subjectId&&(async()=>{n.loadingStatus=!0;try{const{data:a}=await be({coursewareKnowledgeDetailId:e.detailId,subjectId:e.subjectId,page:1,rows:99}),t=a.rows||[],l=[];t.forEach((e=>{const a=s(e.trainingType,e.trainingConfigJson);l.push({typeList:a||[],...e})})),n.trainList=l||[]}catch{}n.loadingStatus=!1})()})),()=>d("div",{class:Fe},[d("div",{class:ke},[d(v,{onClick:()=>{n.selectMusicStatus=!0,n.type="add"}},{default:()=>[h("添加作业")]}),d("div",{class:xe},[d("label",null,[h("截止时间:")]),d(F,{style:{width:"200px"},placeholder:"请选择截止日期","formatted-value":n.expireDate,"onUpdate:formatted-value":e=>n.expireDate=e,type:"date",valueFormat:"yyyy-MM-dd",isDateDisabled:e=>e<n.currentTime},null)])]),d(ce,{class:Le},{default:()=>[d(D,{show:n.loadingStatus},{default:()=>[d("div",{class:[qe,!n.loadingStatus&&n.trainList.length<=0?je:""]},[n.trainList.length>0&&d("div",{class:Ne},[n.trainList.map(((e,a)=>d(ne,{item:e,type:"homework",onEdit:e=>{const{trainingConfigJson:a,id:t,musicId:l,...s}=e;n.editItem={...s,id:l,trainId:t,...a},console.log(n.editItem),n.type="update",n.editStatus=!0},onDelete:()=>{n.trainList.splice(a,1)}},null)))]),!n.loadingStatus&&n.trainList.length<=0&&d(H,{description:"暂无作业"},null)])]})]}),d(m,{class:Ie},{default:()=>[d(v,{strong:!0,type:"default",round:!0,onClick:()=>a("close")},{default:()=>[h("取消布置")]}),d(v,{strong:!0,type:"primary",round:!0,disabled:n.trainList.length<=0,onClick:u},{default:()=>[h("立即布置")]})]}),d(_,{maskClosable:f,show:n.editStatus,"onUpdate:show":e=>n.editStatus=e,class:["modalTitle background",ze],preset:"card",title:"作业设置"},{default:()=>[d(le,{item:n.editItem,type:"homework",onClose:()=>n.editStatus=!1,onConfirm:e=>{console.log(e,"update",n);const a=s(e.trainingType,e.trainingConfigJson);"update"===n.type?n.trainList.forEach((t=>{t.id===e.id&&(t.trainingType=e.trainingType,t.trainingConfigJson=e.trainingConfigJson,t.typeList=a)})):n.trainList.push({...e,id:+new Date,musicName:n.editItem.title,typeList:a}),n.editItem={}}},null)]}),d(_,{maskClosable:f,show:n.selectMusicStatus,"onUpdate:show":e=>n.selectMusicStatus=e,class:["modalTitle",Me],preset:"card",title:"选择曲目"},{default:()=>[d(se,{type:"homework",onAdd:a=>{n.selectMusicStatus=!1,(async a=>{let t="init",l=null;try{const e=await I.get(a.xmlFileUrl,{mode:"cors"}),n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("part");l=n[0]?.getElementsByTagName("measure"),t="success"}catch(s){t="error"}a.practiceChapterMax="success"==t?l.length:0,a.coursewareKnowledgeDetailId=e.detailId,a.subjectId=e.subjectId,n.editItem=a,n.editStatus=!0})(a)}},null)]}),d(re,{show:r.show,content:r.msg,onClose:()=>{r.show=!1},onConfirm:o,cancelButtonText:"暂不设置",cancelBtn:r.cancelBtn,confirmButtonText:r.confirmButtonText},null)])}}),Ye=n({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(e){const a=r(),n=s(),l=i({upgradeFlag:0==e.upgradeFlag,searchForm:{status:"",timer:[de((new Date).getTime()),ue((new Date).getTime())]},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1});o((()=>e.upgradeFlag),(()=>{l.upgradeFlag=0==e.upgradeFlag}));const w=()=>{l.pagination.page=1,D(),Z({current:l.searchForm,saveKey:"classDetailAfterWork"})},T=()=>{l.searchForm={status:"",timer:[de((new Date).getTime()),ue((new Date).getTime())]},w(),Z({current:l.searchForm,saveKey:"classDetailAfterWork"})};X({current:l.searchForm,saveKey:"classDetailAfterWork",callBack:e=>{l.searchForm=e}});const D=async()=>{l.loading=!0;try{const{timer:e,...a}=l.searchForm,t=await W({classGroupId:n.query.id,...a,...l.pagination,...pe(e,["startTime","endTime"],"YYYY-MM-DD")});l.tableList=t.data.rows,l.pagination.pageTotal=t.data.total,l.loading=!1}catch(e){l.loading=!1,console.log(e)}};c((()=>{D()}));const S=e=>{a.push({path:"/afterWorkDetail",query:{...n.query,classGroupId:n.query.id,teacherName:e.teacherName,trainingId:e.id}})};return()=>d("div",null,[d("div",{class:t.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(te,{value:l.searchForm.timer,"onUpdate:value":e=>l.searchForm.timer=e,separator:"至",type:"daterange",timerValue:l.searchForm.timer},null)]}),d(p,null,{default:()=>[d(E,g({options:[{label:"全部状态",value:""},{label:"已结束",value:1},{label:"进行中",value:0}],placeholder:"作业状态",clearable:!0,inline:!0},{value:l.searchForm.status,"onUpdate:value":e=>l.searchForm.status=e}),null)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(v,{type:"primary",class:"searchBtn",onClick:w},{default:()=>[h("搜索")]}),d(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:T},{default:()=>[h("重置")]})]})]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:l.loading,columns:[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render:e=>d(b,null,[e.createTime])},{title:"截止时间",key:"expireDate",render:e=>d(b,null,[e.expireDate])},{title:"作业状态",key:"status",render:e=>e.status?d("div",{class:t.endDot},[d("span",null,null),h("已结束")]):d("div",{class:t.indDot},[d("span",null,null),h(" 进行中")])},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"达标人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render:e=>d(b,null,[e.trainingRate,h("%")])},{title:"达标率",key:"qualifiedRate",render:e=>d(b,null,[e.qualifiedRate,h("%")])},{title:"操作",key:"id",render:e=>d(m,null,{default:()=>[d(v,{text:!0,type:"primary",onClick:()=>S(e)},{default:()=>[h("详情")]})]})}],data:l.tableList},{empty:()=>d(H,null,null)}),d($,{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)]),d(_,{maskClosable:f,show:l.addWorkVisible,"onUpdate:show":e=>l.addWorkVisible=e,preset:"card",class:[t.attendClassModal,t.trainClassModal],title:"作业设置"},{default:()=>[d(Ue,{classGroupId:n.query.id,onClose:()=>{D(),l.addWorkVisible=!1}},null)]}),d(_,{maskClosable:f,show:l.detailVisiable,"onUpdate:show":e=>l.detailVisiable=e,preset:"card",class:["modalTitle background",t.wordDetailModel],title:"作业详情"},{default:()=>[d(Ce,{onClose:()=>l.detailVisiable=!1,activeRow:l.activeRow},null)]})])}}),Be={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"},Oe=n({name:"class-record",setup(){const e=x(),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()]}},n=i({searchForm:{teacherId:"",createTimer:t()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),l=()=>{n.pagination.page=1,o(),Z({current:n.searchForm,saveKey:"classDetailRecord"})},r=()=>{n.searchForm={teacherId:"",createTimer:t()},l(),Z({current:n.searchForm,saveKey:"classDetailRecord"})};X({current:n.searchForm,saveKey:"classDetailRecord",callBack:e=>{n.searchForm=e}});const o=async()=>{n.loading=!0;try{const{data:e}=await K({classGroupId:a.query.id,teacherId:n.searchForm.teacherId,...N(n.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...n.pagination}),t=e.rows||[];t.forEach((e=>{e.lessonCourseware=e.lessonCoursewareJson?JSON.parse(e.lessonCoursewareJson):{}})),n.tableList=t,n.pagination.pageTotal=e.total,n.loading=!1}catch(e){n.loading=!1}};return c((()=>{(async()=>{try{const{data:a}=await De({schoolId:e.info.schoolInfos?.[0]?.id,page:1,rows:1e3}),t=a.rows||[],l=[];t.forEach((e=>{l.push({label:e.nickname,value:e.id})})),n.teacherList=l}catch{}})(),o()})),()=>{let e;return d("div",null,[d("div",{class:Be.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(E,g({options:[{label:"全部老师",value:""},...n.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:n.searchForm.teacherId,"onUpdate:value":e=>n.searchForm.teacherId=e}),null)]}),d(p,null,{default:()=>[d(te,{value:n.searchForm.createTimer,"onUpdate:value":e=>n.searchForm.createTimer=e,timerValue:n.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(v,{type:"primary",class:"searchBtn",onClick:l},{default:()=>[h("搜索")]}),d(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:r},{default:()=>[h("重置")]})]})]})]})]),d("div",{class:Be.tableWrap},[d(m,{class:Be.tableSpace},(t=e=n.tableList.map((e=>d("div",{class:Be.tableContainer},[d("div",{class:Be.header},[d("div",{class:Be.time},[C(e.startTime).format("YYYY-MM-DD HH:mm")]),a.query.name&&d(L,{type:"primary",class:Be.ntag,strong:!0},{default:()=>[a.query.name]})]),d("div",{class:Be.content},[d(q,{class:Be.navatar,round:!0,src:e.teacherAvatar||ie},null),d("div",{class:Be.userInfo},[d("h2",null,[e.teacherName]),d("p",null,[e.subjectName&&d("span",{class:Be.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)&&!j(t)?e:{default:()=>[e]})),n.tableList.length>0&&d($,{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:o,pageSizes:[12,24,36,48],sync:!0,saveKey:"classRecord-key"},null),n.tableList.length<=0&&d(H,{class:Be.nowEmpty},null)])]);var t}}}),Ae=n({name:"student-studentList",setup(e,{emit:a}){const n=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}),l=s(),o=r(),_=()=>{n.pagination.page=1,C(),S(),Z({current:{...n.searchForm,timer:f.value},saveKey:"classDetailTestRecord"})},f=T([de((new Date).getTime()),ue((new Date).getTime())]),D=()=>{f.value=[de((new Date).getTime()),ue((new Date).getTime())],n.searchForm={ase:0,sortType:1,keyword:"",trainingStatus:null,vipFlag:""},_(),Z({current:{...n.searchForm,timer:f.value},saveKey:"classDetailTestRecord"})};X({current:{...n.searchForm,timer:f.value},saveKey:"classDetailTestRecord",callBack:e=>{n.searchForm=e,f.value=e.timer}});const S=async()=>{n.loading=!0;try{const e=await V({classGroupId:l.query.id,...n.searchForm,...n.pagination,...pe(f.value,["startTime","endTime"],"YYYY-MM-DD")});n.tableList=e.data.rows,n.pagination.pageTotal=e.data.total,n.loading=!1}catch(e){n.loading=!1,console.log(e)}},C=async()=>{try{const e=await J({classGroupId:l.query.id,...pe(f.value,["startTime","endTime"],"YYYY-MM-DD")});n.testInfo.practiceDurationAvg=e.data.practiceDurationAvg,n.testInfo.practiceUserCount=e.data.practiceUserCount,n.testInfo.vipUserCount=e.data.vipUserCount}catch(e){console.log(e)}};c((()=>{C(),S()}));const F=i({title:()=>d(w,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{class:t.cell},[h("练习天数"),d("img",{class:t.sortIcon,src:"descend"===F.sortOrder?ge:"ascend"===F.sortOrder?me:ve},null)]),default:"descend"===F.sortOrder?"点击升序":"ascend"===F.sortOrder?"取消排序":"点击降序"}),key:"practiceDays",sorter:!0,sortOrder:!1,render:e=>d(b,null,[e.practiceDays?e.practiceDays:0,h("天")])}),I=i({title:()=>d(w,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{class:t.cell},[h("学练时长"),d("img",{class:t.sortIcon,src:"descend"===I.sortOrder?ge:"ascend"===I.sortOrder?me:ve},null)]),default:"descend"===I.sortOrder?"点击升序":"ascend"===I.sortOrder?"取消排序":"点击降序"}),key:"practiceDuration",sorter:!0,sortOrder:!1,render:e=>d(b,null,[e.practiceDuration?he(e.practiceDuration,1):"0秒"])}),k=()=>[{title:"学生姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},{title:"性别",key:"sex",render:e=>d(b,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"studentType",render:e=>d(b,null,[e.vipFlag?"会员":"普通"])},F,I,{title:"操作",key:"id",render:e=>d(v,{text:!0,type:"primary",onClick:()=>{(e=>{o.push({path:"/classStudentRecode",query:{...l.query,studentId:e.studentId,studentName:e.studentName}})})(e)}},{default:()=>[h("详情")]})}],x=e=>{if(e){const a={practiceDuration:1,practiceDays:2};n.searchForm.sortType=a[e.columnKey],"practiceDuration"==e.columnKey&&(I.sortOrder=e.order,F.sortOrder=!1),"practiceDays"==e.columnKey&&(F.sortOrder=e.order,I.sortOrder=!1),n.searchForm.ase="ascend"==e.order?1:0}else n.searchForm.ase=0,n.searchForm.sortType=1,F.sortOrder=!1,I.sortOrder=!1;S()};return()=>d("div",null,[d("div",{class:t.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(A,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:n.searchForm.keyword,onChangeValue:e=>n.searchForm.keyword=e}),null)]}),d(p,null,{default:()=>[d(E,g({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:n.searchForm.vipFlag,"onUpdate:value":e=>n.searchForm.vipFlag=e}),null)]}),d(p,null,{default:()=>[d(te,{value:f.value,"onUpdate:value":e=>f.value=e,separator:"至",type:"daterange",timerValue:f.value},null)]}),d(p,null,{default:()=>[d(m,{justify:"end"},{default:()=>[d(v,{type:"primary",class:"searchBtn",onClick:_},{default:()=>[h("搜索")]}),d(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:D},{default:()=>[h("重置")]})]})]})]})]),d("div",{class:["section-container"]},[d(z,{"x-gap":"12",cols:8},{default:()=>[d(M,null,{default:()=>[d("div",{class:t.TrainDataItem},[d("div",null,[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ye,{from:0,to:n.testInfo.practiceUserCount},null)])," ",h("人")])])]),d("p",{class:t.TrainDataItemsubTitle},[h("练习人数")])])]}),d(M,null,{default:()=>[d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ye,{from:0,to:n.testInfo.vipUserCount},null)])," ",h("人")])]),d("p",{class:t.TrainDataItemsubTitle},[h("会员人数")])])]}),d(M,null,{default:()=>[d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[_e(n.testInfo.practiceDurationAvg)>0?d("div",null,[d("span",null,[d(ye,{from:0,to:_e(n.testInfo.practiceDurationAvg)},null)]),d("i",{style:{width:"4px",display:"inline-block"}},null),h("时"),d("i",{style:{width:"4px",display:"inline-block"}},null)]):null,_e(n.testInfo.practiceDurationAvg)>0||fe(n.testInfo.practiceDurationAvg)>0?d("div",null,[d("span",null,[d(ye,{from:0,to:fe(n.testInfo.practiceDurationAvg)},null)])," ",h("分")]):null,d("div",null,[d("span",null,[d(ye,{from:0,to:we(n.testInfo.practiceDurationAvg)},null)])," ",h("秒")])]),d("p",{class:t.TrainDataItemsubTitle},[h("平均每天练习时长")])])]})]})]),d("div",{class:[t.tableWrap,t.noSort]},[d(y,{class:t.classTable,loading:n.loading,columns:k(),data:n.tableList,"onUpdate:sorter":x},{empty:()=>d(H,null,null)}),d($,{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:S,sync:!0},null)])])}});e("default",n({name:"base-setting",setup(){const e=sessionStorage.getItem("classDetailTabs"),a=T(e||"student");sessionStorage.removeItem("classDetailTabs");const n=s(),l=T([{name:"班级管理",path:"/classList"},{name:n.query.name,path:"/classDetail"}]);ee((e=>{e.form.tabName&&(a.value=e.form.tabName)}));const r=T();return(async()=>{try{const e=n.query.id,{data:a}=await P({id:e});r.value=a.upgradeFlag?1:0}catch{}})(),c((()=>{e&&(a.value=e)})),U((()=>{const e=sessionStorage.getItem("classDetailTabs");e&&(a.value=e)})),()=>d("div",null,[d(O,{list:l.value},null),d("div",{class:[t.listWrap,t.infoListWrap]},[d(Y,{class:t.customTabs,value:a.value,"onUpdate:value":[e=>a.value=e,e=>(e=>{ae(e,"tabName",n)})(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(B,{name:"student",tab:"学员名单"},{default:()=>[d(Se,{upgradeFlag:r.value},null)]}),d(B,{name:"afterWork",tab:"课后作业"},{default:()=>[d(Ye,{upgradeFlag:r.value},null)]}),d(B,{name:"practice",tab:"练习记录"},{default:()=>[d(Ae,null,null)]}),d(B,{name:"attendclass",tab:"上课记录"},{default:()=>[d(Oe,null,null)]})]})])])}}))}}}));