1 |
- import{d as w,ag as I,c as e,ai as p,a5 as A,q as h,F as y,r as T,R as c,Z as F,$ as H,ak as x,P as _,a_ as E,al as U,m as W,o as D,aj as z}from"./index.332c7f08.js";import{O as G}from"./index.d7c1b6ac.js";import{A as $}from"./attend-student.242cde9d.js";import{O as Z}from"./index.d2064f3d.js";import{c as S}from"./index.b28db9f5.js";import{c as J}from"./clock-icon.6fd57365.js";import{s as M,e as b}from"./success-icon.245b8694.js";import{d as K}from"./default-icon.11fd2315.js";import{O as Q}from"./index.626c48f9.js";import{L as X}from"./index.b186dfda.js";import{D as ee}from"./index.1361b221.js";import{P as O}from"./index.656e257f.js";import{s as k}from"./index.module.ab7cef99.js";import{T as te,a as P}from"./index.7c580591.js";import"./index.1ed6273e.js";import"./index.91135ff9.js";import"./use-tab-status.9d769af8.js";import"./utils.4b86e8c9.js";import"./Picker.e56f94bd.js";import"./index.1e2dfe6e.js";import"./index.4aa8e076.js";const ae="_chioseWrap_1n0dz_1",oe="_orchestraBand_1n0dz_12",se="_searchInput_1n0dz_26";var re={chioseWrap:ae,orchestraBand:oe,searchInput:se};const ne="_itemWrap_1d6rq_1",ce="_itemWrapTop_1d6rq_7",ie="_itemWrapTopLeft_1d6rq_15",le="_clockWrap_1d6rq_20",ue="_leftTimer_1d6rq_29",me="_itemWrapTopRight_1d6rq_35",pe="_itemWrapBottom_1d6rq_39",he="_courseInfo_1d6rq_42",de="_headImgs_1d6rq_48",fe="_infoMsg_1d6rq_55",ve="_infoMsgMain_1d6rq_55",ge="_infoMsgSub_1d6rq_61",_e="_attInfo_1d6rq_72",Te="_attInfoDot_1d6rq_78",we="_attInfoDotTitle_1d6rq_83",Ie="_signTime_1d6rq_97",ye="_passWrap_1d6rq_105",We="_goWrap_1d6rq_106",De="_itemBottomMain_1d6rq_123",Se="_itemBottomSub_1d6rq_131";var s={itemWrap:ne,itemWrapTop:ce,itemWrapTopLeft:ie,clockWrap:le,leftTimer:ue,itemWrapTopRight:me,itemWrapBottom:pe,courseInfo:he,headImgs:de,infoMsg:fe,infoMsgMain:ve,infoMsgSub:ge,attInfo:_e,attInfoDot:Te,attInfoDotTitle:we,signTime:Ie,passWrap:ye,goWrap:We,itemBottomMain:De,itemBottomSub:Se},Me=w({props:["item"],name:"teacherAtt-item",setup(r){const t=I(),n=()=>{t.push({path:"/teacher-attendDetail",query:{courseScheduleId:r.item.courseScheduleId}})};return()=>e(y,null,[e("div",{class:s.itemWrap,onClick:n},[e("div",{class:s.itemWrapTop},[e("div",{class:s.itemWrapTopLeft},[e("div",{class:s.clockWrap},[e("img",{src:J,alt:""},null)]),e("p",{class:s.leftTimer},[p(r.item.startTime).format("YYYY-MM-DD HH:mm"),"~",p(r.item.endTime).format("HH:mm")])]),e("div",{class:s.itemWrapTopRight},[e(A,{name:"arrow"},null)])]),e("div",{class:s.itemWrapBottom},[e("div",{class:s.courseInfo},[e("img",{class:s.headImgs,src:K,alt:""},null),e("div",{class:s.infoMsg},[e("p",{class:s.infoMsgMain},[r.item.classGroupName,h("-"),r.item.teacherName]),e("p",{class:s.infoMsgSub},[r.item.orchestraName])])]),e("div",{class:s.attInfo},[e("div",{class:r.item.signInStatus==="NORMAL"?s.passWrap:s.goWrap},[e("div",{class:s.attInfoDot},[e("div",{class:s.attInfoDotTitle},[e("span",null,[h("\u7B7E\u5230\u72B6\u6001")]),e("img",{src:r.item.signInStatus==="NORMAL"?M:b,alt:""},null)]),e("p",{class:s.signTime},[r.item.signInStatus==="NORMAL"?"\u6B63\u5E38":e("span",{style:{color:"#F44541"}},[h("\u5F02\u5E38")])])])]),e("div",{class:r.item.signOutStatus==="NORMAL"?s.passWrap:s.goWrap},[e("div",{class:s.attInfoDot},[e("div",{class:s.attInfoDotTitle},[e("span",null,[h("\u7B7E\u9000\u72B6\u6001")]),e("img",{src:r.item.signOutStatus==="NORMAL"?M:b,alt:""},null)]),e("p",{class:s.signTime},[r.item.signOutStatus==="NORMAL"?"\u6B63\u5E38":e("span",{style:{color:"#F44541"}},[h("\u5F02\u5E38")])])])])])])])])}});function be(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!U(r)}var Oe=w({name:"attend-student",props:{toHeight:{type:Number,default:0}},setup(r){I();const t=T({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,isClick:!1,actions:[],courseList:[],currentDate:[p().format("YYYY"),p().format("MM")]}),n=T({time:t.currentDate[0]+"-"+t.currentDate[1],timeName:t.currentDate[0]+"\u5E74"+t.currentDate[1]+"\u6708",keyword:"",orchestraId:"",orchestraName:"\u5168\u90E8\u4E50\u56E2",courseType:"",courseTypeName:"\u6240\u6709\u8BFE\u7A0B",page:1,rows:20}),d=c(r.toHeight),u=c(new Date(p().subtract(10,"year").format("YYYY-MM-DD"))),q=c(new Date(p().add(10,"year").format("YYYY-MM-DD"))),L=c(["year","month"]),i=c(!1),v=c(!1),f=c(!1),g=c(!1),m=c([]),l=async()=>{if(!t.isClick){t.isClick=!0,v.value=!0;try{i.value&&(n.page=1,m.value=[],i.value=!1);const o=await W.post("/api-school/courseSchedule/teacherAttendance",{data:{...n}});if(m.value.length>0&&o.data.pages===1)return;n.page=o.data.current+1,m.value=m.value.concat(o.data.rows||[]),g.value=m.value.length>0,v.value=!1,f.value=o.data.current>=o.data.pages}catch(o){const a=o.message;D(a),g.value=!1,f.value=!0}t.isClick=!1}},B=()=>{t.courseList=[];for(const o in S)t.courseList.push({name:S[o],value:o});t.courseList.unshift({name:"\u5168\u90E8\u8BFE\u7A0B",value:""})},C=o=>{n.time=o.selectedValues[0]+"-"+o.selectedValues[1],n.timeName=o.selectedValues[0]+"\u5E74"+o.selectedValues[1]+"\u6708",t.showPopoverTime=!1,i.value=!0,l()},V=o=>{const a=o.selectedOptions[0]||{};n.orchestraId=a.value,n.orchestraName=a.name,t.showPopoverOrchestra=!1,i.value=!0,l()},Y=o=>{const a=o.selectedOptions[0]||{};n.courseType=a.value,n.courseTypeName=a.name,t.showPopoverSubject=!1,i.value=!0,l()},R=async()=>{try{const o=await W.post("/api-school/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});t.actions=o.data.rows.map(a=>({name:a.name,value:a.id})),t.actions.unshift({name:"\u5168\u90E8\u4E50\u56E2",value:""})}catch(o){const a=o.message;D(a)}};F(()=>r.toHeight,o=>{d.value=o,console.log(d.value,"\u8001\u5E08\u7684")}),H(()=>{R(),l(),B()});const j=()=>{f.value=!1,v.value=!0,l()};return()=>{let o;return e("div",null,[e(y,null,[e(Z,{placeholder:"\u8BF7\u8F93\u5165\u4F34\u5B66\u8001\u5E08\u59D3\u540D",class:re.searchInput,onSearch:a=>{console.log(a,"onSearch"),n.keyword=a,i.value=!0,l()}},null),e("div",{class:"searchGroup"},[e("div",{class:["searchItem",t.showPopoverTime&&"searchItem-active"],onClick:()=>{t.showPopoverTime=!0}},[n.timeName,e("i",{class:"arrow"},null)]),e("div",{class:["searchItem",t.showPopoverOrchestra&&"searchItem-active"],onClick:()=>{t.showPopoverOrchestra=!0}},[e("span",null,[n.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem",t.showPopoverSubject&&"searchItem-active"],onClick:()=>{t.showPopoverSubject=!0}},[n.courseTypeName,e("i",{class:"arrow"},null)])])]),e("div",{style:{overflowY:"auto",height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 2.61334rem)"}},[g.value?e(Q,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,onRefresh:j,style:"min-height: calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 2.61334rem)"},{default:()=>[e(X,{"loading-text":" ",finished:f.value,"finished-text":" ",onLoad:l,style:{paddingTop:"12px"}},be(o=m.value.map(a=>e(Me,{item:a},null)))?o:{default:()=>[o]})]}):e(x,{tips:"\u6682\u65E0\u8003\u52E4"},null)]),e(_,{show:t.showPopoverTime,"onUpdate:show":a=>t.showPopoverTime=a,position:"bottom",round:!0,teleport:"body",class:"popupBottomSearch"},{default:()=>[e(ee,{onCancel:()=>{t.showPopoverTime=!1},onConfirm:C,modelValue:t.currentDate,"onUpdate:modelValue":a=>t.currentDate=a,formatter:E,minDate:u.value,maxDate:q.value,columnsType:L.value},null)]}),e(_,{show:t.showPopoverOrchestra,"onUpdate:show":a=>t.showPopoverOrchestra=a,position:"bottom",round:!0,teleport:"body",class:"popupBottomSearch"},{default:()=>[e(O,{columns:t.actions,onCancel:()=>t.showPopoverOrchestra=!1,onConfirm:a=>V(a),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(_,{show:t.showPopoverSubject,"onUpdate:show":a=>t.showPopoverSubject=a,position:"bottom",round:!0,teleport:"body",class:"popupBottomSearch"},{default:()=>[e(O,{columns:t.courseList,onCancel:()=>t.showPopoverSubject=!1,onConfirm:a=>Y(a),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});const N=c("student");var Je=w({name:"school-attendance",setup(){const r=I(),t=T({heightV:0}),n=c(),d=u=>{t.heightV=u,console.log(t.heightV,"\u83B7\u53D6\u9AD8\u5EA6"),document.documentElement.style.setProperty("--header-height",u+"px")};return()=>e(y,null,[e(G,{position:"top",background:"#F8F8F8",onGetHeight:d,ref:n},{default:()=>[e(z,{border:!1},{right:()=>e("span",{class:k.iconSetting,onClick:()=>{r.push("/attendance-rules")}},null)})]}),e(te,{active:N.value,"onUpdate:active":u=>N.value=u,sticky:!0,swipeable:!0,offsetTop:t.heightV,lineHeight:4,lineWidth:16,class:k.stickyAttendance},{default:()=>[e(P,{name:"student",title:"\u5B66\u5458\u8003\u52E4"},{default:()=>[e($,{toHeight:t.heightV},null)]}),e(P,{name:"teacher",title:"\u4F34\u5B66\u8001\u5E08\u8003\u52E4"},{default:()=>[e(Oe,{toHeight:t.heightV},null)]})]})])}});export{Je as default};
|