1 |
- import{d as v,ag as T,c as e,F as y,e as R,o as E,ah as C,r as A,R as n,ai as h,$ as N,aj as V,ak as b,P as L,b2 as I,al as O,m as U,g as Y}from"./index.5f7ffb46.js";import{O as W}from"./index.ec2a7822.js";import{O as x}from"./index.1d6ac2c5.js";import{s as g}from"./index.module.ab7cef99.js";import{s as k}from"./student-icon.30fb072d.js";import{m as P}from"./msg-icon.adf37f7b.js";import{a as S}from"./index.b28db9f5.js";import{O as B}from"./index.7790de2a.js";import{L as F}from"./index.9ef28852.js";import{D as j}from"./index.af85409e.js";import"./index.6438a25f.js";import"./index.abd668f7.js";import"./use-tab-status.69b57a37.js";import"./utils.0f86fc1f.js";import"./Picker.148c9d83.js";import"./index.6bbd7daa.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";import"./index.de1f78a6.js";var M="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",Q="_itemRight_1uba2_9",z="_itemLeft_1uba2_12",J="_headerWrap_1uba2_18",G="_infoWrap_1uba2_40",K="_statusTag_1uba2_46",Z="_LATE_1uba2_58",$="_LEAVE_1uba2_62",H="_TRUANCY_1uba2_66",X="_msgIcon_1uba2_70";var i={itemWrap:q,itemRight:Q,itemLeft:z,headerWrap:J,infoWrap:G,statusTag:K,LATE:Z,LEAVE:$,TRUANCY:H,msgIcon:X},ee=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{E("\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]},[S[s.item.status]])]),e("img",{class:i.msgIcon,src:P,alt:""},null)])])])}});function te(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!O(s)}var Ee=v({name:"student-att-day",setup(){T();const o=C().query.time;console.log(o);const r=A({showPopoverTime:!1,currentDate:o?o.split("-"):[2022,12,19],currentDateName:""}),l=A({nickName:"",time:o,timeName:o.split("-")[0]+"\u5E74"+o.split("-")[1]+"\u6708"+o.split("-")[2]+"\u65E5",page:1,rows:20,timeType:"DAY"}),_=n(["year","month","day"]);n(new Date(h().subtract(10,"year").format("YYYY-MM-DD"))),n(new Date(h().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 U.post(`${Y.platformApi}/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;E(a),f.value=!1,p.value=!0}},D=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()};N(()=>{c()});const w=()=>{p.value=!1,d.value=!0,c()};return()=>{let t;return e(y,null,[e(B,{position:"top",onGetHeight:a=>{document.documentElement.style.setProperty("--header-height",a+"px")}},{default:()=>[e(V,{border:!1},{title:()=>e("div",{class:g.NavTitle,onClick:()=>r.showPopoverTime=!0},[l.timeName," ",e("img",{class:[g.sanIcons,r.showPopoverTime?g.isReversal:""],src:M,alt:""},null)])}),e(W,{placeholder:"\u8BF7\u8F93\u5165\u5B66\u5458\u59D3\u540D",onSearch:a=>{l.nickName=a,u.value=!0,c()},modelValue:l.nickName},null)]}),f.value?e(x,{modelValue:u.value,"onUpdate:modelValue":a=>u.value=a,onRefresh:w,style:"min-height: calc(100vh - var(--header-height));"},{default:()=>[e(F,{"loading-text":" ",finished:p.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",style:{paddingTop:"12px"},onLoad:c},te(t=m.value.map(a=>e(ee,{item:a},null)))?t:{default:()=>[t]})]}):e(b,null,null),e(L,{show:r.showPopoverTime,"onUpdate:show":a=>r.showPopoverTime=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(j,{onCancel:()=>{r.showPopoverTime=!1},onConfirm:D,modelValue:r.currentDate,"onUpdate:modelValue":a=>r.currentDate=a,formatter:I,columnsType:_.value},null)]})])}}});export{Ee as default};
|