index.42cee199.js 11 KB

1
  1. import{d as O,c as e,q as S,F as x,r as _,ai as i,R as m,Z as P,$ as W,ak as R,P as D,al as B,m as T,o as Y,ag as H,ah as q,aj as G,a5 as A}from"./index.1c621181.js";import{O as Z}from"./index.b491c24a.js";import{O as L}from"./index.b0685ec5.js";import{s as z}from"./student-icon.30fb072d.js";import{I as J}from"./index.4c221cbe.js";import{S as V}from"./index.d5b73933.js";import{L as F}from"./index.d5ee0b18.js";import{P as I}from"./index.53518914.js";import{i as K}from"./isBetween.c42926d4.js";import{T as Q,a as k}from"./index.88a00aa9.js";import{C as X}from"./index.36db2313.js";import"./use-tab-status.40058c51.js";import"./Picker.9bc4331c.js";import"./index.78a302c3.js";import"./utils.3d9f83cd.js";const ee="_chioseWrap_1ubpv_1",ae="_orchestraBand_1ubpv_12",te="_searchBand_1ubpv_23",se="_bandName_1ubpv_26",oe="_bangContainer_1ubpv_31";var U={chioseWrap:ee,orchestraBand:ae,searchBand:te,bandName:se,bangContainer:oe};const re="_itemWrap_y8c93_1",ne="_wrapLeft_y8c93_9",ce="_numWrap_y8c93_14",le="_headerWrap_y8c93_28",ie="_studentName_y8c93_39",ue="_tag_y8c93_45",me="_wrapRight_y8c93_56";var b={itemWrap:re,wrapLeft:ne,numWrap:ce,headerWrap:le,studentName:ie,tag:ue,wrapRight:me},he="./assets/first.9696dc0f.png",de="./assets/second.e9b7016e.png",pe="./assets/third.6edc909a.png",$=O({props:["item","type","index"],name:"rank-item",setup(t){return()=>e(x,null,[e("div",null,[e("div",{class:b.itemWrap},[e("div",{class:b.wrapLeft},[e("div",{class:b.numWrap},[t.index==1?e("img",{src:he,alt:""},null):null,t.index==2?e("img",{src:de,alt:""},null):null,t.index==3?e("img",{src:pe,alt:""},null):null,t.index>3?e("p",null,[t.index]):null]),e("div",{class:b.headerWrap},[e(J,{width:"48px",height:"48px",fit:"cover",src:t.item.avatar?t.item.avatar:z,alt:""},null)]),e("div",null,[e("p",{class:b.studentName},[t.item.nickname]),e("div",{class:b.tag},[t.item.subjectNames?t.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:b.wrapRight},[t.type=="day"?e("p",null,[e("span",null,[t.item.practiceDays?t.item.practiceDays:0]),S(" \u5929")]):e("p",null,[e("span",null,[t.item.practiceTimes?t.item.practiceTimes:0]),S(" \u5206\u949F")])])])])])}});function ve(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!B(t)}var fe=O({name:"timer-bang",props:["toHeight","startTime","endTime"],setup(t){const c=_({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[i().format("YYYY"),i().format("MM")]}),a=_({practiceMonth:t.startTime,orchestraId:"",orchestraName:"\u5168\u90E8\u4E50\u56E2",subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8",page:1,rows:50,sortType:"PRACTICE_TIMES"}),p=m(!1),s=m(!1),u=m(!1),h=m(!1),f=m([]),v=m(t.toHeight);P(()=>t.toHeight,n=>{v.value=n,console.log(v.value)}),P(()=>t.startTime,()=>{a.practiceMonth=t.startTime,p.value=!0,d()});const d=async()=>{s.value=!0;try{p.value&&(a.page=1,f.value=[],p.value=!1);const n=await T.post("/api-school/student/page",{data:{...a}});if(f.value.length>0&&n.data.pages===1)return;a.page=n.data.current+1,f.value=n.data.rows,h.value=f.value.length>0,console.log(h.value," showContact.value "),s.value=!1,u.value=!0}catch(n){const o=n.message;Y(o),h.value=!1,u.value=!0}},w=n=>{const o=n.selectedOptions[0]||{};a.orchestraId=o.value,a.orchestraName=o.name,c.showPopoverOrchestra=!1,p.value=!0,d()},y=n=>{const o=n.selectedOptions[0]||{};a.subjectId=o.value,a.subjectName=o.name,c.showPopoverSubject=!1,p.value=!0,d()},g=async()=>{try{const n=await T.post("/api-school/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});c.actions=n.data.rows.map(o=>({name:o.name,value:o.id})),c.actions.unshift({name:"\u5168\u90E8\u4E50\u56E2",value:""})}catch(n){const o=n.message;Y(o)}},C=async()=>{try{const n=await T.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:9999}});c.subjects=n.data.rows.map(o=>({name:o.subjectName,value:o.subjectId})),c.subjects.unshift({name:"\u5168\u90E8\u58F0\u90E8",value:""})}catch(n){const o=n.message;Y(o)}};W(()=>{C(),g(),d()});const M=()=>{u.value=!1,s.value=!0,d()};return()=>{let n;return e("div",{class:[!h.value&&"emptyRootContainer",U.bangContainer],style:{minHeight:`calc(100vh - ${v.value}px)`}},[e(V,{offsetTop:v.value,style:{width:"100%"}},{default:()=>[e("div",{class:"searchGroup"},[e("div",{class:["searchItem searchItem-normal",c.showPopoverOrchestra&&"searchItem-active"],onClick:()=>{c.showPopoverOrchestra=!0}},[e("span",null,[a.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",c.showPopoverSubject&&"searchItem-active"],onClick:()=>{c.showPopoverSubject=!0}},[e("span",null,[a.subjectName]),e("i",{class:"arrow"},null)])])]}),h.value?e(L,{modelValue:p.value,"onUpdate:modelValue":o=>p.value=o,onRefresh:M,style:{minHeight:`calc(100vh - ${v.value}px - 1.17333rem)`}},{default:()=>[e(F,{finished:u.value,"finished-text":" ",onLoad:d,"loading-text":" "},ve(n=f.value.map((o,N)=>e($,{item:o,type:"time",index:N+1},null)))?n:{default:()=>[n]})]}):e(R,{tips:"\u6682\u65E0\u6392\u884C"},null),e(D,{show:c.showPopoverOrchestra,"onUpdate:show":o=>c.showPopoverOrchestra=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(I,{columns:c.actions,onCancel:()=>c.showPopoverOrchestra=!1,onConfirm:o=>w(o),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(D,{show:c.showPopoverSubject,"onUpdate:show":o=>c.showPopoverSubject=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(I,{columns:c.subjects,onCancel:()=>c.showPopoverSubject=!1,onConfirm:o=>y(o),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});function ge(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!B(t)}var we=O({props:["toHeight","startTime","endTime"],name:"day-bang",setup(t,{slots:c,attrs:a,emit:p}){H();const s=_({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[i().format("YYYY"),i().format("MM")]}),u=_({practiceMonth:t.startTime,orchestraId:"",orchestraName:"\u5168\u90E8\u4E50\u56E2",subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8",page:1,rows:50,sortType:"PRACTICE_TIMES"});m(new Date(i().subtract(10,"year").format("YYYY-MM-DD"))),m(new Date(i().add(10,"year").format("YYYY-MM-DD"))),m(["year","month"]);const h=m(!1),f=m(!1),v=m(!1),d=m(!1),w=m([]),y=m(t.toHeight);console.log(t.toHeight),P(()=>t.toHeight,l=>{y.value=l}),P(()=>t.startTime,()=>{u.practiceMonth=t.startTime,h.value=!0,g()});const g=async()=>{f.value=!0;try{h.value&&(u.page=1,w.value=[],h.value=!1);const l=await T.post("/api-school/student/page",{data:{...u}});if(w.value.length>0&&l.data.pages===1)return;u.page=l.data.current+1,w.value=l.data.rows,d.value=w.value.length>0,console.log(d.value," showContact.value "),f.value=!1,v.value=!0}catch(l){const r=l.message;Y(r),d.value=!1,v.value=!0}},C=l=>{const r=l.selectedOptions[0]||{};u.orchestraId=r.value,u.orchestraName=r.name,s.showPopoverOrchestra=!1,h.value=!0,g()},M=l=>{const r=l.selectedOptions[0]||{};u.subjectId=r.value,u.subjectName=r.name,s.showPopoverSubject=!1,h.value=!0,g()},n=async()=>{try{const l=await T.post("/api-school/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});s.actions=l.data.rows.map(r=>({name:r.name,value:r.id})),s.actions.unshift({name:"\u5168\u90E8\u4E50\u56E2",value:""})}catch(l){const r=l.message;Y(r)}},o=async()=>{try{const l=await T.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:9999}});s.subjects=l.data.rows.map(r=>({name:r.subjectName,value:r.subjectId})),s.subjects.unshift({name:"\u5168\u90E8\u58F0\u90E8",value:""})}catch(l){const r=l.message;Y(r)}};W(()=>{o(),n(),g()});const N=()=>{v.value=!1,f.value=!0,g()};return()=>{let l;return e("div",{class:[!d.value&&"emptyRootContainer",U.bangContainer],style:{minHeight:`calc(100vh - ${y.value}px)`}},[e(V,{offsetTop:y.value,style:{width:"100%"}},{default:()=>[e("div",{class:"searchGroup"},[e("div",{class:["searchItem searchItem-normal",s.showPopoverOrchestra&&"searchItem-active"],onClick:()=>{s.showPopoverOrchestra=!0}},[e("span",null,[u.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",s.showPopoverSubject&&"searchItem-active"],onClick:()=>{s.showPopoverSubject=!0}},[e("span",null,[u.subjectName]),e("i",{class:"arrow"},null)])])]}),d.value?e(L,{modelValue:h.value,"onUpdate:modelValue":r=>h.value=r,onRefresh:N,style:{minHeight:`calc(100vh - ${y.value}px - 1.17333rem)`}},{default:()=>[e(F,{finished:v.value,"finished-text":" ",onLoad:g,"loading-text":" "},ge(l=w.value.map((r,E)=>e($,{item:r,type:"day",index:E+1},null)))?l:{default:()=>[l]})]}):e(R,{tips:"\u6682\u65E0\u6392\u884C"},null),e(D,{show:s.showPopoverOrchestra,"onUpdate:show":r=>s.showPopoverOrchestra=r,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(I,{columns:s.actions,onCancel:()=>s.showPopoverOrchestra=!1,onConfirm:r=>C(r),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(D,{show:s.showPopoverSubject,"onUpdate:show":r=>s.showPopoverSubject=r,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(I,{columns:s.subjects,onCancel:()=>s.showPopoverSubject=!1,onConfirm:r=>M(r),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});const be="_topWrap_dy38b_1",ye="_topTime_dy38b_6",Te="_imgIcon_dy38b_18",Ye="_rankTabs_dy38b_22";var j={topWrap:be,topTime:ye,imgIcon:Te,rankTabs:Ye};i.extend(K);var He=O({name:"ranking-list",setup(){H();const t=q();m("");const c=m(t.query.type||"day"),a=_({heightV:0,showPopoverTime:!1,startTime:i().day(1).format("YYYY-MM-DD"),endTime:i().day(7).format("YYYY-MM-DD")}),p=s=>{a.heightV=s,console.log(a.heightV,"\u83B7\u53D6\u9AD8\u5EA6")};return()=>e(x,null,[e(Z,{position:"top",background:"#F8F8F8",onGetHeight:p},{default:()=>[e("div",{class:j.topWrap},[e(G,{color:"#ffffff",backIconColor:"white",background:"transparent",border:!1},null),e("span",{class:j.topTime,onClick:()=>a.showPopoverTime=!0},[a.startTime,S("~"),a.endTime,e(A,{name:a.showPopoverTime?"arrow-up":"arrow-down",class:j.imgIcon},null)])]),e(Q,{active:c.value,"onUpdate:active":s=>c.value=s,class:j.rankTabs,background:"rgba(224, 69, 21,.71)","title-active-color":"#fff","title-inactive-color":"#fff",color:"#fff"},{default:()=>[e(k,{name:"day",title:"\u5929\u6570\u699C"},null),e(k,{name:"time",title:"\u65F6\u957F\u699C"},null)]})]}),c.value=="time"?e(fe,{startTime:i(a.startTime).format("YYYYMMDD"),endTime:a.endTime,toHeight:a.heightV},null):e(we,{startTime:i(a.startTime).format("YYYYMMDD"),endTime:a.endTime,toHeight:a.heightV},null),e(X,{show:a.showPopoverTime,"onUpdate:show":s=>a.showPopoverTime=s,firstDayOfWeek:1,showConfirm:!1,type:"range",maxRange:7,minDate:new Date("2023-02-27"),defaultDate:[i(a.startTime).toDate(),i(a.endTime).toDate()],style:{height:"70%"},onSelect:s=>{if(a.startTime="",a.endTime="",!i(s[0]).isBetween(i(a.startTime),i(a.endTime))){const u=i(s[0]).day();u===0?(a.startTime=i(s[0]).subtract(6,"day").format("YYYY-MM-DD"),a.endTime=i(s[0]).format("YYYY-MM-DD")):u===1?(a.startTime=i(s[0]).format("YYYY-MM-DD"),a.endTime=i(s[0]).add(6,"day").format("YYYY-MM-DD")):(a.startTime=i(s[0]).subtract(u-1,"day").format("YYYY-MM-DD"),a.endTime=i(s[0]).add(7-u,"day").format("YYYY-MM-DD"))}a.showPopoverTime=!1}},null)])}});export{He as default};