1 |
- import{d as M,c as e,q as _,F as R,ag as W,r as T,ai as s,aJ as j,R as i,Z as x,$ as H,ak as I,al as P,m as N,o as O,ah as B,X as U,aj as q,a5 as A}from"./index.5f7ffb46.js";import{O as G}from"./index.7790de2a.js";import{O as V}from"./index.1d6ac2c5.js";import{s as L}from"./student-icon.30fb072d.js";import{I as F}from"./index.276a5d68.js";import{L as S}from"./index.9ef28852.js";import{i as J}from"./isBetween.318963fd.js";import{T as X,a as C}from"./index.6bbd7daa.js";import{C as Z}from"./index.47129549.js";import"./use-tab-status.69b57a37.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";import"./utils.0f86fc1f.js";import"./Picker.148c9d83.js";const z="_itemWrap_1xvws_1",K="_wrapLeft_1xvws_9",Q="_numWrap_1xvws_14",ee="_headerWrap_1xvws_28",ae="_studentName_1xvws_39",te="_tag_1xvws_46",ne="_wrapRight_1xvws_57",se="_itemRankWrap_1xvws_69",le="_myTag_1xvws_109",oe="_wall_1xvws_133";var r={itemWrap:z,wrapLeft:K,numWrap:Q,headerWrap:ee,studentName:ae,tag:te,wrapRight:ne,itemRankWrap:se,myTag:le,wall:oe},ie="./assets/first.9696dc0f.png",re="./assets/second.e9b7016e.png",ue="./assets/third.6edc909a.png",$=M({props:["item","type","index"],name:"rank-item",setup(a){return()=>e(R,null,[e("div",null,[e("div",{class:r.itemWrap},[e("div",{class:r.wrapLeft},[e("div",{class:r.numWrap},[a.index==1?e("img",{src:ie,alt:""},null):null,a.index==2?e("img",{src:re,alt:""},null):null,a.index==3?e("img",{src:ue,alt:""},null):null,a.index>3?e("p",null,[a.index]):null]),e("div",{class:r.headerWrap},[e(F,{width:"100%",height:"100%",src:a.item.avatar?a.item.avatar:L,alt:"",fit:"cover"},null)]),e("div",null,[e("p",{class:r.studentName},[a.item.nickname]),e("div",{class:r.tag},[a.item.subjectNames?a.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:r.wrapRight},[a.type=="day"?e("p",null,[e("span",null,[a.item.practiceDays?a.item.practiceDays:0]),_(" \u5929")]):e("p",null,[e("span",null,[a.item.practiceTimes?a.item.practiceTimes:0]),_(" \u5206\u949F")])])])])])}}),E=M({props:["item","type","index"],name:"rank-item",setup(a){return()=>e(R,null,[e("div",null,[e("div",{class:r.itemRankWrap},[e("div",{class:r.wrapLeft},[e("div",{class:r.headerWrap},[e(F,{width:"100%",height:"100%",src:a.item.avatar?a.item.avatar:L,alt:"",fit:"cover"},null)]),e("div",null,[e("p",{class:r.studentName},[a.item.nickname]),e("div",{class:r.myTag},[a.item.subjectNames?a.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:r.wrapRight},[a.item.ranking<=50?e("p",null,[e("span",null,[_("\u6211\u7684\u6392\u540D")]),a.item.ranking<=50?a.item.ranking:0]):e("p",null,[" ",e("span",null,[_("\u6682\u65E0\u6392\u540D")])])])]),e("div",{class:r.wall},null)])])}});function ce(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!P(a)}var me=M({name:"timer-bang",props:["toHeight"],emits:["setTime"],setup(a,{slots:u,attrs:Y,emit:l}){W(),T({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[s().format("YYYY"),s().format("MM")]});const g=j("parentData",{practiceMonth:""}),n=T({practiceMonth:g.practiceMonth,page:1,rows:50,sortType:"PRACTICE_TIMES"}),o=i(!1),w=i(!1),v=i(!1),c=i(!0),m=i([]),h=i(a.toHeight),d=i({});x(()=>a.toHeight,t=>{h.value=t,console.log(h.value)}),x(()=>g.practiceMonth,t=>{n.practiceMonth=t,o.value=!0,p()});const p=async()=>{w.value=!0;try{o.value&&(n.page=1,m.value=[],o.value=!1);const t=await N.post("/api-student/student/page",{data:{...n}});if(m.value.length>0&&t.data.pages===1)return;n.page=t.data.current+1,m.value=t.data.rows,c.value=m.value.length>0,console.log(c.value," showContact.value "),w.value=!1,v.value=!0,d.value=t.data.extra}catch(t){const f=t.message;O(f),c.value=!1,v.value=!0}};H(()=>{p()});const D=()=>{v.value=!1,w.value=!0,p()};return()=>{var f;let t;return e("div",{class:!c.value&&"emptyRootContainer",style:{minHeight:`calc(100vh - ${h.value}px)`}},[c.value?e("div",null,[e(V,{modelValue:o.value,"onUpdate:modelValue":y=>o.value=y,onRefresh:D,style:{minHeight:`calc(100vh - ${h.value}px - 1.17333rem)`}},{default:()=>[e(S,{finished:v.value,"finished-text":" ",onLoad:p,"loading-text":" "},ce(t=m.value.map((y,b)=>e($,{item:y,type:"time",index:b+1},null)))?t:{default:()=>[t]})]}),d.value&&((f=d.value)==null?void 0:f.ranking)?e(E,{item:d.value},null):null]):e(I,null,null)])}}});function ve(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!P(a)}var de=M({props:["toHeight"],emits:["setTime"],name:"day-bang",setup(a,{slots:u,attrs:Y,emit:l}){W(),T({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[s().format("YYYY"),s().format("MM")]});const g=j("parentData",{practiceMonth:""}),n=T({practiceMonth:g.practiceMonth,page:1,rows:50,sortType:"PRACTICE_DAY"}),o=i(!1),w=i(!1),v=i(!1),c=i(!0),m=i([]),h=i(a.toHeight),d=i({});console.log(a.toHeight),x(()=>a.toHeight,t=>{h.value=t}),x(()=>g.practiceMonth,t=>{n.practiceMonth=t,o.value=!0,p()});const p=async()=>{w.value=!0;try{o.value&&(n.page=1,m.value=[],o.value=!1);const t=await N.post("/api-student/student/page",{data:{...n}});if(m.value.length>0&&t.data.pages===1)return;n.page=t.data.current+1,m.value=t.data.rows,c.value=m.value.length>0,console.log(c.value," showContact.value "),w.value=!1,v.value=!0,d.value=t.data.extra}catch(t){const f=t.message;O(f),c.value=!1,v.value=!0}};H(()=>{p()});const D=()=>{v.value=!1,w.value=!0,p()};return()=>{var f;let t;return e("div",{class:!c.value&&"emptyRootContainer",style:{minHeight:`calc(100vh - ${h.value}px)`}},[c.value?e("div",null,[e(V,{modelValue:o.value,"onUpdate:modelValue":y=>o.value=y,onRefresh:D,style:{minHeight:`calc(100vh - ${h.value}px - 1.17333rem)`}},{default:()=>[e(S,{"loading-text":" ",finished:v.value,"finished-text":" ",onLoad:p},ve(t=m.value.map((y,b)=>e($,{item:y,type:"day",index:b+1},null)))?t:{default:()=>[t]})]}),d.value&&((f=d.value)==null?void 0:f.ranking)?e(E,{item:d.value},null):null]):e(I,null,null)])}}});const pe="_topWrap_xa4v4_1",fe="_topTime_xa4v4_6",he="_rankTabs_xa4v4_16";var k={topWrap:pe,topTime:fe,rankTabs:he};s.extend(J);var je=M({name:"ranking-list",setup(){W();const a=B(),u=T({heightV:0,showPopoverTime:!1}),Y=i(a.query.type||"day"),l=T({practiceMonth:s().day(1).format("YYYYMMDD"),endTime:s().day(7).format("YYYY-MM-DD")});U("parentData",l);const g=n=>{u.heightV=n,console.log(u.heightV,"\u83B7\u53D6\u9AD8\u5EA6")};return()=>e(R,null,[e(G,{position:"top",background:"#F8F8F8",onGetHeight:g},{default:()=>[e("div",{class:k.topWrap},[e(q,{color:"#ffffff",backIconColor:"white",background:"transparent",border:!1},null),e("span",{class:k.topTime,onClick:()=>u.showPopoverTime=!0},[s(l.practiceMonth).format("YYYY-MM-DD"),_("~"),l.endTime," ",e(A,{name:u.showPopoverTime?"arrow-up":"arrow-down"},null)])]),e(X,{active:Y.value,"onUpdate:active":n=>Y.value=n,class:k.rankTabs,background:"rgba(224, 69, 21,.71)","title-active-color":"#fff","title-inactive-color":"#fff",color:"#fff"},{default:()=>[e(C,{name:"day",title:"\u5929\u6570\u699C"},null),e(C,{name:"time",title:"\u65F6\u957F\u699C"},null)]})]}),Y.value=="time"?e(me,{toHeight:u.heightV},null):e(de,{toHeight:u.heightV},null),e(Z,{show:u.showPopoverTime,"onUpdate:show":n=>u.showPopoverTime=n,firstDayOfWeek:1,showConfirm:!1,type:"range",maxRange:7,minDate:new Date("2023-02-27"),defaultDate:[s(l.practiceMonth).toDate(),s(l.endTime).toDate()],style:{height:"70%"},onSelect:n=>{if(l.practiceMonth="",l.endTime="",!s(n[0]).isBetween(s(l.practiceMonth),s(l.endTime))){const o=s(n[0]).day();o===0?(l.practiceMonth=s(n[0]).subtract(6,"day").format("YYYYMMDD"),l.endTime=s(n[0]).format("YYYY-MM-DD")):o===1?(l.practiceMonth=s(n[0]).format("YYYYMMDD"),l.endTime=s(n[0]).add(6,"day").format("YYYY-MM-DD")):(l.practiceMonth=s(n[0]).subtract(o-1,"day").format("YYYYMMDD"),l.endTime=s(n[0]).add(7-o,"day").format("YYYY-MM-DD"))}u.showPopoverTime=!1}},null)])}});export{je as default};
|