index-aefd730e.js 9.6 KB

1
  1. import{d as B,P as E,x as S,r as m,y as L,D as w,a as e,A as l,b$ as f,a2 as b,R as v,C as N,a3 as R}from"./index-869d77fb.js";import{s as a,p as D,a as F}from"./san-6ea3ad8d.js";import{M as q}from"./index-3eb77ad0.js";import{t as U,m as K}from"./topDot-bec9e978.js";import{M}from"./index-7af89263.js";import{M as Y}from"./index-d315d9dc.js";import{M as O}from"./index-32adfdfb.js";import{h as W}from"./html2canvas.esm-9945d45c.js";import{L as V}from"./index-f12c44b8.js";import{D as k}from"./index-da1851f9.js";import{P as z}from"./index-6f985828.js";import"./index-155c29c2.js";import"./index-0153d173.js";import"./index-1c6c2ec0.js";import"./browser-e949d08f.js";import"./use-tab-status-0ed30c24.js";const X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAzpJREFUWEftls9rE0EUx79vt2oTTLFeBCniD8STB7Vi9aB48Q+wgqAoIjWVIlYFd4ccdPQQZlYiVqS0qYgoCoL6B3gRe/AH/gJvRfAXXrxYaaRLlM2TKdOSxjTbJIdeupfdnffrM29m3hvCAj+0wPHRMICUcqmBl1L+aWYSDQEIIbqZecgEJqKTSqlHjULUBdDX17c8lUoNADheEfBWoVDoHxwc/F0vyLwBhBDbmfkegI02yEf7nvknosNKqdf1QMQCSCmdMAyFWW4AS2zab01MTPSb77a2tgFmns7IX6OXSCSUlLI0H5CaAL7vrwFwF8Bu6+wnM/cGQfCw3LnneQeIaBjASjs+CuCI1vpbHMScAEKIg6VSaYiIVlgnT5n5aBAE36s59Tyvg4juANhr5Mz8y3Ecs0Ef1IL4D8DzvBQR3QBw1Br+YeYLyWTySlxazXJNTk6eJ6LLAKaOKYA7zHwqCIJCNZBZAJ7ndRGR2WjrrfKY67qHstnsu7hUlsszmczWKIruA9hkxz8x8+EgCF5W+pkByGQyq6Io+gwgYTJIRCOtra1npZST5UamAFUWnznGkmEYXgPQY8oFgNB13XXZbPZHub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e+gEpjq0DLrRypTgQz2f4teMKYuly9JZrGJ5odzulvaOEHyfclpPseXUghoOaE5/n50Bc3JZKnmmV4lJLPsOygItyqaUU15aCAC7ataUwZlxJc6V9uJKUDqNLjV0uRbT2rg/X3AXxmvsEgAeAmvrIgwOuuc94MqBr5kMtcV+70j/F+xeq+H5KXTJYtgAAAABJRU5ErkJggg==",x=""+new URL("qrcode-bg-dcb7f2c0.png",import.meta.url).href,Q=""+new URL("qr-bg-95b78c36.png",import.meta.url).href;function P(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!R(u)}const ne=B({name:"tenant-apply-data",setup(){const u=E(),s=S({keyword:"",id:u.query.id,yearStatus:!1,schoolId:null,year:[new Date().getFullYear()],yearName:new Date().getFullYear(),classList:[],statObj:{registerNum:0,schoolNum: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,qrcodeStatus:!1,url:"",urlItem:{}}),c=m(!1),p=m(!0),g=m(!1),A=m(!1),i=m([]),d=async()=>{if(!s.isClick){s.isClick=!0,c.value&&(i.value=[],s.page=1,c.value=!1);try{const o=await w.post("/edu-app/open/school/schoolRegisterPage",{data:{tenantId:s.id,page:s.page,rows:s.rows,year:s.yearName,keyword:s.keyword,sort:s.sortId,sortKey:s.sortKey}});if(i.value.length>0&&o.data.current===1)return;i.value=i.value.concat(o.data.rows||[]),s.page=o.data.current+1,A.value=i.value.length>0,p.value=!1,g.value=o.data.current>=o.data.pages}catch(o){A.value=!1,g.value=!0}finally{p.value=!1}s.isClick=!1}},y=()=>{g.value=!1,p.value=!0,d()},n=S({saveLoading:!1,image:null,shareLoading:!1}),C=()=>{if(!n.saveLoading)if(n.saveLoading=!0,n.image)h();else{const o=document.getElementById("preview-container");W(o,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async t=>{const r=t.toDataURL("image/png");n.image=r,h()}).catch(()=>{n.saveLoading=!1})}},h=async()=>{setTimeout(()=>{n.saveLoading=!1},100);const o=document.createElement("a");o.setAttribute("download",s.urlItem.schoolName+"统计.png"),o.href=n.image,o.click()};L(async()=>{u.query.name?document.title=u.query.name+"报名统计":document.title="学生报名统计",await I(),await d()});const I=async()=>{try{const{data:o}=await w.post("/edu-app/open/school/schoolRegisterStat",{data:{tenantId:s.id,year:s.yearName}});s.statObj=o}catch(o){}};return()=>{let o;return e("div",{class:a.tenantAllData},[e(q,{position:"top"},{default:()=>[e("div",{class:a.top},[e("div",{class:a.topWrap},[e("div",{class:a.topHead},[e("img",{src:U,class:a.topDot,alt:""},null),l("汇总数据")])]),e("div",{class:a.cardWrap},[e("div",{class:[a.schoolCard,a.cardItem]},[e("div",{class:a.cardNum},[f(s.statObj.schoolNum).format("0,0")]),e("div",{class:a.cardInfo},[e("img",{src:X,class:a.cardInfoImg,alt:""},null),l("学校数量")]),e("div",{class:a.cardLine},null)]),e("div",{class:[a.studentCard,a.cardItem]},[e("div",{class:a.cardNum},[f(s.statObj.registerNum).format("0,0")]),e("div",{class:a.cardInfo},[e("img",{src:D,class:a.cardInfoImg,alt:""},null),l("报名人数")]),e("div",{class:a.cardLine},null)]),e("div",{class:[a.memberCard,a.cardItem]},[e("div",{class:a.cardNum},[f(s.statObj.registerMemberShipNum).format("0,0")]),e("div",{class:a.cardInfo},[e("img",{src:K,class:a.cardInfoImg,alt:""},null),l("会员人数")]),e("div",{class:a.cardLine},null)])]),e("div",{class:a.searchWrap},[e("div",{class:a.searechInfo},[e(Y,{class:a.allDataWrap,shape:"round",background:"#F6F8F9",inputBackground:"white",placeholder:"请输入学校名称",onSearch:t=>{s.keyword=t,s.page=1,c.value=!0,d()}},null)]),e("div",{class:a.timerWrap,onClick:()=>s.perponStatus=!0},[s.sortName," ",e("img",{src:F,class:[a.sanIcon,s.perponStatus?a.routeSan:""],alt:""},null)])])])]}),e("div",{class:a.schoolList},[A.value?e(M,{modelValue:c.value,"onUpdate:modelValue":t=>c.value=t,onRefresh:y,class:a.refreshC},{default:()=>[e(V,{"loading-text":" ",finished:g.value,"finished-text":" ",onLoad:d},P(o=i.value.map(t=>e("div",{class:a.schoolItem},[e("div",{class:a.schoolNameWrap},[e("p",{class:a.schoolName},[t.schoolName])]),e("div",{class:a.schoolCountWrap},[e("div",null,[e("p",{class:a.personNum},[t.registerNum||0]),e("p",{class:a.title},[l("报名人数")])]),e("div",null,[e("p",{class:a.personNum},[t.registerMemberShipNum||0]),e("p",{class:a.title},[l("会员人数")])]),e("div",{onClick:()=>{s.qrcodeStatus=!0,s.urlItem=t,s.url=`${location.origin}/classroom-app/#/tenantDataShool?id=${t.schoolId}&name=${t.schoolName}`}},[e("p",{class:a.personNum},[e("img",{src:T},null)]),e("p",{class:a.title},[l("学校统计二维码")])])])])))?o:{default:()=>[o]})]}):null,!A.value&&!p.value&&e(b,{description:"暂无学校信息",class:a.emptyC},null)]),e(v,{show:s.yearStatus,"onUpdate:show":t=>s.yearStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(k,{showToolbar:!0,modelValue:s.year,"onUpdate:modelValue":t=>s.year=t,"columns-type":["year"],onCancel:()=>s.yearStatus=!1,onConfirm:t=>{console.log(t),s.year=[t.selectedValues[0]],s.yearName=t.selectedValues[0],s.page=1,c.value=!0,I(),d(),s.yearStatus=!1}},null)]}),e(v,{show:s.perponStatus,"onUpdate:show":t=>s.perponStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(z,{showToolbar:!0,columns:s.sortList,onCancel:()=>s.perponStatus=!1,onConfirm:t=>{const r=t.selectedOptions[0];(r.value==="desc"||r.value==="asc")&&(s.sortId=r.value,s.sortKey="CLASS"),r.value==="mdesc"&&(s.sortId="desc",s.sortKey="MEMBER"),r.value==="masc"&&(s.sortId="asc",s.sortKey="MEMBER"),s.sortName=r.text,c.value=!0,d(),s.perponStatus=!1}},null)]}),e(v,{show:s.qrcodeStatus,"onUpdate:show":t=>s.qrcodeStatus=t,class:a.popupQrcode},{default:()=>[e("i",{class:a.iconClose,onClick:()=>s.qrcodeStatus=!1},null),e("div",{class:[a.shareContaienr],id:"preview-container"},[e("img",{src:x,class:a.qrcodeBg},null),e("div",{class:a.sectionGroup},[e("div",{class:a.section},[e("div",{class:a.memo},[s.urlItem.schoolName]),e("div",{class:a.qrcodeSection},[e("img",{src:Q,class:a.qrbg},null),e(O,{class:a.mqrcode,text:s.url,logoSize:"small",size:"100%"},null)])])])]),e(N,{type:"primary",round:!0,block:!0,class:a.downloadBtn,onClick:C},{default:()=>[l("下载二维码")]})]})])}}});export{ne as default};