1 |
- import{d as I,c as e,q as S,F as x,r as _,ai as u,R as m,Z as P,$ as W,ak as R,P as C,al as B,m as T,o as Y,ag as H,ah as q,aj as G,a5 as A}from"./index.5f7ffb46.js";import{O as Z}from"./index.7790de2a.js";import{O as F}from"./index.1d6ac2c5.js";import{s as z}from"./student-icon.30fb072d.js";import{I as J}from"./index.276a5d68.js";import{S as L}from"./index.61ab9823.js";import{L as V}from"./index.9ef28852.js";import{P as D}from"./index.de1f78a6.js";import{i as K}from"./isBetween.318963fd.js";import{T as Q,a as k}from"./index.6bbd7daa.js";import{C as X}from"./index.47129549.js";import"./use-tab-status.69b57a37.js";import"./Picker.148c9d83.js";import"./index.99e0cf1f.js";import"./utils.0f86fc1f.js";const ee="_chioseWrap_1ubpv_1",ae="_orchestraBand_1ubpv_12",te="_searchBand_1ubpv_23",se="_bandName_1ubpv_26",oe="_bangContainer_1ubpv_31";var E={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",ue="_studentName_y8c93_39",ie="_tag_y8c93_45",me="_wrapRight_y8c93_56";var b={itemWrap:re,wrapLeft:ne,numWrap:ce,headerWrap:le,studentName:ue,tag:ie,wrapRight:me},he="./assets/first.9696dc0f.png",de="./assets/second.e9b7016e.png",pe="./assets/third.6edc909a.png",U=I({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=I({name:"timer-bang",props:["toHeight","startTime","endTime"],setup(t){const c=_({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[u().format("YYYY"),u().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),i=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,i.value=!0}catch(n){const o=n.message;Y(o),h.value=!1,i.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)}},O=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(()=>{O(),g(),d()});const M=()=>{i.value=!1,s.value=!0,d()};return()=>{let n;return e("div",{class:[!h.value&&"emptyRootContainer",E.bangContainer],style:{minHeight:`calc(100vh - ${v.value}px)`}},[e(L,{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(F,{modelValue:p.value,"onUpdate:modelValue":o=>p.value=o,onRefresh:M,style:{minHeight:`calc(100vh - ${v.value}px - 1.17333rem)`}},{default:()=>[e(V,{finished:i.value,"finished-text":" ",onLoad:d,"loading-text":" "},ve(n=f.value.map((o,N)=>e(U,{item:o,type:"time",index:N+1},null)))?n:{default:()=>[n]})]}):e(R,{tips:"\u6682\u65E0\u6392\u884C"},null),e(C,{show:c.showPopoverOrchestra,"onUpdate:show":o=>c.showPopoverOrchestra=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(D,{columns:c.actions,onCancel:()=>c.showPopoverOrchestra=!1,onConfirm:o=>w(o),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(C,{show:c.showPopoverSubject,"onUpdate:show":o=>c.showPopoverSubject=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(D,{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=I({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:[u().format("YYYY"),u().format("MM")]}),i=_({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(u().subtract(10,"year").format("YYYY-MM-DD"))),m(new Date(u().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,()=>{i.practiceMonth=t.startTime,h.value=!0,g()});const g=async()=>{f.value=!0;try{h.value&&(i.page=1,w.value=[],h.value=!1);const l=await T.post("/api-school/student/page",{data:{...i}});if(w.value.length>0&&l.data.pages===1)return;i.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}},O=l=>{const r=l.selectedOptions[0]||{};i.orchestraId=r.value,i.orchestraName=r.name,s.showPopoverOrchestra=!1,h.value=!0,g()},M=l=>{const r=l.selectedOptions[0]||{};i.subjectId=r.value,i.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",E.bangContainer],style:{minHeight:`calc(100vh - ${y.value}px)`}},[e(L,{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,[i.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",s.showPopoverSubject&&"searchItem-active"],onClick:()=>{s.showPopoverSubject=!0}},[e("span",null,[i.subjectName]),e("i",{class:"arrow"},null)])])]}),d.value?e(F,{modelValue:h.value,"onUpdate:modelValue":r=>h.value=r,onRefresh:N,style:{minHeight:`calc(100vh - ${y.value}px - 1.17333rem)`}},{default:()=>[e(V,{finished:v.value,"finished-text":" ",onLoad:g,"loading-text":" "},ge(l=w.value.map((r,$)=>e(U,{item:r,type:"day",index:$+1},null)))?l:{default:()=>[l]})]}):e(R,{tips:"\u6682\u65E0\u6392\u884C"},null),e(C,{show:s.showPopoverOrchestra,"onUpdate:show":r=>s.showPopoverOrchestra=r,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(D,{columns:s.actions,onCancel:()=>s.showPopoverOrchestra=!1,onConfirm:r=>O(r),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(C,{show:s.showPopoverSubject,"onUpdate:show":r=>s.showPopoverSubject=r,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(D,{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};u.extend(K);var He=I({name:"ranking-list",setup(){H();const t=q();m("");const c=m(t.query.type||"day"),a=_({heightV:0,showPopoverTime:!1,startTime:u().day(1).format("YYYY-MM-DD"),endTime:u().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:u(a.startTime).format("YYYYMMDD"),endTime:a.endTime,toHeight:a.heightV},null):e(we,{startTime:u(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:[u(a.startTime).toDate(),u(a.endTime).toDate()],style:{height:"70%"},onSelect:s=>{if(a.startTime="",a.endTime="",!u(s[0]).isBetween(u(a.startTime),u(a.endTime))){const i=u(s[0]).day();i===0?(a.startTime=u(s[0]).subtract(6,"day").format("YYYY-MM-DD"),a.endTime=u(s[0]).format("YYYY-MM-DD")):i===1?(a.startTime=u(s[0]).format("YYYY-MM-DD"),a.endTime=u(s[0]).add(6,"day").format("YYYY-MM-DD")):(a.startTime=u(s[0]).subtract(i-1,"day").format("YYYY-MM-DD"),a.endTime=u(s[0]).add(7-i,"day").format("YYYY-MM-DD"))}a.showPopoverTime=!1}},null)])}});export{He as default};
|