1 |
- import{M as B}from"./index-cf657a5b.js";import{d as _,O as w,o as g,w as d,g as e,i as y,ab as E,B as T,h as n,F as k,S as C,R as z,T as N,a as D,N as A}from"./index-e362c2e8.js";import{M as P}from"./index-2a51a0f7.js";import{S as R,b as Y,a as m}from"./index-5276fe86.js";import{C as F}from"./index-7571fa92.js";import{C as v}from"./index-5c45ec33.js";import{M as L}from"./index-04aee2cb.js";import{i as O}from"./icon-student-default-4c78efb2.js";import{o as b,c as S}from"./constant-a400d214.js";import{D as j}from"./index-b3ca6985.js";import{D as W,a as I}from"./index-8b701a0f.js";import{L as H}from"./index-7861a26d.js";import{I as U}from"./index-85ccd873.js";import"./index-6c6fed8e.js";import"./utils-1d8dfadf.js";import"./index-14b5dea2.js";import"./index-f57b4c5f.js";import"./use-tab-status-92e284d0.js";const q="_cellGroup_bmhzf_1",$="_cellGroupIn_bmhzf_6",J="_cell_bmhzf_1",K="_iconTeacher_bmhzf_17",Q="_username_bmhzf_25",X="_name_bmhzf_25",Z="_userName_bmhzf_41",ee="_cellInfo_bmhzf_49",se="_times_bmhzf_52",ae="_title_bmhzf_60",le="_time1_bmhzf_64",te="_remark_bmhzf_67",oe="_remarkTitle_bmhzf_74",l={cellGroup:q,cellGroupIn:$,cell:J,iconTeacher:K,username:Q,name:X,class:"_class_bmhzf_34",userName:Z,cellInfo:ee,times:se,title:ae,time1:le,remark:te,remarkTitle:oe},re=_({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5]}},setup(o,{slots:c}){const s=w({loading:!1});return g(()=>{s.loading=o.show}),d(()=>o.show,()=>{s.loading=o.show}),()=>e(R,{loading:s.loading,style:"flex-wrap: wrap"},{template:()=>e("div",{style:{height:"calc(100vh - var(--header-height))",overflow:"hidden",width:"100%"}},[e("div",{class:l.cellGroup},[o.showCount.map(()=>e(F,{class:l.cellGroupIn},{default:()=>[e(v,{center:!0,clickable:!1,class:l.cell},{icon:()=>e(Y,{class:l.iconTeacher},null),title:()=>e("div",{class:l.username},[e(m,{rowWidth:"40%",style:{width:"120px"},class:l.name},null),e(m,{rowWidth:"40%",style:{width:"120px"},class:l.class},null)])}),e(v,{center:!0,clickable:!1,class:l.cell,titleClass:l.cellInfo},{title:()=>e("div",{class:l.info},[e(m,{rowWidth:"40%",class:[l.times,l.time1]},null),e(m,{class:[l.times],rowWidth:"40%"},null),e(m,{class:l.remark,rowWidth:"100%"},null)])})]}))])]),default:()=>c.default&&c.default()})}}),ce=_({name:"drop-down-modal",props:{selectValues:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},open:{type:Boolean,default:!1}},emits:["dropDownClose","dropDownConfirm"],setup(o,{emit:c}){const s=w({values:[]}),u=y();return g(()=>{s.values=o.selectValues}),d(()=>o.selectValues,()=>{s.values=o.selectValues}),d(()=>o.open,()=>{setTimeout(()=>{s.values=o.selectValues},100)}),()=>e(k,null,[e(j,{ref:u,modelValue:s.values,"onUpdate:modelValue":t=>s.values=t,formatter:E,columnsType:["year","month"],visibleOptionNum:5,showToolbar:!1},null),e("div",{class:["btnGroupPopup","van-hairline--top"]},[e(T,{round:!0,onClick:()=>c("dropDownClose")},{default:()=>[n("取消")]}),e(T,{type:"primary",round:!0,onClick:async()=>{c("dropDownConfirm",u.value.modelValue)}},{default:()=>[n("确定")]})])])}}),ne="_searchContainer_1kni7_1",ue="_searchMoreGroup_1kni7_9",ie="_searchTitle_1kni7_15",pe="_searchTypeGroup_1kni7_23",me="_searchTypeFlex_1kni7_30",de="_searchTypeItem_1kni7_30",he="_searchTypeFlex1_1kni7_33",fe="_searchTypeFlex2_1kni7_45",r={searchContainer:ne,searchMoreGroup:ue,searchTitle:ie,searchTypeGroup:pe,searchTypeFlex:me,searchTypeItem:de,searchTypeFlex1:he,searchTypeFlex2:fe,"is-active":"_is-active_1kni7_61"},ye=_({name:"drop-down-modal",props:{selectValues:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},open:{type:Boolean,default:!1}},emits:["dropDownClose","dropDownConfirm"],setup(o,{emit:c}){const s=w({values:[]});y(),g(()=>{s.values=o.selectValues}),d(()=>o.selectValues,()=>{s.values=o.selectValues}),d(()=>o.open,()=>{setTimeout(()=>{s.values=o.selectValues},100)});const u=t=>{if(t.length>11){const h=t.substring(0,6),i=t.substring(t.length-5,t.length);return h+"..."+i}else return t};return()=>e(k,null,[e("div",{class:r.searchContainer},[o.columns.length>0&&e(k,null,[e("div",{class:r.searchTitle},[n("乐团")]),e("div",{class:[r.searchTypeGroup,r.searchTypeFlex]},[e("div",{class:[r.searchTypeItem,s.values.musicGroupIds===""&&r["is-active"]],onClick:()=>{s.values.musicGroupIds=""}},[n("全部乐团")]),o.columns.map(t=>e("div",{class:[r.searchTypeItem,t.value===s.values.musicGroupIds&&r["is-active"]],onClick:()=>{s.values.musicGroupIds=t.value}},[u(t.text)]))])]),e("div",{class:r.searchTitle},[n("班级类型")]),e("div",{class:[r.searchTypeGroup,r.searchTypeFlex]},[Object.keys(b).map(t=>e("div",{class:[r.searchTypeItem,t===s.values.classGroupType&&r["is-active"]],onClick:()=>{s.values.classGroupType=t}},[b[t]]))]),e("div",{class:r.searchTitle},[n("课程类型")]),e("div",{class:[r.searchTypeGroup,r.searchTypeFlex]},[Object.keys(S).map(t=>e("div",{class:[r.searchTypeItem,t===s.values.courseScheduleType&&r["is-active"]],onClick:()=>{s.values.courseScheduleType=t}},[S[t]]))])]),e("div",{class:["btnGroupPopup","van-hairline--top"]},[e(T,{round:!0,onClick:()=>c("dropDownConfirm",{musicGroupIds:"",classGroupType:"",courseScheduleType:""})},{default:()=>[n("重置")]}),e(T,{type:"primary",round:!0,onClick:async()=>{c("dropDownConfirm",s.values)}},{default:()=>[n("确定")]})])])}}),ze=_({name:"student-leave-record",setup(){const o=y(),c=y();A();const s=w({listState:{loading:!0,dataShow:!0,finished:!1,refreshing:!1},isClick:!1,params:{createTime:[C().format("YYYY"),C().format("MM")],musicGroupIds:"",classGroupType:"",courseScheduleType:"",search:"",page:1,rows:20},orchestraColumns:[],list:[]}),u=a=>{a.value&&a.value.toggle()},t=async()=>{try{if(s.isClick)return;s.isClick=!0;const{createTime:a,...f}=s.params,G=a.join("-")+"-01",M=C(G).endOf("month").format("YYYY-MM-DD"),{data:V}=await D.post("/api-web/schoolStudentHomework/queryStudentLeave",{data:{...f,startTime:G,endTime:M}}),p=V||{};s.listState.refreshing?s.list=p.rows||[]:s.list=s.list.concat(p.rows||[]),s.listState.finished=p.pageNo>=p.totalPage,s.params.page=p.pageNo+1}catch(a){}finally{setTimeout(()=>{s.listState.dataShow=s.list.length>0,s.listState.refreshing=!1,s.listState.loading=!1,s.isClick=!1},300)}},h=a=>a?a.substring(0,5):"",i=()=>{s.params.page=1,t()},x=async()=>{try{const{data:a}=await D.get("/api-web/cooperationOrgan/musicGroupPage");(a||[]).forEach(f=>{s.orchestraColumns.push({text:f.name,value:f.id})})}catch(a){}};return g(()=>{x(),t()}),()=>e("div",{class:l.studentLeaveRecord},[e(B,{position:"top"},{default:()=>[e(z,null,null),e(P,{placeholder:"请输入学员姓名/手机号",onSearch:a=>{s.params.search=a,s.listState.dataShow=!0,s.listState.refreshing=!0,s.list=[],i()}},null),e(W,null,{default:()=>[e(I,{ref:o,title:s.params.createTime.join("-")},{default:()=>[e(ce,{selectValues:s.params.createTime,open:o.value.state.showPopup,onDropDownClose:()=>u(o),onDropDownConfirm:a=>{s.params.createTime=a,u(o),s.listState.dataShow=!0,s.listState.refreshing=!0,s.list=[],i()}},null)]}),e(I,{ref:c,title:"筛选"},{default:()=>[e(ye,{selectValues:{musicGroupIds:s.params.musicGroupIds,classGroupType:s.params.classGroupType,courseScheduleType:s.params.courseScheduleType},columns:s.orchestraColumns,open:c.value.state.showPopup,onDropDownClose:()=>u(c),onDropDownConfirm:a=>{s.params.musicGroupIds=a.musicGroupIds,s.params.classGroupType=a.classGroupType,s.params.courseScheduleType=a.courseScheduleType,u(c),s.listState.refreshing=!0,s.listState.dataShow=!0,s.list=[],i()}},null)]})]})]}),e(re,{show:s.listState.loading,"onUpdate:show":a=>s.listState.loading=a},{default:()=>[e(L,{modelValue:s.listState.refreshing,"onUpdate:modelValue":a=>s.listState.refreshing=a,onRefresh:()=>i(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[e(H,{finished:s.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:t,immediateCheck:!1},{default:()=>[e("div",{class:l.cellGroup},[s.listState.dataShow?s.list.map(a=>e(F,{class:l.cellGroupIn},{default:()=>[e(v,{center:!0,clickable:!1,class:l.cell},{icon:()=>e(U,{src:a.avatar||O,fit:"cover",class:l.iconTeacher},null),title:()=>e("div",{class:l.username},[e("p",{class:l.name},[S[a.courseScheduleType],n("·"),a.classGroupName]),e("p",{class:l.class},[e("span",{class:l.userName},[a.username]),a.phone&&e("span",null,[a.phone])])])}),e(v,{center:!0,clickable:!1,class:l.cell,titleClass:l.cellInfo},{title:()=>e("div",{class:l.info},[e("div",{class:[l.times,l.time1]},[e("span",{class:l.title},[n("课程时间")]),e("span",null,[a.classDate," ",h(a.startClassTime),n("-"),h(a.endClassTime)])]),e("div",{class:[l.times]},[e("span",{class:l.title},[n("提交时间")]),e("span",null,[a.leaveTime])]),a.remark&&e("div",{class:l.remark},[e("div",{class:l.remarkTitle},[n("请假事由")]),e("p",null,[a.remark])])])})]})):e(N,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无记录"},null)])]})]})]})])}});export{ze as default};
|