import{d as C,P as E,q as I,r as i,x as h,y as b,D as g,a,A as d,b$ as v,a2 as w,R as y,a3 as B}from"./index-869d77fb.js";import{s,p as N,a as D}from"./san-6ea3ad8d.js";import{M as F}from"./index-3eb77ad0.js";import{t as M,m as k}from"./topDot-bec9e978.js";import{M as j}from"./index-7af89263.js";import{M as P}from"./index-d315d9dc.js";import{D as G}from"./index-da1851f9.js";import{L}from"./index-f12c44b8.js";import{P as O}from"./index-6f985828.js";import"./index-155c29c2.js";import"./index-0153d173.js";import"./index-1c6c2ec0.js";import"./use-tab-status-0ed30c24.js";const U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjxJREFUWEftVzuIE1EUPXem0EzAxh9arGAKG0FBcBdEERt7G223sdFokc+bZ/Uq5718Co02FtpqY28jrmuxKwgKNhYRtFD8NUImWsxceUsCbkwmM7hOCjPNFO/ee879vTlDmPFDM8bHnMCmCiilnDAMl4loEYCb0J4eEa12u92H1qZUKp1j5pMAigk+ETOve553TykVD+02EfB9XzLz9Qxz8YyIiJlPpPUhomta62AsgXq9/pSIbCbPAbxOCLoPwFkAzsDGZvQIwMcEn8MAjjPzaqPRODWpAmvMvEhEVa11OykrKeWVOI5vWBvHca4GQXAzyd73/Qozt4hoXWu99NcEfN8/yMxdG4iISlrrt7kSEEIsAHg3AD1gjHn/fxGQUu6M4/jzYAb2BEHwLdcKWDAhhN0EGGPsBiQ+Wz6E0wBHz/8JgUqlsssCtdvtr9MIbTmBarVadF13Y/KjKFpotVq9XGdgvoYzr4CUcncURZ9s313X3RsEwZdcZ8CC1Wq18/bdbDYf5L4F0wBzuQeykEh1DwghVgBYsfCSiN4kAHzo9Xqy0+n8tDblcnlbsVi0Kmf/JB9mPgTgKBGtaK1PT9IDG6IhZWaXjTG3B9+ESwBupfEbFTt/yHIhxAUAS0Q0SZQeGQjQH0R0l5ltjGUA261QBfBqHBFmjgCsGWPu/36e+b9AKbWj3+8/BnBsBOhFoVA4o5T6nqYSY1uQ1tH23PO8iwCGvXwShuGd4UykjWPtMlcgS/A0tnMCM6/AL5lcwTDiXX8OAAAAAElFTkSuQmCC";function W(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!B(l)}const _=C({name:"tenant-apply-data",setup(){const l=E();I(),i("all");const e=h({keyword:"",id:l.query.id,yearStatus:!1,schoolId:null,year:[new Date().getFullYear()],yearName:new Date().getFullYear(),classList:[],statObj:{registerNum:0,classNum:0,registerMemberShipNum:0},perponStatus:!1,sortKey:"CLASS",sortId:"desc",sortName:"报名人数降序",sortList:[{value:"desc",text:"报名人数降序"},{value:"asc",text:"报名人数升序"},{value:"mdesc",text:"会员人数降序"},{value:"masc",text:"会员人数升序"}],page:1,rows:20,isClick:!1}),r=i(!1),p=i(!0),m=i(!1),f=i(!1),u=i([]),c=async()=>{if(!e.isClick){e.isClick=!0,r.value&&(u.value=[],e.page=1,r.value=!1);try{const o=await g.post("/edu-app/open/school/schoolRegisterClassPage",{data:{schoolId:e.id,page:e.page,rows:e.rows,keyword:e.keyword,sort:e.sortId,sortKey:e.sortKey}});if(u.value.length>0&&o.data.current===1)return;u.value=u.value.concat(o.data.rows||[]),e.page=o.data.current+1,f.value=u.value.length>0,p.value=!1,m.value=o.data.current>=o.data.pages}catch(o){f.value=!1,m.value=!0}finally{p.value=!1}e.isClick=!1}},S=()=>{m.value=!1,p.value=!0,c()};h({saveLoading:!1,image:null,shareLoading:!1}),b(async()=>{l.query.name?document.title=l.query.name+"报名统计":document.title="学生报名统计",await A(),await c()});const A=async()=>{try{const{data:o}=await g.post("/edu-app/open/school/schoolRegisterStat",{data:{schoolId:e.id}});e.statObj=o}catch(o){}};return()=>{let o;return a("div",{class:s.tenantAllData},[a(F,{position:"top"},{default:()=>[a("div",{class:s.top},[a("div",{class:s.topWrap},[a("div",{class:s.topHead},[a("img",{src:M,class:s.topDot,alt:""},null),d("汇总数据")])]),a("div",{class:s.cardWrap},[a("div",{class:[s.studentCard,s.cardItem]},[a("div",{class:s.cardNum},[v(e.statObj.registerNum).format("0,0")]),a("div",{class:s.cardInfo},[a("img",{src:N,class:s.cardInfoImg,alt:""},null),d("报名人数")]),a("div",{class:s.cardLine},null)]),a("div",{class:[s.memberCard,s.cardItem]},[a("div",{class:s.cardNum},[v(e.statObj.registerMemberShipNum).format("0,0")]),a("div",{class:s.cardInfo},[a("img",{src:k,class:s.cardInfoImg,alt:""},null),d("会员人数")]),a("div",{class:s.cardLine},null)]),a("div",{class:[s.classCard,s.cardItem]},[a("div",{class:s.cardNum},[v(e.statObj.classNum).format("0,0")]),a("div",{class:s.cardInfo},[a("img",{src:U,class:s.cardInfoImg,alt:""},null),d("班级数量")]),a("div",{class:s.cardLine},null)])]),a("div",{class:s.searchWrap},[a("div",{class:s.searechInfo},[a(P,{class:s.allDataWrap,shape:"round",background:"#F6F8F9",inputBackground:"white",placeholder:"请输入班级名称",onSearch:t=>{e.keyword=t,e.page=1,r.value=!0,c()}},null)]),a("div",{class:s.timerWrap,onClick:()=>e.perponStatus=!0},[e.sortName," ",a("img",{src:D,class:[s.sanIcon,e.perponStatus?s.routeSan:""],alt:""},null)])])])]}),a("div",{class:s.schoolList},[f.value?a(j,{modelValue:r.value,"onUpdate:modelValue":t=>r.value=t,onRefresh:S,class:s.refreshC},{default:()=>[a(L,{"loading-text":" ",finished:m.value,"finished-text":" ",onLoad:c},W(o=u.value.map(t=>a("div",{class:s.schoolItem},[a("div",{class:s.schoolNameWrap},[a("p",{class:s.schoolName},[t.classGroupName])]),a("div",{class:s.schoolCountWrap},[a("div",null,[a("p",{class:s.personNum},[t.registerNum||0]),a("p",{class:s.title},[d("报名人数")])]),a("div",null,[a("p",{class:s.personNum},[t.registerMemberShipNum||0]),a("p",{class:s.title},[d("会员人数")])])])])))?o:{default:()=>[o]})]}):null,!f.value&&!p.value&&a(w,{description:"暂无学校信息",class:s.emptyC},null)]),a(y,{show:e.yearStatus,"onUpdate:show":t=>e.yearStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[a(G,{showToolbar:!0,modelValue:e.year,"onUpdate:modelValue":t=>e.year=t,"columns-type":["year"],onCancel:()=>e.yearStatus=!1,onConfirm:t=>{console.log(t),e.year=[t.selectedValues[0]],e.yearName=t.selectedValues[0],e.page=1,r.value=!0,A(),c(),e.yearStatus=!1}},null)]}),a(y,{show:e.perponStatus,"onUpdate:show":t=>e.perponStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[a(O,{showToolbar:!0,columns:e.sortList,onCancel:()=>e.perponStatus=!1,onConfirm:t=>{const n=t.selectedOptions[0];(n.value==="desc"||n.value==="asc")&&(e.sortId=n.value,e.sortKey="CLASS"),n.value==="mdesc"&&(e.sortId="desc",e.sortKey="MEMBER"),n.value==="masc"&&(e.sortId="asc",e.sortKey="MEMBER"),e.sortName=n.text,r.value=!0,c(),e.perponStatus=!1}},null)]})])}}});export{_ as default};