student-att-day.289c5723.js 4.8 KB

1
  1. import{d as v,ag as T,c as e,F as y,k as R,o as _,aV as N,r as g,R as n,ah as A,$ as V,ai as C,P as L,aj as O,ak as b,m as I}from"./index.ffe80dbe.js";import{O as U}from"./index.a0ef77e4.js";import{O as Y}from"./index.c7af3af2.js";import{O as W}from"./index.45b38760.js";import{s as h}from"./index.module.9c7e1cd1.js";import{s as k}from"./student-icon.30fb072d.js";import{m as x}from"./msg-icon.adf37f7b.js";import{e as P}from"./index.931cf0b8.js";import{O as S}from"./index.4ddd16f0.js";import{L as j}from"./index.cafcb8b5.js";import{D as M}from"./index.ff4fe619.js";import"./index.1d5c6f70.js";import"./index.92ec0bf4.js";import"./index.ea031708.js";import"./use-tab-status.5a3cd090.js";import"./utils.18cb7a73.js";import"./index.777c6c1a.js";import"./index.466e527a.js";import"./index.b4b77b5a.js";import"./index.02edecb1.js";var B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAadJREFUSEvtlb1OAkEUhc9lVhNCg9jYGTtjrYnRQhJNjC27OxTEKBWNzyDgC1hTIbHaAUJpLIw0GhOtjZ2xsxFstnFZxmyCiaAs+4NayLQz53x3Tu7cIfzRoj/iYgL+teQnUf/DqBuNRrzT6dQAbEgplZARdAA0LcvimUym/dnrS3MZhlEgonxIYJ+ciAq6rhddwUKIQwB9h8IWIaUsptPpgiu4UqnMRqPRWwALYYE9/aOiKCupVOrFFexs1mq1Rdu2r4loJgxcStlmjK1pmvYw6DN0gFSr1aSU8hzAdED4GxFt67re/E7vOrmEELsAKoDvz0QC2OOcnw4reuTIDNhsec75kVtSI8GOWAhRBrDvMfITznl21FlP4FKpNJVIJM6klJuutyC6aLVaO7lczhoL2DEpl8vxWCx2BWBpiOm9aZrr2Wz2dRTU2fd04w+jer0+b9v2DYC5AfNnxtiqqqpPXqC+wb03vtztdp0nEutBzEgkktQ07c4rNBDYERmGsUVExwAijLEDVVUv/UADg/1CfA+QcQACD5Cfgvvq6nEWMQGPM01Xr3f3ZHQffB+powAAAABJRU5ErkJggg==";const q="_itemWrap_1uba2_1",F="_itemRight_1uba2_9",Q="_itemLeft_1uba2_12",z="_headerWrap_1uba2_18",J="_infoWrap_1uba2_40",G="_statusTag_1uba2_46",K="_LATE_1uba2_58",Z="_LEAVE_1uba2_62",H="_TRUANCY_1uba2_66",X="_msgIcon_1uba2_70";var i={itemWrap:q,itemRight:F,itemLeft:Q,headerWrap:z,infoWrap:J,statusTag:G,LATE:K,LEAVE:Z,TRUANCY:H,msgIcon:X},$=v({props:["item"],name:"student-cell",setup(s){T();const o=async()=>{try{await R({api:"joinChatGroup",content:{type:"single",id:s.item.studentImId}})}catch{_("\u53D1\u8D77\u804A\u5929\u5931\u8D25")}};return()=>e(y,null,[e("div",{class:i.itemWrap,onClick:o},[e("div",{class:i.itemLeft},[e("div",{class:i.headerWrap},[e("img",{src:s.item.studentAvatar?s.item.studentAvatar:k,alt:""},null)])]),e("div",{class:i.itemRight},[e("div",{class:i.infoWrap},[e("p",null,[s.item.nickName]),e("div",{class:[i[s.item.status],i.statusTag]},[P[s.item.status]])]),e("img",{class:i.msgIcon,src:x,alt:""},null)])])])}});function ee(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!b(s)}var _e=v({name:"student-att-day",setup(){T();const o=N().query.time;console.log(o);const r=g({showPopoverTime:!1,currentDate:o?o.split("-"):[2022,12,19],currentDateName:""}),l=g({nickName:"",time:o,timeName:o.split("-")[0]+"\u5E74"+o.split("-")[1]+"\u6708"+o.split("-")[2]+"\u65E5",page:1,rows:20,timeType:"DAY"}),E=n(["year","month","day"]);n(new Date(A().subtract(10,"year").format("YYYY-MM-DD"))),n(new Date(A().add(10,"year").format("YYYY-MM-DD")));const u=n(!1),d=n(!1),p=n(!1),f=n(!1),m=n([]),c=async()=>{d.value=!0;try{u.value&&(l.page=1,m.value=[],u.value=!1);const t=await I.post("/api-school/courseScheduleStudentAttendance/page",{data:{...l}});if(m.value.length>0&&t.data.pages===1)return;l.page=t.data.current+1,m.value=m.value.concat(t.data.rows||[]),f.value=m.value.length>0,d.value=!1,p.value=t.data.current>=t.data.pages}catch(t){const a=t.message;_(a),f.value=!1,p.value=!0}},w=t=>{console.log(t,"val"),l.time=t.selectedValues[0]+"-"+t.selectedValues[1]+"-"+t.selectedValues[2],l.timeName=t.selectedValues[0]+"\u5E74"+t.selectedValues[1]+"\u6708"+t.selectedValues[2]+"\u65E5",r.showPopoverTime=!1,u.value=!0,c()};V(()=>{c()});const D=()=>{p.value=!1,d.value=!0,c()};return()=>{let t;return e(y,null,[e(S,{position:"top",onGetHeight:a=>{document.documentElement.style.setProperty("--header-height",a+"px")}},{default:()=>[e(U,{border:!1},{title:()=>e("div",{class:h.NavTitle,onClick:()=>r.showPopoverTime=!0},[l.timeName," ",e("img",{class:[h.sanIcons,r.showPopoverTime?h.isReversal:""],src:B,alt:""},null)])}),e(Y,{placeholder:"\u8BF7\u8F93\u5165\u5B66\u751F\u59D3\u540D",onSearch:a=>{l.nickName=a,u.value=!0,c()},modelValue:l.nickName},null)]}),f.value?e(W,{modelValue:u.value,"onUpdate:modelValue":a=>u.value=a,onRefresh:D,style:"min-height: calc(100vh - var(--header-height));"},{default:()=>[e(j,{"loading-text":" ",finished:p.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",style:{paddingTop:"12px"},onLoad:c},ee(t=m.value.map(a=>e($,{item:a},null)))?t:{default:()=>[t]})]}):e(C,null,null),e(L,{show:r.showPopoverTime,"onUpdate:show":a=>r.showPopoverTime=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(M,{onCancel:()=>{r.showPopoverTime=!1},onConfirm:w,modelValue:r.currentDate,"onUpdate:modelValue":a=>r.currentDate=a,formatter:O,columnsType:E.value},null)]})])}}});export{_e as default};