1 |
- import{s as c}from"./index.module-f5d3eb8e-1734950731618.js";import{d as N,b as se,a as U,u as H,e as S,A as re,q as E,f as e,N as G,g as b,y as L,x as I,j as T,k as p,aG as Q,l as M,m as A,V as q,F as w,r as B,E as le,w as de,Q as F,aJ as pe,aK as me,aL as ge,c as fe,aM as he,aN as ye,D as ve,L as Te,aB as be,aC as K,B as De,t as Fe,v as O}from"./index-efb66432-1734950731618.js";import{C as Ce}from"./index-4b5fede7-1734950731618.js";import{S as ne}from"./index-7f4ffec0-1734950731618.js";import{C as x}from"./index-c7074e8f-1734950731618.js";import{P as W}from"./index-4013b1bc-1734950731618.js";import{h as we,i as Se,j as Ie,k as ke,l as Le,m as Ne,n as Ee}from"./api-23af9df8-1734950731618.js";import{T as Y}from"./index-043f1db0-1734950731618.js";import{U as Be}from"./index-bce99ac8-1734950731618.js";import{i as z,s as k,g as _e,a as Me}from"./use-async-65954bcc-1734950731618.js";import{C as X}from"./index-6c0d6268-1734950731618.js";import{T as ie,a as Ae,S as xe,b as Ue}from"./index-5fd713bb-1734950731618.js";import{d as oe}from"./teacherIcon-b8e3946d-1734950731618.js";import{e as ue}from"./contants-84ba384e-1734950731618.js";import{N as ce}from"./Scrollbar-10f58cff-1734950731618.js";import{g as $,a as j,b as P,i as J,c as ee,d as te,f as Ye,N as _,e as V,h as ae,j as Re}from"./icon-sort-asc-a578314f-1734950731618.js";import{r as Oe,s as qe}from"./api-5c1c8c26-1734950731618.js";import{a as $e}from"./api-50208da3-1734950731618.js";import"./api-5d798bfa-1734950731618.js";import"./contants-057fb90d-1734950731618.js";import"./index-1071cbc8-1734950731618.js";import"./Slider-f8e18c57-1734950731618.js";import"./urlUtils-7f82c85e-1734950731618.js";import"./index-b40f8126-1734950731618.js";import"./icon_default-d1bcaf5f-1734950731618.js";import"./useSpeak-591a8844-1734950731618.js";import"./api-9f0dec79-1734950731618.js";import"./icon-pan-16e35a82-1734950731618.js";import"./api-d3492aaa-1734950731618.js";import"./index-80ba3b64-1734950731618.js";import"./catchData-e017bf09-1734950731618.js";import"./index-5585b177-1734950731618.js";import"./index-4064e060-1734950731618.js";const je=N({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(m){const h=se(),l=U(),t=H(),n=S({upgradeFlag:m.upgradeFlag==0,searchForm:{keyword:"",gender:"",membership:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],editStatus:!1,activeRow:{}});re(()=>m.upgradeFlag,()=>{n.upgradeFlag=m.upgradeFlag==0});const v=()=>{n.pagination.page=1,o(),k({current:n.searchForm,saveKey:"classDetailStudent"})},g=()=>{n.searchForm={keyword:"",gender:"",membership:""},v(),k({current:n.searchForm,saveKey:"classDetailStudent"})},o=async()=>{n.loading=!0;try{const a=await we({classGroupId:l.query.id,...n.searchForm,...n.pagination});n.tableList=a.data.rows,n.pagination.pageTotal=a.data.total,n.loading=!1}catch(a){n.loading=!1,console.log(a)}};z({current:n.searchForm,saveKey:"classDetailStudent",callBack:a=>{n.searchForm=a}}),E(()=>{o()});const u=a=>{const d=document.createElement("input");d.value=a,document.body.appendChild(d),d.select(),d.setSelectionRange(0,d.value.length),document.execCommand("Copy"),document.body.removeChild(d),h.success("复制成功")},s=a=>{t.push({path:"/classStudentDetail",query:{...l.query,studentId:a.id,studentName:a.nickname,upgradeFlag:n.upgradeFlag?0:1}})},f=()=>[{title:"学生姓名",key:"nickname",render:a=>e(q,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>u(a.nickname)},[a.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:a=>e(q,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>u(a.phone)},[a.phone]),default:"点击复制"})},{title:"性别",key:"gender",render(a){return e(w,null,[a.gender+""!="null"?a.gender=="0"?"女":"男":"--"])}},{title:"学生类型",key:"vipMember",render(a){return e(w,null,[a.vipMember?"会员":"普通"])}},{title:"操作",key:"id",render(a){return e(I,null,{default:()=>[e(T,{text:!0,type:"primary",onClick:()=>s(a)},{default:()=>[p("详情")]}),e(T,{text:!0,type:"primary",onClick:()=>i(a),disabled:a.historyClassStudent},{default:()=>[p("修改")]})]})}}],i=a=>{n.editStatus=!0,n.activeRow=a};return()=>e("div",null,[e("div",{class:c.searchList},[e(G,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(ne,L({placeholder:"请输入学生姓名"},{class:c.searchInput,searchWord:n.searchForm.keyword,onChangeValue:a=>n.searchForm.keyword=a}),null)]}),e(b,null,{default:()=>[e(x,L({options:[{label:"全部性别",value:""},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:n.searchForm.gender,"onUpdate:value":a=>n.searchForm.gender=a}),null)]}),e(b,null,{default:()=>[e(x,L({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:n.searchForm.membership,"onUpdate:value":a=>n.searchForm.membership=a}),null)]}),e(b,null,{default:()=>[e(I,{justify:"end"},{default:()=>[e(T,{type:"primary",class:"searchBtn",onClick:v},{default:()=>[p("搜索")]}),e(T,{type:"primary",ghost:!0,class:"resetBtn",onClick:g},{default:()=>[p("重置")]})]})]})]})]),e("div",{class:c.tableWrap},[e(Q,{class:c.classTable,loading:n.loading,columns:f(),data:n.tableList},{empty:()=>e(Y,null,null)}),e(W,{page:n.pagination.page,"onUpdate:page":a=>n.pagination.page=a,pageSize:n.pagination.rows,"onUpdate:pageSize":a=>n.pagination.rows=a,pageTotal:n.pagination.pageTotal,"onUpdate:pageTotal":a=>n.pagination.pageTotal=a,onList:o,sync:!0},null)]),e(M,{maskClosable:A,show:n.editStatus,"onUpdate:show":a=>n.editStatus=a,class:["modalTitle background",c.updateStudent],preset:"card",title:"修改信息"},{default:()=>[e(Be,{onClose:()=>n.editStatus=!1,onConfirm:()=>o(),row:n.activeRow},null)]})])}}),Ge=N({props:{activeRow:{type:Object,default:()=>({id:""})},total:{type:Number,default:0},current:{type:Number,default:0}},name:"classTrainingDetails",emits:["close"],setup(m,{emit:h,expose:l}){const t=B(!1),n=B({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]}),v=(o,u)=>{let s=[];return o==="EVALUATION"?s=["".concat(ue[u.evaluateDifficult]),u.practiceChapterBegin||u.practiceChapterEnd?"".concat(u.practiceChapterBegin,"-").concat(u.practiceChapterEnd,"小节"):"全部小节","".concat(u.trainingTimes,"分达标")]:s=["".concat(u.practiceChapterBegin,"-").concat(u.practiceChapterEnd,"小节"),"速度".concat(u.practiceSpeed),"".concat(u.trainingTimes,"分钟")],s},g=async o=>{t.value=!0;try{const u=await Se({trainingId:o}),s=u.data.studentLessonTrainingDetails.map(f=>{const i=v(f.trainingType,JSON.parse(f.trainingContent));return{...f,coverImg:f.titleImg,allTimes:JSON.parse(f.trainingContent).trainingTimes,typeList:i||[]}});n.value={...u.data,studentLessonTrainingDetails:s}}catch(u){console.log(u)}t.value=!1};return l({getTrainingDetail:g}),E(()=>{g(m.activeRow.id)}),()=>e("div",{class:[c.trainingDetails]},[e(le,{show:t.value},{default:()=>[e("div",{class:c.studentList},[e("div",{class:c.studentHeaderWrap},[e("div",{class:c.studentHeader},[e("div",{class:c.studentHeaderBorder},[e(de,{class:c.studentHeaderImg,src:n.value.teacherAvatar?n.value.teacherAvatar:oe,previewDisabled:!0},null)])]),e("div",{class:c.workafterInfo},[e("h4",null,[n.value.teacherName," ",e("div",{class:[c.workafterInfoDot,c.workafterTeacherInfoDot]},[p("老师")])]),e("p",null,[p("开始时间:"),n.value.createTime?F(new Date(n.value.createTime)).format("YYYY-MM-DD"):"--"," ",p("| 结束时间:"),n.value.expireDate?F(new Date(n.value.expireDate)).format("YYYY-MM-DD"):"--"])])])]),e(ce,{style:"max-height:400px",trigger:"none"},{default:()=>[e("div",{class:c.workList},[n.value.studentLessonTrainingDetails.map(o=>e(ie,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isLarge:!0,isCLassWork:!0,item:o},null))])]})]})])}}),We="_trainSettings_qodsv_1",ze="_trainBtnGroup_qodsv_1",Ke="_searchGroup_qodsv_9",Ve="_datetime_qodsv_13",Pe="_trainList_qodsv_43",He="_listSection_qodsv_48",Qe="_emptySection_qodsv_51",Xe="_list_qodsv_48",Ze="_trainEditModal_qodsv_69",Je="_selectMusicModal_qodsv_72",C={trainSettings:We,trainBtnGroup:ze,searchGroup:Ke,datetime:Ve,trainList:Pe,listSection:He,emptySection:Qe,list:Xe,trainEditModal:Ze,selectMusicModal:Je},et=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(m,{emit:h}){const l=se(),t=S({type:"add",btnLoading:!1,loadingStatus:!1,editStatus:!1,editItem:{},selectMusicStatus:!1,trainList:[],currentTime:F(F().format("YYYY-MM-DD")).valueOf(),expireDate:F().add(7,"day").format("YYYY-MM-DD")}),n=async()=>{t.loadingStatus=!0;try{const{data:i}=await Oe({coursewareKnowledgeDetailId:m.detailId,subjectId:m.subjectId,page:1,rows:99}),a=i.rows||[],d=[];a.forEach(y=>{const r=v(y.trainingType,y.trainingConfigJson);d.push({typeList:r||[],...y})}),t.trainList=d||[]}catch(i){}t.loadingStatus=!1},v=(i,a)=>{let d=[];return i==="EVALUATION"?d=["".concat(ue[a.evaluateDifficult]),a.practiceChapterBegin||a.practiceChapterEnd?"".concat(a.practiceChapterBegin,"-").concat(a.practiceChapterEnd,"小节"):"全部小节","".concat(a.trainingTimes,"分达标")]:d=["".concat(a.practiceChapterBegin,"-").concat(a.practiceChapterEnd,"小节"),"速度".concat(a.practiceSpeed),"".concat(a.trainingTimes,"分钟")],d},g=async i=>{var y;let a="init",d=null;try{const r=await me.get(i.xmlFileUrl,{mode:"cors"});d=(y=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("part")[0])==null?void 0:y.getElementsByTagName("measure"),a="success"}catch(r){a="error"}a=="success"?i.practiceChapterMax=d.length:i.practiceChapterMax=0,i.coursewareKnowledgeDetailId=m.detailId,i.subjectId=m.subjectId,t.editItem=i,t.editStatus=!0},o=S({show:!1,msg:"",confirmButtonText:"",cancelBtn:!1,type:"CLASS"});function u(i){const{type:a,errList:d}=i;if(o.type=a,a==="CLASS"){o.cancelBtn=!0,o.confirmButtonText="去设置";const y=d.map(r=>'<div><span style="color:#F44541">【'.concat(r.classGroupName,"】</span>未设置乐器,请设置乐器后布置作业").concat(d.length>1?";":"","</div>"));o.msg=y.join("")}else if(a==="PERSON"){o.cancelBtn=!0,o.confirmButtonText="去设置";const y=d.map(r=>'<div><span style="color:#F44541">【'.concat(r.studentName,'】</span>所在<span style="color:#F44541">【').concat(r.classGroupName,"】</span>未设置乐器,请设置乐器后布置作业").concat(d.length>1?";":"","</div>"));o.msg=y.join("")}else if(a==="MUSIC"){o.cancelBtn=!1,o.confirmButtonText="我知道了";const y=d.map(r=>'<div>曲目<span style="color:#F44541">【'.concat(r.musicSheetName,'】</span>不支持<span style="color:#F44541">【').concat(r.instrumentName,'】</span>练习,请更换曲目或取消<span style="color:#F44541">【').concat(r.instrumentName,"】</span>的学生").concat(d.length>1?";":"","</div>"));o.msg=y.join("")}o.show=!0}function s(){["CLASS","PERSON"].includes(o.type)?ge.push({path:"/classList"}):o.type==="MUSIC"&&(o.show=!1)}const f=async()=>{if(!t.expireDate){l.error("请选择截止日期");return}if(t.trainList.length<=0){l.error("训练内容不能为空");return}t.btnLoading=!0;try{const i=t.trainList||[],a=[];i.forEach(r=>{a.push({trainingType:r.trainingType,musicId:r.musicId,trainingConfigJsonObject:r.trainingConfigJson})});const d={lessonTrainingDetails:a,expireDate:t.expireDate+" 23:59:59",classGroupId:m.classGroupId,courseScheduleId:m.courseScheduleId||null},y=await qe(d);y.code===200&&(y.data.status?(l.success("布置成功"),h("close"),h("confirm")):u(y.data))}catch(i){}t.btnLoading=!1};return E(()=>{m.detailId&&m.subjectId&&n()}),()=>e("div",{class:C.trainSettings},[e("div",{class:C.searchGroup},[e(T,{onClick:()=>{t.selectMusicStatus=!0,t.type="add"}},{default:()=>[p("添加作业")]}),e("div",{class:C.datetime},[e("label",null,[p("截止时间:")]),e(pe,{style:{width:"200px"},placeholder:"请选择截止日期","formatted-value":t.expireDate,"onUpdate:formatted-value":i=>t.expireDate=i,type:"date",valueFormat:"yyyy-MM-dd",isDateDisabled:i=>i<t.currentTime},null)])]),e(ce,{class:C.trainList},{default:()=>[e(le,{show:t.loadingStatus},{default:()=>[e("div",{class:[C.listSection,!t.loadingStatus&&t.trainList.length<=0?C.emptySection:""]},[t.trainList.length>0&&e("div",{class:C.list},[t.trainList.map((i,a)=>e(ie,{item:i,type:"homework",onEdit:d=>{const{trainingConfigJson:y,id:r,musicId:R,...Z}=d;t.editItem={...Z,id:R,trainId:r,...y},console.log(t.editItem),t.type="update",t.editStatus=!0},onDelete:()=>{t.trainList.splice(a,1)}},null))]),!t.loadingStatus&&t.trainList.length<=0&&e(Y,{description:"暂无作业"},null)])]})]}),e(I,{class:C.trainBtnGroup},{default:()=>[e(T,{strong:!0,type:"default",round:!0,onClick:()=>h("close")},{default:()=>[p("取消布置")]}),e(T,{strong:!0,type:"primary",round:!0,disabled:t.trainList.length<=0,onClick:f},{default:()=>[p("立即布置")]})]}),e(M,{maskClosable:A,show:t.editStatus,"onUpdate:show":i=>t.editStatus=i,class:["modalTitle background",C.trainEditModal],preset:"card",title:"作业设置"},{default:()=>[e(Ae,{item:t.editItem,type:"homework",onClose:()=>t.editStatus=!1,onConfirm:i=>{console.log(i,"update",t);const a=v(i.trainingType,i.trainingConfigJson);t.type==="update"?t.trainList.forEach(d=>{d.id===i.id&&(d.trainingType=i.trainingType,d.trainingConfigJson=i.trainingConfigJson,d.typeList=a)}):t.trainList.push({...i,id:+new Date,musicName:t.editItem.title,typeList:a}),t.editItem={}}},null)]}),e(M,{maskClosable:A,show:t.selectMusicStatus,"onUpdate:show":i=>t.selectMusicStatus=i,class:["modalTitle",C.selectMusicModal],preset:"card",title:"选择曲目"},{default:()=>[e(xe,{type:"homework",onAdd:i=>{t.selectMusicStatus=!1,g(i)}},null)]}),e(Ue,{show:o.show,content:o.msg,onClose:()=>{o.show=!1},onConfirm:s,cancelButtonText:"暂不设置",cancelBtn:o.cancelBtn,confirmButtonText:o.confirmButtonText},null)])}}),tt=N({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(m){const h=H(),l=U(),t=S({upgradeFlag:m.upgradeFlag==0,searchForm:{status:"",timer:[$(new Date().getTime()),j(new Date().getTime())]},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1});re(()=>m.upgradeFlag,()=>{t.upgradeFlag=m.upgradeFlag==0});const n=()=>{t.pagination.page=1,g(),k({current:t.searchForm,saveKey:"classDetailAfterWork"})},v=()=>{t.searchForm={status:"",timer:[$(new Date().getTime()),j(new Date().getTime())]},n(),k({current:t.searchForm,saveKey:"classDetailAfterWork"})};z({current:t.searchForm,saveKey:"classDetailAfterWork",callBack:s=>{t.searchForm=s}});const g=async()=>{t.loading=!0;try{const{timer:s,...f}=t.searchForm,i=await Ie({classGroupId:l.query.id,...f,...t.pagination,...P(s,["startTime","endTime"],"YYYY-MM-DD")});t.tableList=i.data.rows,t.pagination.pageTotal=i.data.total,t.loading=!1}catch(s){t.loading=!1,console.log(s)}};E(()=>{g()});const o=()=>[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render(s){return e(w,null,[s.createTime])}},{title:"截止时间",key:"expireDate",render(s){return e(w,null,[s.expireDate])}},{title:"作业状态",key:"status",render(s){return s.status?e("div",{class:c.endDot},[e("span",null,null),p("已结束")]):e("div",{class:c.indDot},[e("span",null,null),p(" 进行中")])}},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"达标人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render(s){return e(w,null,[s.trainingRate,p("%")])}},{title:"达标率",key:"qualifiedRate",render(s){return e(w,null,[s.qualifiedRate,p("%")])}},{title:"操作",key:"id",render(s){return e(I,null,{default:()=>[e(T,{text:!0,type:"primary",onClick:()=>u(s)},{default:()=>[p("详情")]})]})}}],u=s=>{h.push({path:"/afterWorkDetail",query:{...l.query,classGroupId:l.query.id,teacherName:s.teacherName,trainingId:s.id}})};return()=>e("div",null,[e("div",{class:c.searchList},[e(G,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(X,{value:t.searchForm.timer,"onUpdate:value":s=>t.searchForm.timer=s,separator:"至",type:"daterange",timerValue:t.searchForm.timer},null)]}),e(b,null,{default:()=>[e(x,L({options:[{label:"全部状态",value:""},{label:"已结束",value:1},{label:"进行中",value:0}],placeholder:"作业状态",clearable:!0,inline:!0},{value:t.searchForm.status,"onUpdate:value":s=>t.searchForm.status=s}),null)]}),e(b,null,{default:()=>[e(I,{justify:"end"},{default:()=>[e(T,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[p("搜索")]}),e(T,{type:"primary",ghost:!0,class:"resetBtn",onClick:v},{default:()=>[p("重置")]})]})]})]})]),e("div",{class:c.tableWrap},[e(Q,{class:c.classTable,loading:t.loading,columns:o(),data:t.tableList},{empty:()=>e(Y,null,null)}),e(W,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":s=>t.pagination.pageTotal=s,onList:g,sync:!0},null)]),e(M,{maskClosable:A,show:t.addWorkVisible,"onUpdate:show":s=>t.addWorkVisible=s,preset:"card",class:[c.attendClassModal,c.trainClassModal],title:"作业设置"},{default:()=>[e(et,{classGroupId:l.query.id,onClose:()=>{g(),t.addWorkVisible=!1}},null)]}),e(M,{maskClosable:A,show:t.detailVisiable,"onUpdate:show":s=>t.detailVisiable=s,preset:"card",class:["modalTitle background",c.wordDetailModel],title:"作业详情"},{default:()=>[e(Ge,{onClose:()=>t.detailVisiable=!1,activeRow:t.activeRow},null)]})])}}),at="_tableSpace_z26wb_1",st="_tableContainer_z26wb_4",rt="_header_z26wb_10",lt="_time_z26wb_20",nt="_ntag_z26wb_25",it="_content_z26wb_33",ot="_navatar_z26wb_38",ut="_userInfo_z26wb_51",ct="_subjectName_z26wb_65",dt="_nowmpty_z26wb_74",D={tableSpace:at,tableContainer:st,header:rt,time:lt,ntag:nt,content:it,navatar:ot,userInfo:ut,subjectName:ct,nowmpty:dt};function pt(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!ve(m)}const mt=N({name:"class-record",setup(){const m=fe(),h=U(),l=()=>{const u=h.query.gradeYear;if(u){const s="".concat(u,"-9-1"),f="".concat(Number(u)+1,"-8-31");return[F(s).valueOf(),F(f).valueOf()]}else{const s=F().format("YYYY-MM-DD");return[F(s).subtract(1,"month").valueOf(),F(s).valueOf()]}},t=S({searchForm:{teacherId:"",createTimer:l()},teacherList:[],loading:!1,pagination:{page:1,rows:12,pageTotal:0},tableList:[]}),n=()=>{t.pagination.page=1,g(),k({current:t.searchForm,saveKey:"classDetailRecord"})},v=()=>{t.searchForm={teacherId:"",createTimer:l()},n(),k({current:t.searchForm,saveKey:"classDetailRecord"})};z({current:t.searchForm,saveKey:"classDetailRecord",callBack:u=>{t.searchForm=u}});const g=async()=>{t.loading=!0;try{const{data:u}=await ke({classGroupId:h.query.id,teacherId:t.searchForm.teacherId,...Te(t.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...t.pagination}),s=u.rows||[];s.forEach(f=>{f.lessonCourseware=f.lessonCoursewareJson?JSON.parse(f.lessonCoursewareJson):{}}),t.tableList=s,t.pagination.pageTotal=u.total,t.loading=!1}catch(u){t.loading=!1}},o=async()=>{var u,s;try{const{data:f}=await $e({schoolId:(s=(u=m.info.schoolInfos)==null?void 0:u[0])==null?void 0:s.id,page:1,rows:1e3}),i=f.rows||[],a=[];i.forEach(d=>{a.push({label:d.nickname,value:d.id})}),t.teacherList=a}catch(f){}};return E(()=>{o(),g()}),()=>{let u;return e("div",null,[e("div",{class:D.searchList},[e(G,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(x,L({options:[{label:"全部老师",value:""},...t.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:t.searchForm.teacherId,"onUpdate:value":s=>t.searchForm.teacherId=s}),null)]}),e(b,null,{default:()=>[e(X,{value:t.searchForm.createTimer,"onUpdate:value":s=>t.searchForm.createTimer=s,timerValue:t.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),e(b,null,{default:()=>[e(I,{justify:"end"},{default:()=>[e(T,{type:"primary",class:"searchBtn",onClick:n},{default:()=>[p("搜索")]}),e(T,{type:"primary",ghost:!0,class:"resetBtn",onClick:v},{default:()=>[p("重置")]})]})]})]})]),e("div",{class:D.tableWrap},[e(I,{class:D.tableSpace},pt(u=t.tableList.map(s=>e("div",{class:D.tableContainer},[e("div",{class:D.header},[e("div",{class:D.time},[F(s.startTime).format("YYYY-MM-DD HH:mm")]),h.query.name&&e(he,{type:"primary",class:D.ntag,strong:!0},{default:()=>[h.query.name]})]),e("div",{class:D.content},[e(ye,{class:D.navatar,round:!0,src:s.teacherAvatar||oe},null),e("div",{class:D.userInfo},[e("h2",null,[s.teacherName]),e("p",null,[s.subjectName&&e("span",{class:D.subjectName},[s.subjectName]),s.lessonCourseware.lessonCoursewareName,p(" |")," ",s.lessonCourseware.lessonCoursewareDetailName,p("|")," ",s.lessonCourseware.lessonCoursewareKnowledgeDetailName,p("| "),s.useChapterLessonCoursewareName])])])])))?u:{default:()=>[u]}),t.tableList.length>0&&e(W,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":s=>t.pagination.pageTotal=s,onList:g,pageSizes:[12,24,36,48],sync:!0,saveKey:"classRecord-key"},null),t.tableList.length<=0&&e(Y,{class:D.nowEmpty},null)])])}}}),gt=N({name:"student-studentList",setup(m,{emit:h}){const l=S({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}),t=U(),n=H(),v=()=>{l.pagination.page=1,s(),u(),k({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord"})},g=B([$(new Date().getTime()),j(new Date().getTime())]),o=()=>{g.value=[$(new Date().getTime()),j(new Date().getTime())],l.searchForm={ase:0,sortType:1,keyword:"",trainingStatus:null,vipFlag:""},v(),k({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord"})};z({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord",callBack:r=>{l.searchForm=r,g.value=r.timer}});const u=async()=>{l.loading=!0;try{const r=await Le({classGroupId:t.query.id,...l.searchForm,...l.pagination,...P(g.value,["startTime","endTime"],"YYYY-MM-DD")});l.tableList=r.data.rows,l.pagination.pageTotal=r.data.total,l.loading=!1}catch(r){l.loading=!1,console.log(r)}},s=async()=>{try{const r=await Ne({classGroupId:t.query.id,...P(g.value,["startTime","endTime"],"YYYY-MM-DD")});l.testInfo.practiceDurationAvg=r.data.practiceDurationAvg,l.testInfo.practiceUserCount=r.data.practiceUserCount,l.testInfo.vipUserCount=r.data.vipUserCount}catch(r){console.log(r)}};E(()=>{s(),u()});const f=r=>{n.push({path:"/classStudentRecode",query:{...t.query,studentId:r.studentId,studentName:r.studentName}})},i=S({title(){return e(q,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:c.cell},[p("练习天数"),e("img",{class:c.sortIcon,src:i.sortOrder==="descend"?J:i.sortOrder==="ascend"?ee:te},null)]),default:i.sortOrder==="descend"?"点击升序":i.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDays",sorter:!0,sortOrder:!1,render(r){return e(w,null,[r.practiceDays?r.practiceDays:0,p("天")])}}),a=S({title(){return e(q,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:c.cell},[p("学练时长"),e("img",{class:c.sortIcon,src:a.sortOrder==="descend"?J:a.sortOrder==="ascend"?ee:te},null)]),default:a.sortOrder==="descend"?"点击升序":a.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDuration",sorter:!0,sortOrder:!1,render(r){return e(w,null,[r.practiceDuration?Ye(r.practiceDuration,1):"0秒"])}}),d=()=>[{title:"学生姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},{title:"性别",key:"sex",render(r){return e(w,null,[r.gender+""!="null"?r.gender=="0"?"女":"男":"--"])}},{title:"学生类型",key:"studentType",render(r){return e(w,null,[r.vipFlag?"会员":"普通"])}},i,a,{title:"操作",key:"id",render(r){return e(T,{text:!0,type:"primary",onClick:()=>{f(r)}},{default:()=>[p("详情")]})}}],y=r=>{if(!r)l.searchForm.ase=0,l.searchForm.sortType=1,i.sortOrder=!1,a.sortOrder=!1;else{const R={practiceDuration:1,practiceDays:2};l.searchForm.sortType=R[r.columnKey],r.columnKey=="practiceDuration"&&(a.sortOrder=r.order,i.sortOrder=!1),r.columnKey=="practiceDays"&&(i.sortOrder=r.order,a.sortOrder=!1),l.searchForm.ase=r.order=="ascend"?1:0}u()};return()=>e("div",null,[e("div",{class:c.searchList},[e(G,{"label-placement":"left",inline:!0},{default:()=>[e(b,null,{default:()=>[e(ne,L({placeholder:"请输入学生姓名"},{class:c.searchInput,searchWord:l.searchForm.keyword,onChangeValue:r=>l.searchForm.keyword=r}),null)]}),e(b,null,{default:()=>[e(x,L({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:l.searchForm.vipFlag,"onUpdate:value":r=>l.searchForm.vipFlag=r}),null)]}),e(b,null,{default:()=>[e(X,{value:g.value,"onUpdate:value":r=>g.value=r,separator:"至",type:"daterange",timerValue:g.value},null)]}),e(b,null,{default:()=>[e(I,{justify:"end"},{default:()=>[e(T,{type:"primary",class:"searchBtn",onClick:v},{default:()=>[p("搜索")]}),e(T,{type:"primary",ghost:!0,class:"resetBtn",onClick:o},{default:()=>[p("重置")]})]})]})]})]),e("div",{class:["section-container"]},[e(be,{"x-gap":"12",cols:8},{default:()=>[e(K,null,{default:()=>[e("div",{class:c.TrainDataItem},[e("div",null,[e("p",{class:c.TrainDataItemTitle},[e("div",null,[e("span",null,[e(_,{from:0,to:l.testInfo.practiceUserCount},null)])," ",p("人")])])]),e("p",{class:c.TrainDataItemsubTitle},[p("练习人数")])])]}),e(K,null,{default:()=>[e("div",{class:c.TrainDataItem},[e("p",{class:c.TrainDataItemTitle},[e("div",null,[e("span",null,[e(_,{from:0,to:l.testInfo.vipUserCount},null)])," ",p("人")])]),e("p",{class:c.TrainDataItemsubTitle},[p("会员人数")])])]}),e(K,null,{default:()=>[e("div",{class:c.TrainDataItem},[e("p",{class:c.TrainDataItemTitle},[V(l.testInfo.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(_,{from:0,to:V(l.testInfo.practiceDurationAvg)},null)]),e("i",{style:{width:"4px",display:"inline-block"}},null),p("时"),e("i",{style:{width:"4px",display:"inline-block"}},null)]):null,V(l.testInfo.practiceDurationAvg)>0||ae(l.testInfo.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(_,{from:0,to:ae(l.testInfo.practiceDurationAvg)},null)])," ",p("分")]):null,e("div",null,[e("span",null,[e(_,{from:0,to:Re(l.testInfo.practiceDurationAvg)},null)])," ",p("秒")])]),e("p",{class:c.TrainDataItemsubTitle},[p("平均每天练习时长")])])]})]})]),e("div",{class:[c.tableWrap,c.noSort]},[e(Q,{class:c.classTable,loading:l.loading,columns:d(),data:l.tableList,"onUpdate:sorter":y},{empty:()=>e(Y,null,null)}),e(W,{page:l.pagination.page,"onUpdate:page":r=>l.pagination.page=r,pageSize:l.pagination.rows,"onUpdate:pageSize":r=>l.pagination.rows=r,pageTotal:l.pagination.pageTotal,"onUpdate:pageTotal":r=>l.pagination.pageTotal=r,onList:u,sync:!0},null)])])}}),Pt=N({name:"base-setting",setup(){const m=sessionStorage.getItem("classDetailTabs"),h=B(m||"student");sessionStorage.removeItem("classDetailTabs");const l=U(),t=B([{name:"班级管理",path:"/classList"},{name:l.query.name,path:"/classDetail"}]);_e(o=>{o.form.tabName&&(h.value=o.form.tabName)});const n=o=>{Me(o,"tabName",l)},v=B();return(async()=>{try{const o=l.query.id,{data:u}=await Ee({id:o});v.value=u.upgradeFlag?1:0}catch(o){}})(),E(()=>{m&&(h.value=m)}),De(()=>{const o=sessionStorage.getItem("classDetailTabs");o&&(h.value=o)}),()=>e("div",null,[e(Ce,{list:t.value},null),e("div",{class:[c.listWrap,c.infoListWrap]},[e(Fe,{class:c.customTabs,value:h.value,"onUpdate:value":[o=>h.value=o,o=>n(o)],size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[e(O,{name:"student",tab:"学员名单"},{default:()=>[e(je,{upgradeFlag:v.value},null)]}),e(O,{name:"afterWork",tab:"课后作业"},{default:()=>[e(tt,{upgradeFlag:v.value},null)]}),e(O,{name:"practice",tab:"练习记录"},{default:()=>[e(gt,null,null)]}),e(O,{name:"attendclass",tab:"上课记录"},{default:()=>[e(mt,null,null)]})]})])])}});export{Pt as default};
|