import{d as S,U as B,q as y,r as n,x as E,y as N,D as f,a,A,bP as I,a0 as F,V as h,a1 as U}from"./index-74aaacd7.js";import{s as t,p as D,a as R}from"./san-cb394dc1.js";import{M as k}from"./index-d2dfee14.js";import{M as K}from"./index-f5c12fd3.js";import{M}from"./index-4261c7fd.js";import{D as b}from"./index-ea4619b2.js";import{L as x}from"./index-2aa7ff55.js";import{P as O}from"./index-66482e89.js";import"./index-cc31fe60.js";import"./index-5fc0aef0.js";import"./index-baa1bd27.js";import"./use-tab-status-3202cba9.js";const L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAzpJREFUWEftls9rE0EUx79vt2oTTLFeBCniD8STB7Vi9aB48Q+wgqAoIjWVIlYFd4ccdPQQZlYiVqS0qYgoCoL6B3gRe/AH/gJvRfAXXrxYaaRLlM2TKdOSxjTbJIdeupfdnffrM29m3hvCAj+0wPHRMICUcqmBl1L+aWYSDQEIIbqZecgEJqKTSqlHjULUBdDX17c8lUoNADheEfBWoVDoHxwc/F0vyLwBhBDbmfkegI02yEf7nvknosNKqdf1QMQCSCmdMAyFWW4AS2zab01MTPSb77a2tgFmns7IX6OXSCSUlLI0H5CaAL7vrwFwF8Bu6+wnM/cGQfCw3LnneQeIaBjASjs+CuCI1vpbHMScAEKIg6VSaYiIVlgnT5n5aBAE36s59Tyvg4juANhr5Mz8y3Ecs0Ef1IL4D8DzvBQR3QBw1Br+YeYLyWTySlxazXJNTk6eJ6LLAKaOKYA7zHwqCIJCNZBZAJ7ndRGR2WjrrfKY67qHstnsu7hUlsszmczWKIruA9hkxz8x8+EgCF5W+pkByGQyq6Io+gwgYTJIRCOtra1npZST5UamAFUWnznGkmEYXgPQY8oFgNB13XXZbPZHub8ZACHENmZ+Y4VprfVIRWBzGs4AuATghdZ6n5H7vv8EwE4AFxOJxLXKZfJ9/wSAvD09nUqpt7EARDRLUQixFsBtZt5jjVlr7VgAc9ymJkJEzwAcU0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abcFg1KjLr7TMB4THQMgc1DTNoOu6iRDiVJZlG/PEzAcAIwBXKeWsKIpjCFlwATB8Ft2klFUIkVJqrrXefawaRGQLmXkFYJ2CHiAHvUEq+gIWKaWWWuuN73g9EENO4ENCiKkXuBARnYPAcd1+4MrGGFM5dwgF2QOx1P8PLrbyK8j8x8fMCwDblJdqa/IbqK7rvTFmnNyi2Z9A7Jf4nb8DPgaXb3CNxFIAAAAASUVORK5CYII=";function V(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!U(r)}const $=S({name:"tenant-apply-data",setup(){const r=B(),v=y();n("all");const e=E({keyword:"",id:r.query.id,yearStatus:!1,schoolId:null,year:[new Date().getFullYear()],yearName:new Date().getFullYear(),classList:[],statObj:{registerNum:0,schoolNum:0},perponStatus:!1,sortId:"desc",sortName:"人数降序",sortList:[{value:"desc",text:"人数降序"},{value:"asc",text:"人数升序"}],page:1,rows:20,isClick:!1}),l=n(!1),i=n(!0),d=n(!1),p=n(!1),c=n([]),u=async()=>{if(!e.isClick){e.isClick=!0,l.value&&(c.value=[],e.page=1,l.value=!1);try{const o=await f.post("/edu-app/open/school/schoolRegisterPage",{data:{tenantId:e.id,page:e.page,rows:e.rows,year:e.yearName,keyword:e.keyword,sort:e.sortId}});if(c.value.length>0&&o.data.current===1)return;c.value=c.value.concat(o.data.rows||[]),e.page=o.data.current+1,p.value=c.value.length>0,i.value=!1,d.value=o.data.current>=o.data.pages}catch(o){p.value=!1,d.value=!0}finally{i.value=!1}e.isClick=!1}},w=()=>{d.value=!1,i.value=!0,u()};N(async()=>{document.title="学生报名统计",await m(),await u()});const C=o=>{v.push({path:"/tenamtDataDetail",query:{id:r.query.id,schoolId:o.schoolId,schoolName:o.schoolName}})},m=async()=>{try{const{data:o}=await f.post("/edu-app/open/school/schoolRegisterStat",{data:{tenantId:e.id,year:e.yearName}});e.statObj=o}catch(o){}};return()=>{let o;return a("div",{class:t.tenantAllData},[a(k,{position:"top"},{default:()=>[a("div",{class:t.top},[a("div",{class:t.topWrap},[a("div",{class:t.topHead},[a("img",{src:W,class:t.topDot,alt:""},null),A("汇总数据")])]),a("div",{class:t.cardWrap},[a("div",{class:[t.schoolCard,t.cardItem]},[a("div",{class:t.cardNum},[" ",I(e.statObj.schoolNum).format("0,0")]),a("div",{class:t.cardInfo},[a("img",{src:L,class:t.cardInfoImg,alt:""},null),A("学校数量")]),a("div",{class:t.cardLine},null)]),a("div",{class:[t.studentCard,t.cardItem]},[a("div",{class:t.cardNum},[" ",I(e.statObj.registerNum).format("0,0")]),a("div",{class:t.cardInfo},[a("img",{src:D,class:t.cardInfoImg,alt:""},null),A("报名总人数")]),a("div",{class:t.cardLine},null)])]),a("div",{class:t.searchWrap},[a("div",{class:t.searechInfo},[a(M,{class:t.allDataWrap,shape:"round",background:"#F6F8F9",inputBackground:"white",placeholder:"请输入学校名称",onSearch:s=>{e.keyword=s,e.page=1,l.value=!0,u()}},null)]),a("div",{class:t.timerWrap,onClick:()=>e.perponStatus=!0},[e.sortName," ",a("img",{src:R,class:[t.sanIcon,e.perponStatus?t.routeSan:""],alt:""},null)])])])]}),a("div",{class:t.schoolList},[p.value?a(K,{modelValue:l.value,"onUpdate:modelValue":s=>l.value=s,onRefresh:w,class:t.refreshC},{default:()=>[a(x,{"loading-text":" ",finished:d.value,"finished-text":" ",onLoad:u},V(o=c.value.map(s=>a("div",{class:t.schoolItem,onClick:()=>C(s)},[a("div",{class:t.schoolNameWrap},[a("p",{class:t.title},[A("学校名称")]),a("p",{class:t.schoolName},[s.schoolName])]),a("div",{class:t.schoolCountWrap},[a("div",null,[a("p",{class:t.title},[A("报名人数")]),a("p",{class:t.personNum},[s.registerNum])]),a("img",{class:[t.arrow],src:Y,alt:""},null)])])))?o:{default:()=>[o]})]}):null,!p.value&&!i.value&&a(F,{description:"暂无学校信息",class:t.emptyC},null)]),a(h,{show:e.yearStatus,"onUpdate:show":s=>e.yearStatus=s,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[a(b,{showToolbar:!0,modelValue:e.year,"onUpdate:modelValue":s=>e.year=s,"columns-type":["year"],onCancel:()=>e.yearStatus=!1,onConfirm:s=>{console.log(s),e.year=[s.selectedValues[0]],e.yearName=s.selectedValues[0],e.page=1,l.value=!0,m(),u(),e.yearStatus=!1}},null)]}),a(h,{show:e.perponStatus,"onUpdate:show":s=>e.perponStatus=s,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[a(O,{showToolbar:!0,columns:e.sortList,onCancel:()=>e.perponStatus=!1,onConfirm:s=>{console.log(s);const g=s.selectedOptions[0];e.sortId=g.value,e.sortName=g.text,l.value=!0,u(),e.perponStatus=!1}},null)]})])}}});export{$ as default};