1 |
- System.register(["./index.module-legacy-ad2bc5bb-1743496079034.js","./index-legacy-db852529-1743496079034.js","./index-legacy-7d69551f-1743496079034.js","./index-legacy-6bc05897-1743496079034.js","./index-legacy-f2337331-1743496079034.js","./index-legacy-8137a40e-1743496079034.js","./api-legacy-191ce724-1743496079034.js","./index-legacy-0091294a-1743496079034.js","./index-legacy-fc691612-1743496079034.js","./use-async-legacy-605395f4-1743496079034.js","./icon-sort-asc-legacy-eae00c07-1743496079034.js","./index-legacy-e6e1a0ad-1743496079034.js","./index-legacy-47431a48-1743496079034.js","./teacherIcon-legacy-3eeb62c3-1743496079034.js","./contants-legacy-71300fc2-1743496079034.js","./Scrollbar-legacy-0667fe62-1743496079034.js","./index-legacy-8fd68c23-1743496079034.js","./api-legacy-de770c21-1743496079034.js","./api-legacy-a467f43d-1743496079034.js","./api-legacy-0db02740-1743496079034.js","./contants-legacy-fccd2d04-1743496079034.js","./index-legacy-ef82ba28-1743496079034.js","./Slider-legacy-a4f08a42-1743496079034.js","./urlUtils-legacy-935965d2-1743496079034.js","./index-legacy-ee054595-1743496079034.js","./icon_default-legacy-fa9bb009-1743496079034.js","./useSpeak-legacy-65a7d6c6-1743496079034.js","./api-legacy-90b84226-1743496079034.js","./icon-pan-legacy-9492b61b-1743496079034.js","./Cascader-legacy-de005957-1743496079034.js","./index-legacy-9090638f-1743496079034.js","./catchData-legacy-30876512-1743496079034.js","./deep-clone-legacy-0f45d9f6-1743496079034.js","./index-legacy-418964bc-1743496079034.js","./index-legacy-5b839a76-1743496079034.js"],(function(e,a){"use strict";var t,r,l,s,n,i,o,c,d,u,p,g,m,v,h,y,_,f,b,w,T,D,C,S,F,k,I,x,q,L,N,j,M,z,O,U,Y,B,A,E,R,G,$,K,W,V,J,P,H,Z,X,Q,ee,ae,te,re,le,se,ne,ie,oe,ce,de,ue,pe,ge,me,ve,he,ye,_e,fe,be,we,Te,De,Ce;return{setters:[e=>{t=e.s},e=>{r=e.d,l=e.b,s=e.a,n=e.u,i=e.e,o=e.a5,c=e.q,d=e.f,u=e.k,p=e.N,g=e.g,m=e.y,v=e.x,h=e.j,y=e.aU,_=e.l,f=e.m,b=e.aq,w=e.ai,T=e.r,D=e.a9,C=e.w,S=e.aj,F=e.aY,k=e.aZ,I=e.a_,x=e.c,q=e.a$,L=e.b0,N=e.a8,j=e.af,M=e.a6,z=e.t,O=e.v},e=>{U=e.C},e=>{Y=e.S},e=>{B=e.C},e=>{A=e.P},e=>{E=e.h,R=e.i,G=e.j,$=e.k,K=e.l,W=e.m,V=e.n},e=>{J=e.T},e=>{P=e.U},e=>{H=e.i,Z=e.s,X=e.g,Q=e.a},e=>{ee=e.N,ae=e.g,te=e.a,re=e.b,le=e.f,se=e.c,ne=e.d,ie=e.e,oe=e.i,ce=e.h,de=e.j},e=>{ue=e.C},e=>{pe=e.T,ge=e.a,me=e.S,ve=e.b,he=e.R},e=>{ye=e.d},e=>{_e=e.e},e=>{fe=e.N},e=>{be=e.s,we=e.u},e=>{Te=e.a},e=>{De=e.g,Ce=e.i},null,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=r({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(e){const a=l(),r=s(),T=n(),D=i({vipStudentNum:0,studentNum:0}),C=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),(()=>{C.upgradeFlag=0==e.upgradeFlag}));const S=()=>{C.pagination.page=1,k(),Z({current:C.searchForm,saveKey:"classDetailStudent"})},F=()=>{C.searchForm={keyword:"",gender:"",membership:""},S(),Z({current:C.searchForm,saveKey:"classDetailStudent"})},k=async()=>{C.loading=!0;try{const e=await E({classGroupId:r.query.id,...C.searchForm,...C.pagination});C.tableList=e.data.rows,C.pagination.pageTotal=e.data.total,C.loading=!1}catch(e){C.loading=!1,console.log(e)}};H({current:C.searchForm,saveKey:"classDetailStudent",callBack:e=>{C.searchForm=e}}),c((()=>{(async()=>{try{const{data:e}=await R({classGroupId:r.query.id});D.studentNum=e.studentNum||0,D.vipStudentNum=e.vipStudentNum||0}catch(e){console.log(e)}})(),k()}));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("复制成功")},x=()=>[{title:"学生姓名",key:"nickname",render:e=>d(b,{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(b,{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(w,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"学生类型",key:"vipMember",render:e=>d(w,null,[e.vipMember?"会员":"普通"])},{title:"操作",key:"id",render:e=>d(v,null,{default:()=>[d(h,{text:!0,type:"primary",onClick:()=>(e=>{T.push({path:"/classStudentDetail",query:{...r.query,studentId:e.id,studentName:e.nickname,upgradeFlag:C.upgradeFlag?0:1}})})(e)},{default:()=>[u("详情")]}),d(h,{text:!0,type:"primary",onClick:()=>q(e),disabled:e.historyClassStudent},{default:()=>[u("修改")]})]})}],q=e=>{C.editStatus=!0,C.activeRow=e};return()=>d("div",null,[d("div",{class:["section-container"]},[d("div",{class:t.TrainDataTop},[d("div",{class:t.TrainDataTopLeft},[d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ee,{from:0,to:D.studentNum},null)]),u("人")])]),d("p",{class:t.TrainDataItemsubTitle},[u("班级人数")])]),d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ee,{from:0,to:D.vipStudentNum},null)]),u("人")])]),d("p",{class:t.TrainDataItemsubTitle},[u("会员人数")])])]),d("div",{class:t.TrainDataTopRight},null)])]),d("div",{class:t.searchList},[d(p,{"label-placement":"left",inline:!0},{default:()=>[d(g,null,{default:()=>[d(Y,m({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:C.searchForm.keyword,onChangeValue:e=>C.searchForm.keyword=e}),null)]}),d(g,null,{default:()=>[d(B,m({options:[{label:"全部性别",value:""},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:C.searchForm.gender,"onUpdate:value":e=>C.searchForm.gender=e}),null)]}),d(g,null,{default:()=>[d(B,m({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:C.searchForm.membership,"onUpdate:value":e=>C.searchForm.membership=e}),null)]}),d(g,null,{default:()=>[d(v,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:S},{default:()=>[u("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:F},{default:()=>[u("重置")]})]})]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:C.loading,columns:x(),data:C.tableList},{empty:()=>d(J,null,null)}),d(A,{page:C.pagination.page,"onUpdate:page":e=>C.pagination.page=e,pageSize:C.pagination.rows,"onUpdate:pageSize":e=>C.pagination.rows=e,pageTotal:C.pagination.pageTotal,"onUpdate:pageTotal":e=>C.pagination.pageTotal=e,onList:k,sync:!0},null)]),d(_,{maskClosable:f,show:C.editStatus,"onUpdate:show":e=>C.editStatus=e,class:["modalTitle background",t.updateStudent],preset:"card",title:"修改信息"},{default:()=>[d(P,{onClose:()=>C.editStatus=!1,onConfirm:()=>k(),row:C.activeRow},null)]})])}}),Fe=r({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:r}){const l=T(!1),s=T({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),n=async e=>{l.value=!0;try{const a=await G({trainingId:e}),t=a.data.studentLessonTrainingDetails.map((e=>{const a=((e,a)=>{let t=[];return t="EVALUATION"===e?[`${_e[a.evaluateDifficult]}`,`${a.practiceChapterBegin||0}-${a.practiceChapterEnd||0}小节`,`速度${a.evaluateSpeed||0}`,`${a.trainingTimes}分达标`]:[`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`,`速度${a.practiceSpeed||0}`,`${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 r({getTrainingDetail:n}),c((()=>{n(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(C,{class:t.studentHeaderImg,src:s.value.teacherAvatar?s.value.teacherAvatar:ye,previewDisabled:!0},null)])]),d("div",{class:t.workafterInfo},[d("h4",null,[s.value.teacherName," ",d("div",{class:[t.workafterInfoDot,t.workafterTeacherInfoDot]},[u("老师")])]),d("p",null,[u("开始时间:"),s.value.createTime?S(new Date(s.value.createTime)).format("YYYY-MM-DD"):"--"," ",u("| 结束时间:"),s.value.expireDate?S(new Date(s.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),d(fe,{style:"max-height:400px",trigger:"none"},{default:()=>[d("div",{class:t.workList},[s.value.studentLessonTrainingDetails.map((e=>d(pe,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:e},null)))])]})]})])}}),ke="_trainSettings_qodsv_1",Ie="_trainBtnGroup_qodsv_1",xe="_searchGroup_qodsv_9",qe="_datetime_qodsv_13",Le="_trainList_qodsv_43",Ne="_listSection_qodsv_48",je="_emptySection_qodsv_51",Me="_list_qodsv_48",ze="_trainEditModal_qodsv_69",Oe="_selectMusicModal_qodsv_72",Ue=r({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(),r=i({type:"add",btnLoading:!1,loadingStatus:!1,editStatus:!1,editItem:{},selectMusicStatus:!1,trainList:[],currentTime:S(S().format("YYYY-MM-DD")).valueOf(),expireDate:S().add(7,"day").format("YYYY-MM-DD")}),s=T(!1),n=T([]),o=(e,a)=>{let t=[];return t="EVALUATION"===e?[`${_e[a.evaluateDifficult]}`,`${a.practiceChapterBegin||0}-${a.practiceChapterEnd||0}小节`,`速度${a.evaluateSpeed||0}`,`${a.trainingTimes}分达标`]:[`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`,`速度${a.practiceSpeed||0}`,`${a.trainingTimes}分钟`],t},p=i({show:!1,msg:"",confirmButtonText:"",cancelBtn:!1,type:"CLASS"});function g(){["CLASS","PERSON"].includes(p.type)?I.push({path:"/classList"}):"MUSIC"===p.type&&(p.show=!1)}const m=async()=>{if(r.expireDate)if(r.trainList.length<=0)t.error("训练内容不能为空");else{r.btnLoading=!0;try{const l=r.trainList||[],i=[];l.forEach((e=>{i.push({trainingType:e.trainingType,musicId:e.musicId,trainingConfigJsonObject:e.trainingConfigJson})}));const o={lessonTrainingDetails:i,expireDate:r.expireDate+" 23:59:59",classGroupId:e.classGroupId,courseScheduleId:e.courseScheduleId||null},c=await we(o);200===c.code&&(c.data.status?(t.success("布置成功"),a("close"),a("confirm")):function(e){const{type:a,errList:t}=e;if(p.type=a,"CLASS"===a||"PERSON"===a){s.value=!0;const e=t.map((e=>({classGroupId:e.classGroupId,classGroupName:e.classGroupName})));n.value=e}else if("MUSIC"===a){p.cancelBtn=!1,p.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>`));p.msg=e.join("")}p.show=!0}(c.data))}catch{}r.btnLoading=!1}else t.error("请选择截止日期")};return c((()=>{e.detailId&&e.subjectId&&(async()=>{r.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=o(e.trainingType,e.trainingConfigJson);l.push({typeList:a||[],...e})})),r.trainList=l||[]}catch{}r.loadingStatus=!1})()})),()=>d("div",{class:ke},[d("div",{class:xe},[d(h,{onClick:()=>{r.selectMusicStatus=!0,r.type="add"}},{default:()=>[u("添加作业")]}),d("div",{class:qe},[d("label",null,[u("截止时间:")]),d(F,{style:{width:"200px"},placeholder:"请选择截止日期","formatted-value":r.expireDate,"onUpdate:formatted-value":e=>r.expireDate=e,type:"date",valueFormat:"yyyy-MM-dd",isDateDisabled:e=>e<r.currentTime},null)])]),d(fe,{class:Le},{default:()=>[d(D,{show:r.loadingStatus},{default:()=>[d("div",{class:[Ne,!r.loadingStatus&&r.trainList.length<=0?je:""]},[r.trainList.length>0&&d("div",{class:Me},[r.trainList.map(((e,a)=>d(pe,{item:e,type:"homework",onEdit:e=>{const{trainingConfigJson:a,id:t,musicId:l,...s}=e;r.editItem={...s,id:l,trainId:t,...a},console.log(r.editItem),r.type="update",r.editStatus=!0},onDelete:()=>{r.trainList.splice(a,1)}},null)))]),!r.loadingStatus&&r.trainList.length<=0&&d(J,{description:"暂无作业"},null)])]})]}),d(v,{class:Ie},{default:()=>[d(h,{strong:!0,type:"default",round:!0,onClick:()=>a("close")},{default:()=>[u("取消布置")]}),d(h,{strong:!0,type:"primary",round:!0,disabled:r.trainList.length<=0,onClick:m},{default:()=>[u("立即布置")]})]}),d(_,{maskClosable:f,show:r.editStatus,"onUpdate:show":e=>r.editStatus=e,class:["modalTitle background",ze],preset:"card",title:"作业设置"},{default:()=>[d(ge,{item:r.editItem,type:"homework",onClose:()=>r.editStatus=!1,onConfirm:e=>{console.log(e,"update",r);const a=o(e.trainingType,e.trainingConfigJson);"update"===r.type?r.trainList.forEach((t=>{t.id===e.id&&(t.trainingType=e.trainingType,t.trainingConfigJson=e.trainingConfigJson,t.typeList=a)})):r.trainList.push({...e,id:+new Date,musicName:r.editItem.title,typeList:a}),r.editItem={}}},null)]}),d(_,{maskClosable:f,show:r.selectMusicStatus,"onUpdate:show":e=>r.selectMusicStatus=e,class:["modalTitle",Oe],preset:"card",title:"选择曲目"},{default:()=>[d(me,{type:"homework",onAdd:a=>{r.selectMusicStatus=!1,(async a=>{let t="init",l=null;try{const e=await k.get(a.xmlFileUrl,{mode:"cors"}),r=(new DOMParser).parseFromString(e,"text/xml");(Array.from(r?.querySelectorAll("systems"))||[]).forEach((e=>{(Array.from(e?.querySelectorAll("system"))||[]).forEach((a=>{e?.removeChild(a)}))}));const s=r.getElementsByTagName("part");l=s[0]?.getElementsByTagName("measure"),t="success"}catch(s){t="error"}"success"==t?(a.firstMeasureIsZero="0"===l?.[0]?.getAttribute("number"),a.practiceChapterMax=a.firstMeasureIsZero?l.length-1:l.length):a.practiceChapterMax=0,a.coursewareKnowledgeDetailId=e.detailId,a.subjectId=e.subjectId,r.editItem=a,r.editStatus=!0})(a)}},null)]}),d(ve,{show:p.show,content:p.msg,onClose:()=>{p.show=!1},onConfirm:g,cancelButtonText:"暂不设置",cancelBtn:p.cancelBtn,confirmButtonText:p.confirmButtonText},null),d(_,{maskClosable:f,show:s.value,"onUpdate:show":e=>s.value=e,style:{width:"392px"},"display-directive":"if",preset:"card",class:["modalTitleNew"],title:"选择乐器"},{default:()=>[d(he,{activeRow:n.value,onClose:()=>s.value=!1},null)]})])}}),Ye=r({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(e){const a=n(),r=s(),l=i({upgradeFlag:0==e.upgradeFlag,searchForm:{status:"",timer:[ae((new Date).getTime()),te((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 b=()=>{l.pagination.page=1,D(),Z({current:l.searchForm,saveKey:"classDetailAfterWork"})},T=()=>{l.searchForm={status:"",timer:[ae((new Date).getTime()),te((new Date).getTime())]},b(),Z({current:l.searchForm,saveKey:"classDetailAfterWork"})};H({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 $({classGroupId:r.query.id,...a,...l.pagination,...re(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 C=e=>{a.push({path:"/afterWorkDetail",query:{...r.query,classGroupId:r.query.id,teacherName:e.teacherName,trainingId:e.id}})};return()=>d("div",null,[d("div",{class:t.searchList},[d(p,{"label-placement":"left",inline:!0},{default:()=>[d(g,null,{default:()=>[d(ue,{value:l.searchForm.timer,"onUpdate:value":e=>l.searchForm.timer=e,separator:"至",type:"daterange",timerValue:l.searchForm.timer},null)]}),d(g,null,{default:()=>[d(B,m({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(g,null,{default:()=>[d(v,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:b},{default:()=>[u("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:T},{default:()=>[u("重置")]})]})]})]})]),d("div",{class:t.tableWrap},[d(y,{class:t.classTable,loading:l.loading,columns:[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render:e=>d(w,null,[e.createTime])},{title:"截止时间",key:"expireDate",render:e=>e.expireDate?S(e.expireDate).format("YYYY-MM-DD"):"--"},{title:"作业状态",key:"status",render:e=>e.status?d("div",{class:t.endDot},[d("span",null,null),u("已结束")]):d("div",{class:t.indDot},[d("span",null,null),u(" 进行中")])},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"达标人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render:e=>d(w,null,[e.trainingRate,u("%")])},{title:"达标率",key:"qualifiedRate",render:e=>d(w,null,[e.qualifiedRate,u("%")])},{title:"操作",key:"id",render:e=>d(v,null,{default:()=>[d(h,{text:!0,type:"primary",onClick:()=>C(e)},{default:()=>[u("详情")]})]})}],data:l.tableList},{empty:()=>d(J,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)]),d(_,{maskClosable:f,show:l.addWorkVisible,"onUpdate:show":e=>l.addWorkVisible=e,preset:"card",class:[t.attendClassModal,t.trainClassModal],title:"作业设置"},{default:()=>[d(Ue,{classGroupId:r.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(Fe,{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"},Ae=r({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[S(a).valueOf(),S(t).valueOf()]}{const e=S().format("YYYY-MM-DD");return[S(e).subtract(1,"month").valueOf(),S(e).valueOf()]}},r=i({searchForm:{teacherId:"",createTimer:t()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),l=()=>{r.pagination.page=1,o(),Z({current:r.searchForm,saveKey:"classDetailRecord"})},n=()=>{r.searchForm={teacherId:"",createTimer:t()},l(),Z({current:r.searchForm,saveKey:"classDetailRecord"})};H({current:r.searchForm,saveKey:"classDetailRecord",callBack:e=>{r.searchForm=e}});const o=async()=>{r.loading=!0;try{const{data:e}=await K({classGroupId:a.query.id,teacherId:r.searchForm.teacherId,...j(r.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...r.pagination}),t=e.rows||[];t.forEach((e=>{e.lessonCourseware=e.lessonCoursewareJson?JSON.parse(e.lessonCoursewareJson):{}})),r.tableList=t,r.pagination.pageTotal=e.total,r.loading=!1}catch(e){r.loading=!1}};return c((()=>{(async()=>{try{const{data:a}=await Te({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})})),r.teacherList=l}catch{}})(),o()})),()=>{let e;return d("div",null,[d("div",{class:Be.searchList},[d(p,{"label-placement":"left",inline:!0},{default:()=>[d(g,null,{default:()=>[d(B,m({options:[{label:"全部老师",value:""},...r.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:r.searchForm.teacherId,"onUpdate:value":e=>r.searchForm.teacherId=e}),null)]}),d(g,null,{default:()=>[d(ue,{value:r.searchForm.createTimer,"onUpdate:value":e=>r.searchForm.createTimer=e,timerValue:r.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),d(g,null,{default:()=>[d(v,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:l},{default:()=>[u("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:n},{default:()=>[u("重置")]})]})]})]})]),d("div",{class:Be.tableWrap},[d(v,{class:Be.tableSpace},(t=e=r.tableList.map((e=>d("div",{class:Be.tableContainer},[d("div",{class:Be.header},[d("div",{class:Be.time},[S(e.startTime).format("YYYY-MM-DD HH:mm")]),a.query.name&&d(q,{type:"primary",class:Be.ntag,strong:!0},{default:()=>[a.query.name]})]),d("div",{class:Be.content},[d(L,{class:Be.navatar,round:!0,src:e.teacherAvatar||ye},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,u(" |")," ",e.lessonCourseware.lessonCoursewareDetailName,u("|")," ",e.lessonCourseware.lessonCoursewareKnowledgeDetailName,u("| "),e.useChapterLessonCoursewareName])])])]))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)?e:{default:()=>[e]})),r.tableList.length>0&&d(A,{page:r.pagination.page,"onUpdate:page":e=>r.pagination.page=e,pageSize:r.pagination.rows,"onUpdate:pageSize":e=>r.pagination.rows=e,pageTotal:r.pagination.pageTotal,"onUpdate:pageTotal":e=>r.pagination.pageTotal=e,onList:o,pageSizes:[12,24,36,48],sync:!0,saveKey:"classRecord-key"},null),r.tableList.length<=0&&d(J,{class:Be.nowEmpty},null)])]);var t}}}),Ee=r({name:"student-studentList",setup(){const e=l(),a=i({searchForm:{orderBy:null,sort:null,keyword:"",vipFlag:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[]}),r=i({practiceDuration:0,evaluateUserCount:0,evaluateFrequency:0,publishUserCount:0,publishCount:0,practiceUserCount:0,paymentAmount:0,practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0}),o=s(),_=n(),f=()=>{a.pagination.page=1,F(),S(),Z({current:{...a.searchForm,timer:w.value},saveKey:"classDetailTestRecord"})},w=T([ae((new Date).getTime()),te((new Date).getTime())]),D=T([ae((new Date).getTime()),te((new Date).getTime())]),C=()=>{w.value=[ae((new Date).getTime()),te((new Date).getTime())],a.searchForm={orderBy:null,sort:null,keyword:"",vipFlag:""},f(),Z({current:{...a.searchForm,timer:w.value},saveKey:"classDetailTestRecord"})};H({current:{...a.searchForm,timer:w.value},saveKey:"classDetailTestRecord",callBack:e=>{a.searchForm=e,w.value=e.timer}});const S=async()=>{a.loading=!0;try{const e=a.searchForm,t=await W({classGroupId:o.query.id,studentName:e.keyword,vipFlag:e.vipFlag,orderBy:e.orderBy,sort:e.sort,...a.pagination,...re(w.value,["startTime","endTime"],"YYYY-MM-DD")});D.value=w.value,a.tableList=t.data.rows,a.pagination.pageTotal=t.data.total,a.loading=!1}catch(e){a.loading=!1,console.log(e)}},F=async()=>{try{const e=a.searchForm,{data:t}=await De({page:1,rows:999,studentName:e.keyword,vipFlag:e.vipFlag,orderBy:e.orderBy,sort:e.sort,classGroupId:o.query.id,...re(w.value,["startTime","endTime"],"YYYY-MM-DD")});r.practiceDuration=t.practiceDuration,r.practiceDurationAvg=t.practiceDurationAvg,r.practiceUserCount=t.practiceUserCount,r.evaluateUserCount=t.evaluateUserCount,r.evaluateFrequency=t.evaluateFrequency,r.publishUserCount=t.publishUserCount,r.publishCount=t.publishCount}catch(e){console.log(e)}};c((()=>{F(),S()}));const k=(e,a)=>d(b,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{class:t.cell},[e,d("img",{class:t.sortIcon,src:"descend"===a.sortOrder?oe:"ascend"===a.sortOrder?ce:de},null)]),default:"descend"===a.sortOrder?"点击升序":"ascend"===a.sortOrder?"取消排序":"点击降序"}),I=i({title:()=>k("练习总时长",I),key:"practiceDuration",sorter:!0,sortOrder:!1,render:e=>le(e.practiceDuration||0)}),x=i({title:()=>k("练习天数",x),key:"practiceDays",sorter:!0,sortOrder:!1}),q=i({title:()=>k("平均练习时长",q),key:"practiceDurationAvg",sorter:!0,sortOrder:!1,render:e=>le(e.practiceDurationAvg||0)}),L=i({title:()=>k("评测次数",L),key:"evaluateFrequency",sorter:!0,sortOrder:!1}),N=i({title:()=>k("作品数量",N),key:"publishCount",sorter:!0,sortOrder:!1,render:e=>e.publishCount||0}),j=i({title:()=>k("最新作品分数",j),key:"publishScore",sorter:!0,sortOrder:!1,render:e=>null===e.publishScore?"--":e.publishScore}),M=i({title:()=>k("最新作品时间",M),key:"publishTime",sorter:!0,sortOrder:!1,render:e=>e.publishTime||"--"}),z=()=>[{title:"学生姓名",key:"studentName",render:a=>d(b,{showArrow:!1,placement:"top-start"},{trigger:()=>d("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>(a=>{const t=document.createElement("input");t.value=a,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("Copy"),document.body.removeChild(t),e.success("复制成功")})(a.studentName)},[a.studentName]),default:"点击复制"})},{title:"性别",key:"sex",render:e=>e.gender+""!="null"?"0"==e.gender?"女":"男":"--"},{title:"学生类型",key:"vipFlag",render:e=>e.vipFlag?"会员":"普通"},{title:"乐器",key:"instrumentName",render:e=>e.instrumentName||"--"},I,x,q,L,{title:()=>d("span",{style:{display:"flex",alignItems:"center"}},[u("发布作品")," ",d(b,{showArrow:!1},{trigger:()=>d("img",{src:Ce,class:t.tipImg},null),default:()=>"筛选时间段内评测是否发布作品"})]),key:"publishFlag",render:e=>e.publishFlag?"是":"否"},N,j,M,{title:"操作",key:"titleImg",render:e=>d(h,{type:"primary",text:!0,onClick:()=>{(e=>{_.push({path:"/classStudentRecode",query:{...o.query,studentId:e.studentId,studentName:e.studentName,times:JSON.stringify(D.value)}})})(e)}},{default:()=>[u("详情")]})}],O=e=>{e.order?(a.searchForm.orderBy=e.columnKey,I.sortOrder=!1,x.sortOrder=!1,q.sortOrder=!1,L.sortOrder=!1,N.sortOrder=!1,j.sortOrder=!1,M.sortOrder=!1,"practiceDuration"==e.columnKey&&(I.sortOrder=e.order),"practiceDays"==e.columnKey&&(x.sortOrder=e.order),"practiceDurationAvg"==e.columnKey&&(q.sortOrder=e.order),"evaluateFrequency"==e.columnKey&&(L.sortOrder=e.order),"publishCount"==e.columnKey&&(N.sortOrder=e.order),"publishScore"==e.columnKey&&(j.sortOrder=e.order),"publishTime"==e.columnKey&&(M.sortOrder=e.order),a.searchForm.sort="ascend"==e.order?"asc":"desc"):(a.searchForm.orderBy="",a.searchForm.sort="",I.sortOrder=!1,x.sortOrder=!1,q.sortOrder=!1,L.sortOrder=!1,N.sortOrder=!1,j.sortOrder=!1,M.sortOrder=!1),S()};return()=>d("div",null,[d("div",{class:t.searchList},[d(p,{"label-placement":"left",inline:!0},{default:()=>[d(g,null,{default:()=>[d(Y,m({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:a.searchForm.keyword,onChangeValue:e=>a.searchForm.keyword=e}),null)]}),d(g,null,{default:()=>[d(B,m({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:a.searchForm.vipFlag,"onUpdate:value":e=>a.searchForm.vipFlag=e}),null)]}),d(g,null,{default:()=>[d(ue,{value:w.value,"onUpdate:value":e=>w.value=e,separator:"至",type:"daterange",timerValue:w.value},null)]}),d(g,null,{default:()=>[d(v,{justify:"end"},{default:()=>[d(h,{type:"primary",class:"searchBtn",onClick:f},{default:()=>[u("搜索")]}),d(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[u("重置")]})]})]})]})]),d("div",{class:["section-container"]},[d("div",{class:t.TrainDataTop},[d("div",{class:t.TrainDataTopLeft},[d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ee,{from:0,to:r.practiceUserCount},null)]),u("人")])]),d("p",{class:t.TrainDataItemsubTitle},[u("练习人数")])]),d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[se(r.practiceDurationAvg)>0?d("div",null,[d("span",null,[d(ee,{from:0,to:se(r.practiceDurationAvg)},null)]),u("时")]):null,se(r.practiceDurationAvg)>0||ne(r.practiceDurationAvg)>0?d("div",null,[d("span",null,[d(ee,{from:0,to:ne(r.practiceDurationAvg)},null)]),u("分")]):null,d("div",null,[d("span",null,[d(ee,{from:0,to:ie(r.practiceDurationAvg)},null)]),u("秒")])]),d("p",{class:t.TrainDataItemsubTitle},[u("平均每天练习时长")])]),d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[se(r.practiceDuration)>0?d("div",null,[d("span",null,[d(ee,{from:0,to:se(r.practiceDuration)},null)]),u("时")]):null,se(r.practiceDuration)>0||ne(r.practiceDuration)>0?d("div",null,[d("span",null,[d(ee,{from:0,to:ne(r.practiceDuration)},null)]),u("分")]):null,d("div",null,[d("span",null,[d(ee,{from:0,to:ie(r.practiceDuration)},null)]),u("秒")])]),d("p",{class:t.TrainDataItemsubTitle},[u("练习总时长")])]),d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ee,{from:0,to:r.evaluateUserCount},null),u("/"),d(ee,{from:0,to:r.evaluateFrequency},null)])])]),d("p",{class:t.TrainDataItemsubTitle},[u("评测人数/次数")])]),d("div",{class:t.TrainDataItem},[d("p",{class:t.TrainDataItemTitle},[d("div",null,[d("span",null,[d(ee,{from:0,to:r.publishUserCount},null),u("/"),d(ee,{from:0,to:r.publishCount},null)])])]),d("p",{class:t.TrainDataItemsubTitle},[u("作品人数/数量")])])]),d("div",{class:t.TrainDataTopRight},null)])]),d("div",{class:[t.tableWrap,t.noSort]},[d(y,{class:t.classTable,loading:a.loading,columns:z(),data:a.tableList,"onUpdate:sorter":O},{empty:()=>d(J,null,null)}),d(A,{page:a.pagination.page,"onUpdate:page":e=>a.pagination.page=e,pageSize:a.pagination.rows,"onUpdate:pageSize":e=>a.pagination.rows=e,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":e=>a.pagination.pageTotal=e,onList:S,sync:!0},null)])])}});e("default",r({name:"base-setting",setup(){const e=sessionStorage.getItem("classDetailTabs"),a=T(e||"afterWork");sessionStorage.removeItem("classDetailTabs");const r=s(),l=T([{name:"班级管理",path:"/classList"},{name:r.query.name,path:"/classDetail"}]);X((e=>{e.form.tabName&&(a.value=e.form.tabName)}));const n=T();return(async()=>{try{const e=r.query.id,{data:a}=await V({id:e});n.value=a.upgradeFlag?1:0}catch{}})(),c((()=>{e&&(a.value=e)})),M((()=>{const e=sessionStorage.getItem("classDetailTabs");e&&(a.value=e)})),()=>d("div",null,[d(U,{list:l.value},null),d("div",{class:[t.listWrap,t.infoListWrap]},[d(z,{class:t.customTabs,value:a.value,"onUpdate:value":[e=>a.value=e,e=>(e=>{Q(e,"tabName",r)})(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(O,{name:"afterWork",tab:"课后作业"},{default:()=>[d(Ye,{upgradeFlag:n.value},null)]}),d(O,{name:"practice",tab:"学练记录"},{default:()=>[d(Ee,null,null)]}),d(O,{name:"attendclass",tab:"上课记录"},{default:()=>[d(Ae,null,null)]}),d(O,{name:"student",tab:"学员名单"},{default:()=>[d(Se,{upgradeFlag:n.value},null)]})]})])])}}))}}}));
|