index-7c240fef.js 2.3 KB

1
  1. import{S as i,s as e,i as d}from"./skeleton-index-modal-f903024b.js";import{M as p}from"./index-cf657a5b.js";import{d as m,O as f,o as h,g as s,R as v,h as t,I as g,T as C,N as I,W as N,a as y}from"./index-e362c2e8.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-7571fa92.js";import{C as u}from"./index-5c45ec33.js";import{I as F}from"./index-85ccd873.js";import{R as b,C as o}from"./index-275a0d7a.js";import"./index-5276fe86.js";const P=m({name:"lesson-list",setup(){sessionStorage.removeItem("lesson-detail-tab-value");const n=I(),r=N(),l=f({classDate:r.query.classDate,loading:!0,dataShow:!0,list:[]}),c=async()=>{try{const{data:a}=await y.get("/api-web/schoolCourseSchedule/queryListClassesForDay",{params:{classDate:l.classDate}});l.list=a||[]}catch(a){}finally{l.loading=!1,l.dataShow=!!l.list.length}};return h(()=>{c()}),()=>s("div",null,[s(p,{position:"top"},{default:()=>[s(v,null,null)]}),s(i,{show:l.loading,"onUpdate:show":a=>l.loading=a},{default:()=>[l.dataShow?l.list.map(a=>s(D,{inset:!0,class:e.lessonCellGroup,onClick:()=>{n.push({path:"/lesson-detail",query:{courseId:a.courseId,teacherId:a.teacherId}})}},{default:()=>[s(u,{center:!0,class:e.timeCell},{title:()=>s("span",null,[a.classDate]),value:()=>s("span",null,[M[a.courseStatus]])}),s(u,{center:!0,border:!1},{icon:()=>s(F,{src:a.teacherAvatar||S,fit:"cover",class:e.iconStudent},null),title:()=>s("div",{class:e.userInfo},[s("p",{class:e.name},[a.teacherName]),s("p",{class:e.subject},[a.courseName])]),value:()=>s("div",{class:e.people},[s("img",{src:d,class:e.iconPeople},null),a.studentNum,t("人")])}),s(u,{center:!0,class:e.musicCell},{title:()=>s("div",{class:e.musicInfo},[s(g,{name:w,class:e.iconMusic},null),s("span",{class:"van-ellipsis"},[a.musicGroupName])]),label:()=>s(b,{class:e.rowGroup},{default:()=>[s(o,null,{default:()=>[t("正常出勤 "),s("span",null,[a.attendanceNormalNum])]}),s(o,null,{default:()=>[t("迟到"),s("span",{class:e.c},[a.attendanceLateNum])]}),s(o,null,{default:()=>[t("请假"),s("span",{class:e.q},[a.attendanceLeaveNum])]}),s(o,null,{default:()=>[t("旷课"),s("span",{class:e.k},[a.attendanceTruantNum])]})]})})]})):s(C,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})])}});export{P as default};