1 |
- import{d as j,ag as I,c as e,ai as m,q as p,a5 as R,F as Y,r as _,R as c,Z as B,$ as C,aj as E,ak as x,P as v,b2 as V,al as F,m as y,o as T}from"./index.5f7ffb46.js";import{O as H}from"./index.1d6ac2c5.js";import{c as w}from"./index.b28db9f5.js";import{c as A}from"./clock-icon.6fd57365.js";import{O as U}from"./index.7790de2a.js";import{L as q}from"./index.9ef28852.js";import{D as G}from"./index.af85409e.js";import{P as W}from"./index.de1f78a6.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";const Z="_itemWrap_1spjy_1",$="_itemWrapTop_1spjy_7",z="_itemWrapTopLeft_1spjy_15",J="_clockWrap_1spjy_20",K="_leftTimer_1spjy_29",Q="_itemWrapTopRight_1spjy_35",X="_itemWrapBottom_1spjy_39",ee="_courseInfo_1spjy_46",te="_headImgs_1spjy_55",ae="_infoMsg_1spjy_62",oe="_infoMsgMain_1spjy_62",se="_infoMsgSub_1spjy_68",re="_typeTag_1spjy_79",ne="_typeTagNo_1spjy_88",ce="_itemWrapBottomRight_1spjy_97",ie="_attInfo_1spjy_102",le="_attInfoDot_1spjy_108",ue="_attInfoDotTitle_1spjy_112",pe="_signTime_1spjy_124",me="_goWrap_1spjy_130",he="_goWrapMain_1spjy_138",de="_goWrapSub_1spjy_144";var s={itemWrap:Z,itemWrapTop:$,itemWrapTopLeft:z,clockWrap:J,leftTimer:K,itemWrapTopRight:Q,itemWrapBottom:X,courseInfo:ee,headImgs:te,infoMsg:ae,infoMsgMain:oe,infoMsgSub:se,typeTag:re,typeTagNo:ne,itemWrapBottomRight:ce,attInfo:ie,attInfoDot:le,attInfoDotTitle:ue,signTime:pe,goWrap:me,goWrapMain:he,goWrapSub:de},fe=j({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:A,alt:""},null)]),e("p",{class:s.leftTimer},[m(r.item.startTime).format("YYYY-MM-DD HH:mm"),"-",m(r.item.endTime).format("HH:mm")])])]),e("div",{class:s.itemWrapBottom},[e("div",{class:s.courseInfo},[e("div",{class:s.infoMsg},[e("p",{class:s.infoMsgMain},[r.item.classGroupName]),e("p",{class:s.infoMsgSub},[r.item.orchestraName])])]),e("div",{class:s.itemWrapBottomRight},[e("div",{class:s.attInfo},[e("div",{class:s.goWrap},[e("p",{class:s.goWrapMain},[r.item.signInStatus==="NORMAL"?e("span",null,[p("\u6B63\u5E38")]):e("span",{style:{color:"#F44541"}},[p("\u5F02\u5E38")])]),e("p",{class:s.goWrapSub},[p("\u7B7E\u5230")])]),e("div",{class:s.goWrap},[e("p",{class:s.goWrapMain},[r.item.signOutStatus==="NORMAL"?e("span",null,[p("\u6B63\u5E38")]):e("span",{style:{color:"#F44541"}},[p("\u5F02\u5E38")])]),e("p",{class:s.goWrapSub},[p("\u7B7E\u9000")])])]),e("div",{class:s.itemWrapTopRight},[e(R,{name:"arrow"},null)])])])])])}});function ve(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!F(r)}var Ne=j({name:"attend-student",props:{toHeight:{type:Number,default:0}},setup(r){I();const t=_({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],courseList:[],currentDate:[m().format("YYYY"),m().format("MM")]}),n=_({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}),g=c(r.toHeight),M=c(new Date(m().subtract(10,"year").format("YYYY-MM-DD"))),D=c(new Date(m().add(10,"year").format("YYYY-MM-DD"))),P=c(["year","month"]),i=c(!1),f=c(!1),h=c(!1),d=c(!0),l=c([]),u=async()=>{f.value=!0;try{i.value&&(n.page=1,l.value=[],i.value=!1);const o=await y.post("/api-teacher/courseSchedule/teacherAttendance",{data:{...n}});if(l.value.length>0&&o.data.pages===1)return;n.page=o.data.current+1,l.value=l.value.concat(o.data.rows||[]),d.value=l.value.length>0,f.value=!1,h.value=o.data.current>=o.data.pages}catch(o){const a=o.message;T(a),d.value=!1,h.value=!0}},S=()=>{t.courseList=[];for(const o in w)t.courseList.push({name:w[o],value:o});t.courseList.unshift({name:"\u5168\u90E8\u8BFE\u7A0B",value:""})},b=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,u()},O=o=>{const a=o.selectedOptions[0]||{};n.orchestraId=a.value,n.orchestraName=a.name,t.showPopoverOrchestra=!1,i.value=!0,u()},N=o=>{const a=o.selectedOptions[0]||{};n.courseType=a.value,n.courseTypeName=a.name,t.showPopoverSubject=!1,i.value=!0,u()},k=async()=>{try{const o=await y.post("/api-teacher/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;T(a)}};B(()=>r.toHeight,o=>{g.value=o,console.log(g.value,"\u8001\u5E08\u7684")}),C(()=>{k(),u(),S()});const L=()=>{h.value=!1,f.value=!0,u()};return()=>{let o;return e("div",{class:!d.value&&"emptyRootContainer"},[e(U,{position:"top",onGetHeight:a=>{document.documentElement.style.setProperty("--header-height",a+"px")}},{default:()=>[e(E,{border:!1},null),e("div",{class:"searchGroup"},[e("div",{class:["searchItem searchItem-normal",t.showPopoverTime?"searchItem-active":""],onClick:()=>{t.showPopoverTime=!0}},[e("span",null,[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}},[e("span",null,[n.courseTypeName]),e("i",{class:"arrow"},null)])])]}),d.value?e(H,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,onRefresh:L,style:"min-height: calc(100vh - var(--header-height));"},{default:()=>[e(q,{"loading-text":" ",finished:h.value,"finished-text":" ",style:{paddingTop:"12px"},onLoad:u},ve(o=l.value.map(a=>e(fe,{item:a},null)))?o:{default:()=>[o]})]}):e(x,{tips:"\u6682\u65E0\u8003\u52E4"},null),e(v,{show:t.showPopoverTime,"onUpdate:show":a=>t.showPopoverTime=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(G,{onCancel:()=>{t.showPopoverTime=!1},onConfirm:b,modelValue:t.currentDate,"onUpdate:modelValue":a=>t.currentDate=a,formatter:V,minDate:M.value,maxDate:D.value,columnsType:P.value},null)]}),e(v,{show:t.showPopoverOrchestra,"onUpdate:show":a=>t.showPopoverOrchestra=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(W,{columns:t.actions,onCancel:()=>t.showPopoverOrchestra=!1,onConfirm:a=>O(a),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(v,{show:t.showPopoverSubject,"onUpdate:show":a=>t.showPopoverSubject=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(W,{columns:t.courseList,onCancel:()=>t.showPopoverSubject=!1,onConfirm:a=>N(a),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});export{Ne as default};
|