1 |
- System.register(["./index.module-legacy-080f5ce6-1726219372904.js","./index-legacy-07b6971b-1726219372904.js","./index-legacy-2906d6ed-1726219372904.js","./index-legacy-6949dc91-1726219372904.js","./index-legacy-2c3bd9e3-1726219372904.js","./index-legacy-e9884031-1726219372904.js","./api-legacy-824e3227-1726219372904.js","./index-legacy-783edf9f-1726219372904.js","./index-legacy-3428f342-1726219372904.js","./use-async-legacy-c454b906-1726219372904.js","./index-legacy-383c219e-1726219372904.js","./index-legacy-7a61d972-1726219372904.js","./teacherIcon-legacy-3eeb62c3-1726219372904.js","./contants-legacy-5abbabb7-1726219372904.js","./Scrollbar-legacy-b3b8ec19-1726219372904.js","./dateFormat-legacy-7f1891b4-1726219372904.js","./api-legacy-52bf1c98-1726219372904.js","./api-legacy-c09da2e1-1726219372904.js","./icon-sort-asc-legacy-e919a334-1726219372904.js","./api-legacy-5fd1c091-1726219372904.js","./contants-legacy-c1e0d0b9-1726219372904.js","./index-legacy-20705a68-1726219372904.js","./Slider-legacy-1d301498-1726219372904.js","./urlUtils-legacy-0ad6488a-1726219372904.js","./index-legacy-2c4a7da3-1726219372904.js","./icon_default-legacy-fa9bb009-1726219372904.js","./useSpeak-legacy-d03f50a9-1726219372904.js","./api-legacy-bc2c84fc-1726219372904.js","./icon-pan-legacy-9492b61b-1726219372904.js","./api-legacy-82044a51-1726219372904.js","./index-legacy-8fdea2ee-1726219372904.js","./catchData-legacy-37d10d71-1726219372904.js","./index-legacy-8904b81b-1726219372904.js","./index-legacy-d3a83854-1726219372904.js"],(function(e,a){"use strict";var t,n,s,l,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,E,A,$,G,R,W,K,V,J,P,H,Q,X,Z,ee,ae,te,ne,se,le,re,ie,oe,ce,de,ue,pe,ge,me,ve,he,ye,_e,fe,we,be;return{setters:[e=>{t=e.s},e=>{n=e.d,s=e.b,l=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=>{E=e.S},e=>{A=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,se=e.a,le=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.c,me=e.d,ve=e.N},e=>{he=e.o,ye=e.p},e=>{_e=e.a},e=>{fe=e.i,we=e.a,be=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 Te=n({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(e){const a=s(),n=l(),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(E,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:D.searchForm.keyword,onChangeValue:e=>D.searchForm.keyword=e}),null)]}),d(p,null,{default:()=>[d(A,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(A,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)]})])}}),De=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 s=T(!1),l=T({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),r=async e=>{s.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||[]}}));l.value={...a.data,studentLessonTrainingDetails:t}}catch(a){console.log(a)}s.value=!1};return n({getTrainingDetail:r}),c((()=>{r(e.activeRow.id)})),()=>d("div",{class:[t.trainingDetails]},[d(D,{show:s.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:l.value.teacherAvatar?l.value.teacherAvatar:ie,previewDisabled:!0},null)])]),d("div",{class:t.workafterInfo},[d("h4",null,[l.value.teacherName," ",d("div",{class:[t.workafterInfoDot,t.workafterTeacherInfoDot]},[h("老师")])]),d("p",null,[h("开始时间:"),l.value.createTime?C(new Date(l.value.createTime)).format("YYYY-MM-DD"):"--"," ",h("| 结束时间:"),l.value.expireDate?C(new Date(l.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),d(ce,{style:"max-height:400px",trigger:"none"},{default:()=>[d("div",{class:t.workList},[l.value.studentLessonTrainingDetails.map((e=>d(ne,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:e},null)))])]})]})])}}),Se="_trainSettings_qodsv_1",Ce="_trainBtnGroup_qodsv_1",Fe="_searchGroup_qodsv_9",Ie="_datetime_qodsv_13",ke="_trainList_qodsv_43",xe="_listSection_qodsv_48",Le="_emptySection_qodsv_51",qe="_list_qodsv_48",je="_trainEditModal_qodsv_69",Ne="_selectMusicModal_qodsv_72",ze=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=s(),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")}),l=(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 s=n.trainList||[],l=[];s.forEach((e=>{l.push({trainingType:e.trainingType,musicId:e.musicId,trainingConfigJsonObject:e.trainingConfigJson})}));const i={lessonTrainingDetails:l,expireDate:n.expireDate+" 23:59:59",classGroupId:e.classGroupId,courseScheduleId:e.courseScheduleId||null},o=await ye(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 he({coursewareKnowledgeDetailId:e.detailId,subjectId:e.subjectId,page:1,rows:99}),t=a.rows||[],s=[];t.forEach((e=>{const a=l(e.trainingType,e.trainingConfigJson);s.push({typeList:a||[],...e})})),n.trainList=s||[]}catch{}n.loadingStatus=!1})()})),()=>d("div",{class:Se},[d("div",{class:Fe},[d(v,{onClick:()=>{n.selectMusicStatus=!0,n.type="add"}},{default:()=>[h("添加作业")]}),d("div",{class:Ie},[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:ke},{default:()=>[d(D,{show:n.loadingStatus},{default:()=>[d("div",{class:[xe,!n.loadingStatus&&n.trainList.length<=0?Le:""]},[n.trainList.length>0&&d("div",{class:qe},[n.trainList.map(((e,a)=>d(ne,{item:e,type:"homework",onEdit:e=>{const{trainingConfigJson:a,id:t,musicId:s,...l}=e;n.editItem={...l,id:s,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:Ce},{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",je],preset:"card",title:"作业设置"},{default:()=>[d(se,{item:n.editItem,type:"homework",onClose:()=>n.editStatus=!1,onConfirm:e=>{console.log(e,"update",n);const a=l(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",Ne],preset:"card",title:"选择曲目"},{default:()=>[d(le,{type:"homework",onAdd:a=>{n.selectMusicStatus=!1,(async a=>{let t="init",s=null;try{const e=await I.get(a.xmlFileUrl,{mode:"cors"}),n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("part");s=n[0]?.getElementsByTagName("measure"),t="success"}catch(l){t="error"}a.practiceChapterMax="success"==t?s.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)])}}),Me=n({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(e){const a=r(),n=l(),s=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),(()=>{s.upgradeFlag=0==e.upgradeFlag}));const w=()=>{s.pagination.page=1,D(),Z({current:s.searchForm,saveKey:"classDetailAfterWork"})},T=()=>{s.searchForm={status:"",timer:[de((new Date).getTime()),ue((new Date).getTime())]},w(),Z({current:s.searchForm,saveKey:"classDetailAfterWork"})};X({current:s.searchForm,saveKey:"classDetailAfterWork",callBack:e=>{s.searchForm=e}});const D=async()=>{s.loading=!0;try{const{timer:e,...a}=s.searchForm,t=await W({classGroupId:n.query.id,...a,...s.pagination,...pe(e,["startTime","endTime"],"YYYY-MM-DD")});s.tableList=t.data.rows,s.pagination.pageTotal=t.data.total,s.loading=!1}catch(e){s.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:s.searchForm.timer,"onUpdate:value":e=>s.searchForm.timer=e,separator:"至",type:"daterange",timerValue:s.searchForm.timer},null)]}),d(p,null,{default:()=>[d(A,g({options:[{label:"全部状态",value:""},{label:"已结束",value:1},{label:"进行中",value:0}],placeholder:"作业状态",clearable:!0,inline:!0},{value:s.searchForm.status,"onUpdate:value":e=>s.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:s.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:s.tableList},{empty:()=>d(H,null,null)}),d($,{page:s.pagination.page,"onUpdate:page":e=>s.pagination.page=e,pageSize:s.pagination.rows,"onUpdate:pageSize":e=>s.pagination.rows=e,pageTotal:s.pagination.pageTotal,"onUpdate:pageTotal":e=>s.pagination.pageTotal=e,onList:D,sync:!0},null)]),d(_,{maskClosable:f,show:s.addWorkVisible,"onUpdate:show":e=>s.addWorkVisible=e,preset:"card",class:[t.attendClassModal,t.trainClassModal],title:"作业设置"},{default:()=>[d(ze,{classGroupId:n.query.id,onClose:()=>{D(),s.addWorkVisible=!1}},null)]}),d(_,{maskClosable:f,show:s.detailVisiable,"onUpdate:show":e=>s.detailVisiable=e,preset:"card",class:["modalTitle background",t.wordDetailModel],title:"作业详情"},{default:()=>[d(De,{onClose:()=>s.detailVisiable=!1,activeRow:s.activeRow},null)]})])}}),Ue={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"},Ye=n({name:"class-record",setup(){const e=x(),a=l(),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:[]}),s=()=>{n.pagination.page=1,o(),Z({current:n.searchForm,saveKey:"classDetailRecord"})},r=()=>{n.searchForm={teacherId:"",createTimer:t()},s(),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 _e({schoolId:e.info.schoolInfos?.[0]?.id,page:1,rows:1e3}),t=a.rows||[],s=[];t.forEach((e=>{s.push({label:e.nickname,value:e.id})})),n.teacherList=s}catch{}})(),o()})),()=>{let e;return d("div",null,[d("div",{class:Ue.searchList},[d(u,{"label-placement":"left",inline:!0},{default:()=>[d(p,null,{default:()=>[d(A,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:s},{default:()=>[h("搜索")]}),d(v,{type:"primary",ghost:!0,class:"resetBtn",onClick:r},{default:()=>[h("重置")]})]})]})]})]),d("div",{class:Ue.tableWrap},[d(m,{class:Ue.tableSpace},(t=e=n.tableList.map((e=>d("div",{class:Ue.tableContainer},[d("div",{class:Ue.header},[d("div",{class:Ue.time},[C(e.startTime).format("YYYY-MM-DD HH:mm")]),a.query.name&&d(L,{type:"primary",class:Ue.ntag,strong:!0},{default:()=>[a.query.name]})]),d("div",{class:Ue.content},[d(q,{class:Ue.navatar,round:!0,src:e.teacherAvatar||ie},null),d("div",{class:Ue.userInfo},[d("h2",null,[e.teacherName]),d("p",null,[e.subjectName&&d("span",{class:Ue.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:Ue.nowEmpty},null)])]);var t}}}),Be=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}),s=l(),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:s.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:s.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?fe:"ascend"===F.sortOrder?we:be},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?fe:"ascend"===I.sortOrder?we:be},null)]),default:"descend"===I.sortOrder?"点击升序":"ascend"===I.sortOrder?"取消排序":"点击降序"}),key:"practiceDuration",sorter:!0,sortOrder:!1,render:e=>d(b,null,[e.practiceDuration?ge(e.practiceDuration)>0?ge(e.practiceDuration)+"分"+me(e.practiceDuration)+"秒":me(e.practiceDuration)+"秒":"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:{...s.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(E,g({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:n.searchForm.keyword,onChangeValue:e=>n.searchForm.keyword=e}),null)]}),d(p,null,{default:()=>[d(A,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(ve,{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(ve,{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},[ge(n.testInfo.practiceDurationAvg)>0?d("div",null,[d("span",null,[d(ve,{from:0,to:ge(n.testInfo.practiceDurationAvg)},null)])," ",h("分")]):null,d("div",null,[d("span",null,[d(ve,{from:0,to:me(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=l(),s=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:s.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(Te,{upgradeFlag:r.value},null)]}),d(B,{name:"afterWork",tab:"课后作业"},{default:()=>[d(Me,{upgradeFlag:r.value},null)]}),d(B,{name:"practice",tab:"练习记录"},{default:()=>[d(Be,null,null)]}),d(B,{name:"attendclass",tab:"上课记录"},{default:()=>[d(Ye,null,null)]})]})])])}}))}}}));
|