index.a77e18bf.js 7.7 KB

1
  1. import{O as A}from"./index.42df3325.js";import{O as B}from"./index.75b629b6.js";import{d as T,c as e,q as _,F as Y,ag as N,r as y,ah as p,aC as V,R as n,Z as x,$ as j,ai as C,aj as I,m as H,o as O,X as q,a5 as G,P as X}from"./index.13ca4bcb.js";import{O as L}from"./index.e4cacf09.js";import{s as S}from"./student-icon.30fb072d.js";import{I as F}from"./index.5240421c.js";import{L as E}from"./index.29df141b.js";import{T as Z,a as P}from"./index.4cd47248.js";import{D as z}from"./index.48909ec9.js";import"./index.f49da0ce.js";import"./use-tab-status.45bc1956.js";import"./index.510ab853.js";import"./index.13b30705.js";import"./utils.f04cb9c5.js";import"./index.cf95299d.js";const J="_itemWrap_1xvws_1",K="_wrapLeft_1xvws_9",Q="_numWrap_1xvws_14",ee="_headerWrap_1xvws_28",te="_studentName_1xvws_39",ae="_tag_1xvws_46",se="_wrapRight_1xvws_57",ne="_itemRankWrap_1xvws_69",le="_myTag_1xvws_109",oe="_wall_1xvws_133";var l={itemWrap:J,wrapLeft:K,numWrap:Q,headerWrap:ee,studentName:te,tag:ae,wrapRight:se,itemRankWrap:ne,myTag:le,wall:oe},re="./assets/first.9696dc0f.png",ie="./assets/second.e9b7016e.png",ue="./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:re,alt:""},null):null,t.index==2?e("img",{src:ie,alt:""},null):null,t.index==3?e("img",{src:ue,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 ce(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!I(t)}var me=T({name:"timer-bang",props:["toHeight"],emits:["setTime"],setup(t,{slots:g,attrs:b,emit:k}){N(),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),h=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()=>{h.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 "),h.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,h.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":f=>o.value=f,onRefresh:D,style:"min-height: 100vh;"},{default:()=>[e(E,{finished:u.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:m,"loading-text":" "},ce(a=i.value.map((f,M)=>e(U,{item:f,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 ve(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!I(t)}var pe=T({props:["toHeight"],emits:["setTime"],name:"day-bang",setup(t,{slots:g,attrs:b,emit:k}){N(),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),h=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()=>{h.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 "),h.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,h.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":f=>o.value=f,onRefresh:D,style:"min-height: 100vh;"},{default:()=>[e(E,{"loading-text":" ",finished:u.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:m},ve(a=i.value.map((f,M)=>e(U,{item:f,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 de="_topWrap_xa4v4_1",he="_topTime_xa4v4_6",fe="_rankTabs_xa4v4_16";var R={topWrap:de,topTime:he,rankTabs:fe};const W=n("student");n("");var Ve=T({name:"ranking-list",setup(){N();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(P,{name:"day",title:"\u5929\u6570\u699C"},null),e(P,{name:"timer",title:"\u65F6\u957F\u699C"},null)]})]}),W.value=="timer"?e(me,{toHeight:t.heightV},null):e(pe,{toHeight:t.heightV},null),e(X,{show:t.showPopoverTime,"onUpdate:show":s=>t.showPopoverTime=s,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(z,{onCancel:()=>{t.showPopoverTime=!1},onConfirm:d,modelValue:t.currentDate,"onUpdate:modelValue":s=>t.currentDate=s,title:"\u9009\u62E9\u5E74\u6708",columnsType:k.value},null)]})])}});export{Ve as default};