import{S as i,s as e,i as d}from"./skeleton-index-modal-17bdcf05.js";import{M as p}from"./index-3266a6cb.js";import{d as m,O as f,o as h,g as a,R as v,h as t,I as C,S as g,N,W as y,a as I}from"./index-123c6a88.js";import{i as S}from"./icon-teacher-default-a5bec550.js";import{i as w}from"./icon-music-10132ef5.js";import{a as M}from"./constant-a400d214.js";import{C as D}from"./index-d4786399.js";import{C as u}from"./index-6b7987bf.js";import{I as F}from"./index-368e6b72.js";import{R as q,C as o}from"./index-cc6ac937.js";import"./index-d3763f9b.js";const P=m({name:"lesson-list",setup(){const n=N(),r=y(),l=f({classDate:r.query.classDate,loading:!0,dataShow:!0,list:[]}),c=async()=>{try{const{data:s}=await I.get("/api-web/schoolCourseSchedule/queryListClassesForDay",{params:{classDate:l.classDate}});l.list=s||[]}catch(s){}finally{l.loading=!1,l.dataShow=!!l.list.length}};return h(()=>{c()}),()=>a("div",null,[a(p,{position:"top"},{default:()=>[a(v,null,null)]}),a(i,{show:l.loading,"onUpdate:show":s=>l.loading=s},{default:()=>[l.dataShow?l.list.map(s=>a(D,{inset:!0,class:e.lessonCellGroup,onClick:()=>{n.push({path:"/lesson-detail",query:{courseId:s.courseId,teacherId:s.teacherId}})}},{default:()=>[a(u,{center:!0,class:e.timeCell},{title:()=>a("span",null,[s.classDate]),value:()=>a("span",null,[M[s.courseStatus]])}),a(u,{center:!0,border:!1},{icon:()=>a(F,{src:s.teacherAvatar||S,fit:"cover",class:e.iconStudent},null),title:()=>a("div",{class:e.userInfo},[a("p",{class:e.name},[s.teacherName]),a("p",{class:e.subject},[s.courseName])]),value:()=>a("div",{class:e.people},[a("img",{src:d,class:e.iconPeople},null),s.studentNum,t("人")])}),a(u,{center:!0,class:e.musicCell},{title:()=>a("div",{class:e.musicInfo},[a(C,{name:w,class:e.iconMusic},null),a("span",{class:"van-ellipsis"},[s.musicGroupName])]),label:()=>a(q,{class:e.rowGroup},{default:()=>[a(o,null,{default:()=>[t("正常出勤 "),a("span",null,[s.attendanceNormalNum])]}),a(o,null,{default:()=>[t("迟到"),a("span",{class:e.c},[s.attendanceLateNum])]}),a(o,null,{default:()=>[t("请假"),a("span",{class:e.q},[s.attendanceLeaveNum])]}),a(o,null,{default:()=>[t("旷课"),a("span",{class:e.k},[s.attendanceTruantNum])]})]})})]})):a(g,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})])}});export{P as default};
