1 |
- import{d as C,P as B,x as I,r as m,y as E,D as S,a as e,A as r,b$ as f,z as L,a2 as b,R as v,a3 as D}from"./index-0f430fcc.js";import{s as a,p as F,a as N}from"./san-83b84cac.js";import{M as R}from"./index-006d92d8.js";import{t as q,m as U}from"./topDot-bec9e978.js";import{M as K}from"./index-8e16fac3.js";import{M}from"./index-747fbcc6.js";import{M as Y}from"./index-9129a731.js";import{h as O}from"./html2canvas.esm-9945d45c.js";import{L as W}from"./index-6efdf3f5.js";import{D as z}from"./index-f439da9a.js";import{P as V}from"./index-1a705d0f.js";import"./index-9b258718.js";import"./index-42a305c0.js";import"./index-787e92a9.js";import"./browser-e949d08f.js";import"./use-tab-status-dacb3ee9.js";const x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAzpJREFUWEftls9rE0EUx79vt2oTTLFeBCniD8STB7Vi9aB48Q+wgqAoIjWVIlYFd4ccdPQQZlYiVqS0qYgoCoL6B3gRe/AH/gJvRfAXXrxYaaRLlM2TKdOSxjTbJIdeupfdnffrM29m3hvCAj+0wPHRMICUcqmBl1L+aWYSDQEIIbqZecgEJqKTSqlHjULUBdDX17c8lUoNADheEfBWoVDoHxwc/F0vyLwBhBDbmfkegI02yEf7nvknosNKqdf1QMQCSCmdMAyFWW4AS2zab01MTPSb77a2tgFmns7IX6OXSCSUlLI0H5CaAL7vrwFwF8Bu6+wnM/cGQfCw3LnneQeIaBjASjs+CuCI1vpbHMScAEKIg6VSaYiIVlgnT5n5aBAE36s59Tyvg4juANhr5Mz8y3Ecs0Ef1IL4D8DzvBQR3QBw1Br+YeYLyWTySlxazXJNTk6eJ6LLAKaOKYA7zHwqCIJCNZBZAJ7ndRGR2WjrrfKY67qHstnsu7hUlsszmczWKIruA9hkxz8x8+EgCF5W+pkByGQyq6Io+gwgYTJIRCOtra1npZST5UamAFUWnznGkmEYXgPQY8oFgNB13XXZbPZHub8ZACHENmZ+Y4VprfVIRW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teMKYuly9JZrGJ5odzulvaOEHyfclpPseXUghoOaE5/n50Bc3JZKnmmV4lJLPsOygItyqaUU15aCAC7ataUwZlxJc6V9uJKUDqNLjV0uRbT2rg/X3AXxmvsEgAeAmvrIgwOuuc94MqBr5kMtcV+70j/F+xeq+H5KXTJYtgAAAABJRU5ErkJggg==",X=""+new URL("qrcode-bg-dcb7f2c0.png",import.meta.url).href,k=""+new URL("qr-bg-95b78c36.png",import.meta.url).href;function Q(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!D(u)}const ce=C({name:"tenant-apply-data",setup(){const u=B(),s=I({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:"1",urlItem:{}}),c=m(!1),p=m(!0),g=m(!1),A=m(!1),n=m([]),i=async()=>{if(!s.isClick){s.isClick=!0,c.value&&(n.value=[],s.page=1,c.value=!1);try{const o=await S.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(n.value.length>0&&o.data.current===1)return;n.value=n.value.concat(o.data.rows||[]),s.page=o.data.current+1,A.value=n.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}},w=()=>{g.value=!1,p.value=!0,i()},d=I({saveLoading:!1,image:null,shareLoading:!1}),y=()=>{if(d.saveLoading)return;d.saveLoading=!0;const o=document.getElementById("preview-container");console.log("1212121"),O(o,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async t=>{const l=t.toDataURL("image/png");d.image=l,s.qrcodeStatus=!0,d.saveLoading=!1}).catch(()=>{d.saveLoading=!1,console.log("222")})};E(async()=>{u.query.name?document.title=u.query.name+"报名统计":document.title="学生报名统计",await h(),await i()});const h=async()=>{try{const{data:o}=await S.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(R,{position:"top"},{default:()=>[e("div",{class:a.top},[e("div",{class:a.topWrap},[e("div",{class:a.topHead},[e("img",{src:q,class:a.topDot,alt:""},null),r("汇总数据")])]),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),r("学校数量")]),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:F,class:a.cardInfoImg,alt:""},null),r("报名人数")]),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:U,class:a.cardInfoImg,alt:""},null),r("会员人数")]),e("div",{class:a.cardLine},null)])]),e("div",{class:a.searchWrap},[e("div",{class:a.searechInfo},[e(M,{class:a.allDataWrap,shape:"round",background:"#F6F8F9",inputBackground:"white",placeholder:"请输入学校名称",onSearch:t=>{s.keyword=t,s.page=1,c.value=!0,i()}},null)]),e("div",{class:a.timerWrap,onClick:()=>s.perponStatus=!0},[s.sortName," ",e("img",{src:N,class:[a.sanIcon,s.perponStatus?a.routeSan:""],alt:""},null)])])])]}),e("div",{class:a.schoolList},[A.value?e(K,{modelValue:c.value,"onUpdate:modelValue":t=>c.value=t,onRefresh:w,class:a.refreshC},{default:()=>[e(W,{"loading-text":" ",finished:g.value,"finished-text":" ",onLoad:i},Q(o=n.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},[r("报名人数")])]),e("div",null,[e("p",{class:a.personNum},[t.registerMemberShipNum||0]),e("p",{class:a.title},[r("会员人数")])]),e("div",{onClick:()=>{s.urlItem=t,s.url=`${location.origin}/classroom-app/#/tenantDataShool?id=${t.schoolId}&name=${t.schoolName}`,L(()=>{y()})}},[e("p",{class:a.personNum},[e("img",{src:T},null)]),e("p",{class:a.title},[r("学校统计二维码")])])])])))?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(z,{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,h(),i(),s.yearStatus=!1}},null)]}),e(v,{show:s.perponStatus,"onUpdate:show":t=>s.perponStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(V,{showToolbar:!0,columns:s.sortList,onCancel:()=>s.perponStatus=!1,onConfirm:t=>{const l=t.selectedOptions[0];(l.value==="desc"||l.value==="asc")&&(s.sortId=l.value,s.sortKey="CLASS"),l.value==="mdesc"&&(s.sortId="desc",s.sortKey="MEMBER"),l.value==="masc"&&(s.sortId="asc",s.sortKey="MEMBER"),s.sortName=l.text,c.value=!0,i(),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("img",{src:d.image,class:a.image},null),e("p",{class:a.btnText},[r("长按或截图保存二维码")])]}),e("div",{class:a.templateSection},[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:k,class:a.qrbg},null),e(Y,{class:a.mqrcode,text:s.url,logoSize:"small",size:"100%"},null)])])])])])])}}});export{ce as default};
|