1 |
- import{s as c}from"./index.module-7d86a2ea-1726219372904.js";import{d as N,b as se,a as U,u as Q,e as S,A as re,q as E,f as e,N as W,g as D,y as L,x as I,j as T,k as p,aG as X,l as _,m as M,V as $,F as w,r as B,E as le,w as de,Q as C,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 De,aC as V,B as be,t as Ce,v as R}from"./index-1ec0a32d-1726219372904.js";import{C as Fe}from"./index-fc860229-1726219372904.js";import{S as ne}from"./index-965f51af-1726219372904.js";import{C as A}from"./index-c5832142-1726219372904.js";import{P as z}from"./index-be61723a-1726219372904.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-0e5ba9bf-1726219372904.js";import{T as x}from"./index-2727764b-1726219372904.js";import{U as Be}from"./index-84ea3196-1726219372904.js";import{i as K,s as k,g as _e,a as Me}from"./use-async-9f56226e-1726219372904.js";import{C as Z}from"./index-6fc10175-1726219372904.js";import{T as ie,a as Ae,S as Ue,b as xe}from"./index-20e23818-1726219372904.js";import{d as oe}from"./teacherIcon-b8e3946d-1726219372904.js";import{e as ue}from"./contants-32f8b17d-1726219372904.js";import{N as ce}from"./Scrollbar-c3ae1e59-1726219372904.js";import{g as j,a as G,b as H,c as O,d as P,N as q}from"./dateFormat-0341fa65-1726219372904.js";import{o as Ye,p as Re}from"./api-9de750df-1726219372904.js";import{a as Oe}from"./api-ad99a2a4-1726219372904.js";import{i as ee,a as te,b as ae}from"./icon-sort-asc-1f640ab4-1726219372904.js";import"./api-b3e2f6f8-1726219372904.js";import"./contants-fa54933f-1726219372904.js";import"./index-d4bfaa45-1726219372904.js";import"./Slider-bd832880-1726219372904.js";import"./urlUtils-72ef455d-1726219372904.js";import"./index-b48cb97f-1726219372904.js";import"./icon_default-d1bcaf5f-1726219372904.js";import"./useSpeak-0792de8d-1726219372904.js";import"./api-da5bf64f-1726219372904.js";import"./icon-pan-16e35a82-1726219372904.js";import"./api-f5057ed1-1726219372904.js";import"./index-446e8014-1726219372904.js";import"./catchData-04337fe1-1726219372904.js";import"./index-ff9a89ac-1726219372904.js";import"./index-29523425-1726219372904.js";const qe=N({name:"student-studentList",props:{upgradeFlag:{type:Number}},setup(m){const h=se(),l=U(),t=Q(),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)}};K({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($,{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($,{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(W,{"label-placement":"left",inline:!0},{default:()=>[e(D,null,{default:()=>[e(ne,L({placeholder:"请输入学生姓名"},{class:c.searchInput,searchWord:n.searchForm.keyword,onChangeValue:a=>n.searchForm.keyword=a}),null)]}),e(D,null,{default:()=>[e(A,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(D,null,{default:()=>[e(A,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(D,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(X,{class:c.classTable,loading:n.loading,columns:f(),data:n.tableList},{empty:()=>e(x,null,null)}),e(z,{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(_,{maskClosable:M,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)]})])}}),$e=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?C(new Date(n.value.createTime)).format("YYYY-MM-DD"):"--"," ",p("| 结束时间:"),n.value.expireDate?C(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))])]})]})])}}),je="_trainSettings_qodsv_1",Ge="_trainBtnGroup_qodsv_1",We="_searchGroup_qodsv_9",ze="_datetime_qodsv_13",Ke="_trainList_qodsv_43",Ve="_listSection_qodsv_48",Pe="_emptySection_qodsv_51",He="_list_qodsv_48",Qe="_trainEditModal_qodsv_69",Xe="_selectMusicModal_qodsv_72",F={trainSettings:je,trainBtnGroup:Ge,searchGroup:We,datetime:ze,trainList:Ke,listSection:Ve,emptySection:Pe,list:He,trainEditModal:Qe,selectMusicModal:Xe},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(m,{emit:h}){const l=se(),t=S({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")}),n=async()=>{t.loadingStatus=!0;try{const{data:i}=await Ye({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 Re(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:F.trainSettings},[e("div",{class:F.searchGroup},[e(T,{onClick:()=>{t.selectMusicStatus=!0,t.type="add"}},{default:()=>[p("添加作业")]}),e("div",{class:F.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:F.trainList},{default:()=>[e(le,{show:t.loadingStatus},{default:()=>[e("div",{class:[F.listSection,!t.loadingStatus&&t.trainList.length<=0?F.emptySection:""]},[t.trainList.length>0&&e("div",{class:F.list},[t.trainList.map((i,a)=>e(ie,{item:i,type:"homework",onEdit:d=>{const{trainingConfigJson:y,id:r,musicId:Y,...J}=d;t.editItem={...J,id:Y,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(x,{description:"暂无作业"},null)])]})]}),e(I,{class:F.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(_,{maskClosable:M,show:t.editStatus,"onUpdate:show":i=>t.editStatus=i,class:["modalTitle background",F.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(_,{maskClosable:M,show:t.selectMusicStatus,"onUpdate:show":i=>t.selectMusicStatus=i,class:["modalTitle",F.selectMusicModal],preset:"card",title:"选择曲目"},{default:()=>[e(Ue,{type:"homework",onAdd:i=>{t.selectMusicStatus=!1,g(i)}},null)]}),e(xe,{show:o.show,content:o.msg,onClose:()=>{o.show=!1},onConfirm:s,cancelButtonText:"暂不设置",cancelBtn:o.cancelBtn,confirmButtonText:o.confirmButtonText},null)])}}),Je=N({name:"afterWork",props:{upgradeFlag:{type:Number}},setup(m){const h=Q(),l=U(),t=S({upgradeFlag:m.upgradeFlag==0,searchForm:{status:"",timer:[j(new Date().getTime()),G(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:[j(new Date().getTime()),G(new Date().getTime())]},n(),k({current:t.searchForm,saveKey:"classDetailAfterWork"})};K({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,...H(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(W,{"label-placement":"left",inline:!0},{default:()=>[e(D,null,{default:()=>[e(Z,{value:t.searchForm.timer,"onUpdate:value":s=>t.searchForm.timer=s,separator:"至",type:"daterange",timerValue:t.searchForm.timer},null)]}),e(D,null,{default:()=>[e(A,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(D,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(X,{class:c.classTable,loading:t.loading,columns:o(),data:t.tableList},{empty:()=>e(x,null,null)}),e(z,{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(_,{maskClosable:M,show:t.addWorkVisible,"onUpdate:show":s=>t.addWorkVisible=s,preset:"card",class:[c.attendClassModal,c.trainClassModal],title:"作业设置"},{default:()=>[e(Ze,{classGroupId:l.query.id,onClose:()=>{g(),t.addWorkVisible=!1}},null)]}),e(_,{maskClosable:M,show:t.detailVisiable,"onUpdate:show":s=>t.detailVisiable=s,preset:"card",class:["modalTitle background",c.wordDetailModel],title:"作业详情"},{default:()=>[e($e,{onClose:()=>t.detailVisiable=!1,activeRow:t.activeRow},null)]})])}}),et="_tableSpace_z26wb_1",tt="_tableContainer_z26wb_4",at="_header_z26wb_10",st="_time_z26wb_20",rt="_ntag_z26wb_25",lt="_content_z26wb_33",nt="_navatar_z26wb_38",it="_userInfo_z26wb_51",ot="_subjectName_z26wb_65",ut="_nowmpty_z26wb_74",b={tableSpace:et,tableContainer:tt,header:at,time:st,ntag:rt,content:lt,navatar:nt,userInfo:it,subjectName:ot,nowmpty:ut};function ct(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!ve(m)}const dt=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[C(s).valueOf(),C(f).valueOf()]}else{const s=C().format("YYYY-MM-DD");return[C(s).subtract(1,"month").valueOf(),C(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"})};K({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 Oe({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:b.searchList},[e(W,{"label-placement":"left",inline:!0},{default:()=>[e(D,null,{default:()=>[e(A,L({options:[{label:"全部老师",value:""},...t.teacherList],placeholder:"全部老师",clearable:!0,inline:!0},{value:t.searchForm.teacherId,"onUpdate:value":s=>t.searchForm.teacherId=s}),null)]}),e(D,null,{default:()=>[e(Z,{value:t.searchForm.createTimer,"onUpdate:value":s=>t.searchForm.createTimer=s,timerValue:t.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),e(D,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:b.tableWrap},[e(I,{class:b.tableSpace},ct(u=t.tableList.map(s=>e("div",{class:b.tableContainer},[e("div",{class:b.header},[e("div",{class:b.time},[C(s.startTime).format("YYYY-MM-DD HH:mm")]),h.query.name&&e(he,{type:"primary",class:b.ntag,strong:!0},{default:()=>[h.query.name]})]),e("div",{class:b.content},[e(ye,{class:b.navatar,round:!0,src:s.teacherAvatar||oe},null),e("div",{class:b.userInfo},[e("h2",null,[s.teacherName]),e("p",null,[s.subjectName&&e("span",{class:b.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(z,{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(x,{class:b.nowEmpty},null)])])}}}),pt=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=Q(),v=()=>{l.pagination.page=1,s(),u(),k({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord"})},g=B([j(new Date().getTime()),G(new Date().getTime())]),o=()=>{g.value=[j(new Date().getTime()),G(new Date().getTime())],l.searchForm={ase:0,sortType:1,keyword:"",trainingStatus:null,vipFlag:""},v(),k({current:{...l.searchForm,timer:g.value},saveKey:"classDetailTestRecord"})};K({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,...H(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,...H(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($,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:c.cell},[p("练习天数"),e("img",{class:c.sortIcon,src:i.sortOrder==="descend"?ee:i.sortOrder==="ascend"?te:ae},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($,{showArrow:!1,placement:"top-start"},{trigger:()=>e("div",{class:c.cell},[p("学练时长"),e("img",{class:c.sortIcon,src:a.sortOrder==="descend"?ee:a.sortOrder==="ascend"?te:ae},null)]),default:a.sortOrder==="descend"?"点击升序":a.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDuration",sorter:!0,sortOrder:!1,render(r){return e(w,null,[r.practiceDuration?O(r.practiceDuration)>0?O(r.practiceDuration)+"分"+P(r.practiceDuration)+"秒":P(r.practiceDuration)+"秒":"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 Y={practiceDuration:1,practiceDays:2};l.searchForm.sortType=Y[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(W,{"label-placement":"left",inline:!0},{default:()=>[e(D,null,{default:()=>[e(ne,L({placeholder:"请输入学生姓名"},{class:c.searchInput,searchWord:l.searchForm.keyword,onChangeValue:r=>l.searchForm.keyword=r}),null)]}),e(D,null,{default:()=>[e(A,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(D,null,{default:()=>[e(Z,{value:g.value,"onUpdate:value":r=>g.value=r,separator:"至",type:"daterange",timerValue:g.value},null)]}),e(D,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(De,{"x-gap":"12",cols:8},{default:()=>[e(V,null,{default:()=>[e("div",{class:c.TrainDataItem},[e("div",null,[e("p",{class:c.TrainDataItemTitle},[e("div",null,[e("span",null,[e(q,{from:0,to:l.testInfo.practiceUserCount},null)])," ",p("人")])])]),e("p",{class:c.TrainDataItemsubTitle},[p("练习人数")])])]}),e(V,null,{default:()=>[e("div",{class:c.TrainDataItem},[e("p",{class:c.TrainDataItemTitle},[e("div",null,[e("span",null,[e(q,{from:0,to:l.testInfo.vipUserCount},null)])," ",p("人")])]),e("p",{class:c.TrainDataItemsubTitle},[p("会员人数")])])]}),e(V,null,{default:()=>[e("div",{class:c.TrainDataItem},[e("p",{class:c.TrainDataItemTitle},[O(l.testInfo.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(q,{from:0,to:O(l.testInfo.practiceDurationAvg)},null)])," ",p("分")]):null,e("div",null,[e("span",null,[e(q,{from:0,to:P(l.testInfo.practiceDurationAvg)},null)])," ",p("秒")])]),e("p",{class:c.TrainDataItemsubTitle},[p("平均每天练习时长")])])]})]})]),e("div",{class:[c.tableWrap,c.noSort]},[e(X,{class:c.classTable,loading:l.loading,columns:d(),data:l.tableList,"onUpdate:sorter":y},{empty:()=>e(x,null,null)}),e(z,{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)])])}}),Vt=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)}),be(()=>{const o=sessionStorage.getItem("classDetailTabs");o&&(h.value=o)}),()=>e("div",null,[e(Fe,{list:t.value},null),e("div",{class:[c.listWrap,c.infoListWrap]},[e(Ce,{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(R,{name:"student",tab:"学员名单"},{default:()=>[e(qe,{upgradeFlag:v.value},null)]}),e(R,{name:"afterWork",tab:"课后作业"},{default:()=>[e(Je,{upgradeFlag:v.value},null)]}),e(R,{name:"practice",tab:"练习记录"},{default:()=>[e(pt,null,null)]}),e(R,{name:"attendclass",tab:"上课记录"},{default:()=>[e(dt,null,null)]})]})])])}});export{Vt as default};
|