1 |
- import{O as A}from"./index.8b92ee84.js";import{O as B}from"./index.bf624f4f.js";import{d as T,c as e,q as _,F as Y,ag as P,r as y,ah as p,aD as V,R as n,Z as x,$ as j,ai as C,ak as I,m as H,o as O,X as q,a5 as G,P as X,aj as Z}from"./index.83786b38.js";import{O as L}from"./index.1c35b110.js";import{s as S}from"./student-icon.30fb072d.js";import{I as F}from"./index.9ee4714a.js";import{L as E}from"./index.01e855e5.js";import{T as z,a as N}from"./index.30f48952.js";import{D as J}from"./index.dd69c300.js";import"./index.44821b13.js";import"./use-tab-status.fd542215.js";import"./index.533b56fc.js";import"./index.fe3d96f8.js";import"./utils.408ba788.js";import"./index.b3614a51.js";const K="_itemWrap_1xvws_1",Q="_wrapLeft_1xvws_9",ee="_numWrap_1xvws_14",te="_headerWrap_1xvws_28",ae="_studentName_1xvws_39",se="_tag_1xvws_46",ne="_wrapRight_1xvws_57",le="_itemRankWrap_1xvws_69",oe="_myTag_1xvws_109",re="_wall_1xvws_133";var l={itemWrap:K,wrapLeft:Q,numWrap:ee,headerWrap:te,studentName:ae,tag:se,wrapRight:ne,itemRankWrap:le,myTag:oe,wall:re},ie="./assets/first.9696dc0f.png",ue="./assets/second.e9b7016e.png",ce="./assets/third.6edc909a.png",U=T({props:["item","type","index"],name:"rank-item",setup(t){return()=>e(Y,null,[e("div",null,[e("div",{class:l.itemWrap},[e("div",{class:l.wrapLeft},[e("div",{class:l.numWrap},[t.index==1?e("img",{src:ie,alt:""},null):null,t.index==2?e("img",{src:ue,alt:""},null):null,t.index==3?e("img",{src:ce,alt:""},null):null,t.index>3?e("p",null,[t.index]):null]),e("div",{class:l.headerWrap},[e(F,{width:"100%",height:"100%",src:t.item.avatar?t.item.avatar:S,alt:"",fit:"cover"},null)]),e("div",null,[e("p",{class:l.studentName},[t.item.nickname]),e("div",{class:l.tag},[t.item.subjectNames?t.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:l.wrapRight},[t.type=="day"?e("p",null,[e("span",null,[t.item.practiceDays?t.item.practiceDays:0]),_(" \u5929")]):e("p",null,[e("span",null,[t.item.practiceTimes?t.item.practiceTimes:0]),_(" \u5206\u949F")])])])])])}}),$=T({props:["item","type","index"],name:"rank-item",setup(t){return()=>e(Y,null,[e("div",null,[e("div",{class:l.itemRankWrap},[e("div",{class:l.wrapLeft},[e("div",{class:l.headerWrap},[e(F,{width:"100%",height:"100%",src:t.item.avatar?t.item.avatar:S,alt:"",fit:"cover"},null)]),e("div",null,[e("p",{class:l.studentName},[t.item.nickname]),e("div",{class:l.myTag},[t.item.subjectNames?t.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:l.wrapRight},[t.item.ranking<=50?e("p",null,[e("span",null,[_("\u6211\u7684\u6392\u540D")]),t.item.ranking<=50?t.item.ranking:0]):e("p",null,[" ",e("span",null,[_("\u6682\u65E0\u6392\u540D")])])])]),e("div",{class:l.wall},null)])])}});function me(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!I(t)}var ve=T({name:"timer-bang",props:["toHeight"],emits:["setTime"],setup(t,{slots:g,attrs:b,emit:k}){P(),y({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[p().format("YYYY"),p().format("MM")]});const d=V("parentData",{practiceMonth:"",timeName:""}),s=y({practiceMonth:d.practiceMonth,page:1,rows:50,sortType:"PRACTICE_TIMES"}),o=n(!1),f=n(!1),u=n(!1),r=n(!1),i=n([]),w=n(t.toHeight),c=n({});x(()=>t.toHeight,a=>{w.value=a,console.log(w.value)}),x(()=>d.practiceMonth,a=>{s.practiceMonth=a,o.value=!0,m()});const m=async()=>{f.value=!0;try{o.value&&(s.page=1,i.value=[],o.value=!1);const a=await H.post("/api-student/student/page",{data:{...s}});if(i.value.length>0&&a.data.pages===1)return;s.page=a.data.current+1,i.value=a.data.rows,r.value=i.value.length>0,console.log(r.value," showContact.value "),f.value=!1,u.value=!0,c.value=a.data.extra}catch(a){const v=a.message;O(v),r.value=!1,u.value=!0}};j(()=>{m()});const D=()=>{u.value=!1,f.value=!0,m()};return()=>{var v;let a;return e("div",{class:!r.value&&"emptyRootContainer",style:{minHeight:`calc(100vh - ${w.value}px)`}},[r.value?e("div",null,[e(L,{modelValue:o.value,"onUpdate:modelValue":h=>o.value=h,onRefresh:D,style:"min-height: 100vh;"},{default:()=>[e(E,{finished:u.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:m,"loading-text":" "},me(a=i.value.map((h,M)=>e(U,{item:h,type:"time",index:M+1},null)))?a:{default:()=>[a]})]}),c.value&&((v=c.value)==null?void 0:v.ranking)?e($,{item:c.value},null):null]):e(C,null,null)])}}});function pe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!I(t)}var de=T({props:["toHeight"],emits:["setTime"],name:"day-bang",setup(t,{slots:g,attrs:b,emit:k}){P(),y({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[p().format("YYYY"),p().format("MM")]});const d=V("parentData",{practiceMonth:"",timeName:""}),s=y({practiceMonth:d.practiceMonth,page:1,rows:50,sortType:"PRACTICE_DAY"});n(new Date(p().subtract(10,"year").format("YYYY-MM-DD"))),n(new Date(p().add(10,"year").format("YYYY-MM-DD"))),n(["year","month"]);const o=n(!1),f=n(!1),u=n(!1),r=n(!1),i=n([]),w=n(t.toHeight),c=n({});console.log(t.toHeight),x(()=>t.toHeight,a=>{w.value=a}),x(()=>d.practiceMonth,a=>{s.practiceMonth=a,o.value=!0,m()});const m=async()=>{f.value=!0;try{o.value&&(s.page=1,i.value=[],o.value=!1);const a=await H.post("/api-student/student/page",{data:{...s}});if(i.value.length>0&&a.data.pages===1)return;s.page=a.data.current+1,i.value=a.data.rows,r.value=i.value.length>0,console.log(r.value," showContact.value "),f.value=!1,u.value=!0,c.value=a.data.extra}catch(a){const v=a.message;O(v),r.value=!1,u.value=!0}};j(()=>{m()});const D=()=>{u.value=!1,f.value=!0,m()};return()=>{var v;let a;return e("div",{class:!r.value&&"emptyRootContainer",style:{minHeight:`calc(100vh - ${w.value}px)`}},[r.value?e("div",null,[e(L,{modelValue:o.value,"onUpdate:modelValue":h=>o.value=h,onRefresh:D,style:"min-height: 100vh;"},{default:()=>[e(E,{"loading-text":" ",finished:u.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:m},pe(a=i.value.map((h,M)=>e(U,{item:h,type:"day",index:M+1},null)))?a:{default:()=>[a]})]}),c.value&&((v=c.value)==null?void 0:v.ranking)?e($,{item:c.value},null):null]):e(C,null,null)])}}});const fe="_topWrap_xa4v4_1",he="_topTime_xa4v4_6",ge="_rankTabs_xa4v4_16";var R={topWrap:fe,topTime:he,rankTabs:ge};const W=n("student");n("");var je=T({name:"ranking-list",setup(){P();const t=y({heightV:0,showPopoverTime:!1,currentDate:[p().format("YYYY"),p().format("MM")]}),g=y({practiceMonth:t.currentDate[0]+""+t.currentDate[1],timeName:t.currentDate[0]+"\u5E74"+t.currentDate[1]+"\u6708"});q("parentData",g);const b=s=>{t.heightV=s,console.log(t.heightV,"\u83B7\u53D6\u9AD8\u5EA6")},k=n(["year","month"]),d=s=>{g.practiceMonth=s.selectedValues[0]+s.selectedValues[1],g.timeName=s.selectedValues[0]+"\u5E74"+s.selectedValues[1]+"\u6708",t.showPopoverTime=!1};return()=>e(Y,null,[e(B,{position:"top",background:"#F8F8F8",onGetHeight:b},{default:()=>[e("div",{class:R.topWrap},[e(A,{color:"#ffffff",backIconColor:"white",background:"transparent",border:!1},null),e("span",{class:R.topTime,onClick:()=>t.showPopoverTime=!0},[g.timeName,_(" "),e(G,{name:t.showPopoverTime?"arrow-up":"arrow-down"},null)])]),e(z,{active:W.value,"onUpdate:active":s=>W.value=s,class:R.rankTabs,background:"rgba(224, 69, 21,.71)","title-active-color":"#fff","title-inactive-color":"#fff",color:"#fff"},{default:()=>[e(N,{name:"day",title:"\u5929\u6570\u699C"},null),e(N,{name:"timer",title:"\u65F6\u957F\u699C"},null)]})]}),W.value=="timer"?e(ve,{toHeight:t.heightV},null):e(de,{toHeight:t.heightV},null),e(X,{show:t.showPopoverTime,"onUpdate:show":s=>t.showPopoverTime=s,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(J,{onCancel:()=>{t.showPopoverTime=!1},formatter:Z,onConfirm:d,modelValue:t.currentDate,"onUpdate:modelValue":s=>t.currentDate=s,columnsType:k.value},null)]})])}});export{je as default};
|