mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-03-21 09:13:10 +00:00
2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
import{_ as w,g,am as m}from"./index-_6IQhlPZ.js";import{a as k}from"./VRow-WkEz3xRr.js";import{R as f,X as n,Y as b,Z as _,k as t,a1 as r,S as s,_ as l,F as c,a2 as p,$ as o,n as x}from"./vendor-vue-H0jQBZ7T.js";import{a0 as C}from"./vendor-vuetify-ChAgIwn2.js";const A={name:"AttendanceSidebar",props:{studentList:{type:Array,required:!0},attendance:{type:Object,required:!0},isEditingDisabled:{type:Boolean,default:!1}},emits:["click","disabled-click"],setup(){return{display:C()}},methods:{getSetting:g,handleClick(){this.isEditingDisabled?this.$emit("disabled-click"):this.$emit("click")}}},D={style:{"white-space":"nowrap"}},S={style:{"white-space":"nowrap"}},L={style:{"white-space":"nowrap"}},v={key:0},B={style:{"white-space":"nowrap"}},E={style:{"white-space":"nowrap"}},V={key:0},N={style:{"white-space":"nowrap"}},U={style:{"white-space":"nowrap"}},q={key:0},F={style:{"white-space":"nowrap"}};function M(h,e,a,u,R,y){return a.studentList&&a.studentList.length?f((n(),b(k,{key:0,class:x([{"cursor-not-allowed":a.isEditingDisabled},"attendance-area no-select"]),cols:"1",onClick:y.handleClick},{default:_(()=>[e[10]||(e[10]=t("h1",null,"出勤",-1)),t("h2",null,[e[0]||(e[0]=t("span",{style:{"white-space":"nowrap"}}," 应到",-1)),e[1]||(e[1]=r(" : ",-1)),t("span",D,s(a.studentList.length-a.attendance.exclude.length)+"人 ",1)]),t("h2",null,[e[2]||(e[2]=t("span",{style:{"white-space":"nowrap"}}," 实到",-1)),e[3]||(e[3]=r(" : ",-1)),t("span",S,s(a.studentList.length-a.attendance.absent.length-!y.getSetting("display.lateStudentsArePresent")*a.attendance.late.length-a.attendance.exclude.length)+"人 ",1)]),t("h2",null,[e[4]||(e[4]=t("span",{style:{"white-space":"nowrap"}}," 请假",-1)),e[5]||(e[5]=r(" : ",-1)),t("span",L,s(a.attendance.absent.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.absent,(d,i)=>(n(),l("h3",{key:"absent-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",v,s(`${i+1}. `),1)):o("",!0),t("span",B,s(d),1)]))),128)),t("h2",null,[e[6]||(e[6]=t("span",{style:{"white-space":"nowrap"}},"迟到",-1)),e[7]||(e[7]=r(" : ",-1)),t("span",E,s(a.attendance.late.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.late,(d,i)=>(n(),l("h3",{key:"late-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",V,s(`${i+1}. `),1)):o("",!0),t("span",N,s(d),1)]))),128)),t("h2",null,[e[8]||(e[8]=t("span",{style:{"white-space":"nowrap"}},"不参与",-1)),e[9]||(e[9]=r(" : ",-1)),t("span",U,s(a.attendance.exclude.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.exclude,(d,i)=>(n(),l("h3",{key:"exclude-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",q,s(`${i+1}. `),1)):o("",!0),t("span",F,s(d),1)]))),128))]),_:1},8,["class","onClick"])),[[m,a.isEditingDisabled?!1:{class:`text-${["primary","secondary","info","success","warning","error"][Math.floor(Math.random()*6)]}`}]]):o("",!0)}const P=w(A,[["render",M],["__scopeId","data-v-5a7eaf6a"]]);export{P as default};
|