1 |
- import{d as _,c as e,q as R,F,ag as B,r as y,ah as v,R as n,Z as U,$ as E,ai as $,P as g,aj as G,ak as q,m as w,o as b}from"./index.ffe80dbe.js";import{O as X}from"./index.a0ef77e4.js";import{O as ee}from"./index.4ddd16f0.js";import{O as A}from"./index.45b38760.js";import{s as te}from"./student-icon.30fb072d.js";import{I as ae}from"./index.7e972106.js";import{S as Z}from"./index.02edecb1.js";import{L as z}from"./index.cafcb8b5.js";import{D as J}from"./index.ff4fe619.js";import{P as j}from"./index.777c6c1a.js";import{T as se,a as H}from"./index.466e527a.js";import"./index.1d5c6f70.js";import"./use-tab-status.5a3cd090.js";import"./utils.18cb7a73.js";import"./index.b4b77b5a.js";const oe="_chioseWrap_1ubpv_1",re="_orchestraBand_1ubpv_12",ne="_searchBand_1ubpv_23",ce="_bandName_1ubpv_26",le="_bangContainer_1ubpv_31";var K={chioseWrap:oe,orchestraBand:re,searchBand:ne,bandName:ce,bangContainer:le};const ue="_itemWrap_y8c93_1",ie="_wrapLeft_y8c93_9",me="_numWrap_y8c93_14",he="_headerWrap_y8c93_28",pe="_studentName_y8c93_39",ve="_tag_y8c93_45",de="_wrapRight_y8c93_56";var f={itemWrap:ue,wrapLeft:ie,numWrap:me,headerWrap:he,studentName:pe,tag:ve,wrapRight:de},fe="./assets/first.9696dc0f.png",ge="./assets/second.e9b7016e.png",we="./assets/third.6edc909a.png",Q=_({props:["item","type","index"],name:"rank-item",setup(o){return()=>e(F,null,[e("div",null,[e("div",{class:f.itemWrap},[e("div",{class:f.wrapLeft},[e("div",{class:f.numWrap},[o.index==1?e("img",{src:fe,alt:""},null):null,o.index==2?e("img",{src:ge,alt:""},null):null,o.index==3?e("img",{src:we,alt:""},null):null,o.index>3?e("p",null,[o.index]):null]),e("div",{class:f.headerWrap},[e(ae,{width:"48px",height:"48px",fit:"cover",src:o.item.avatar?o.item.avatar:te,alt:""},null)]),e("div",null,[e("p",{class:f.studentName},[o.item.nickname]),e("div",{class:f.tag},[o.item.subjectNames?o.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:f.wrapRight},[o.type=="day"?e("p",null,[e("span",null,[o.item.practiceDays?o.item.practiceDays:0]),R(" \u5929")]):e("p",null,[e("span",null,[o.item.practiceTimes?o.item.practiceTimes:0]),R(" \u5206\u949F")])])])])])}});function be(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!q(o)}var ye=_({name:"timer-bang",props:["toHeight"],emits:["setTime"],setup(o,{slots:T,attrs:P,emit:c}){B();const a=y({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[v().format("YYYY"),v().format("MM")]}),r=y({practiceMonth:a.currentDate[0]+""+a.currentDate[1],timeName:a.currentDate[0]+"\u5E74"+a.currentDate[1]+"\u6708",orchestraId:"",orchestraName:"\u5168\u90E8\u4E50\u56E2",subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8",page:1,rows:50,sortType:"PRACTICE_TIMES"}),N=n(new Date(v().subtract(10,"year").format("YYYY-MM-DD"))),D=n(new Date(v().add(10,"year").format("YYYY-MM-DD"))),I=n(["year","month"]),l=n(!1),d=n(!1),h=n(!1),i=n(!1),m=n([]),p=n(o.toHeight);U(()=>o.toHeight,s=>{p.value=s,console.log(p.value)});const u=async()=>{d.value=!0;try{l.value&&(r.page=1,m.value=[],l.value=!1);const s=await w.post("/api-school/student/page",{data:{...r}});if(m.value.length>0&&s.data.pages===1)return;r.page=s.data.current+1,m.value=s.data.rows,i.value=m.value.length>0,console.log(i.value," showContact.value "),d.value=!1,h.value=!0}catch(s){const t=s.message;b(t),i.value=!1,h.value=!0}},O=s=>{r.practiceMonth=s.selectedValues[0]+s.selectedValues[1],r.timeName=s.selectedValues[0]+"\u5E74"+s.selectedValues[1]+"\u6708",c("setTime",r.timeName),a.showPopoverTime=!1,l.value=!0,u()},C=s=>{const t=s.selectedOptions[0]||{};r.orchestraId=t.value,r.orchestraName=t.name,a.showPopoverOrchestra=!1,l.value=!0,u()},S=s=>{const t=s.selectedOptions[0]||{};r.subjectId=t.value,r.subjectName=t.name,a.showPopoverSubject=!1,l.value=!0,u()},k=async()=>{try{const s=await w.post("/api-school/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});a.actions=s.data.rows.map(t=>({name:t.name,value:t.id})),a.actions.unshift({name:"\u5168\u90E8\u4E50\u56E2",value:""})}catch(s){const t=s.message;b(t)}},x=async()=>{try{const s=await w.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:9999}});a.subjects=s.data.rows.map(t=>({name:t.subjectName,value:t.subjectId})),a.subjects.unshift({name:"\u5168\u90E8\u58F0\u90E8",value:""})}catch(s){const t=s.message;b(t)}};E(()=>{x(),k(),u(),c("setTime",r.timeName)});const V=()=>{h.value=!1,d.value=!0,u()};return()=>{let s;return e("div",{class:[!i.value&&"emptyRootContainer",K.bangContainer],style:{minHeight:`calc(100vh - ${p.value}px)`}},[e(Z,{offsetTop:p.value,style:{width:"100%"}},{default:()=>[e("div",{class:"searchGroup"},[e("div",{class:["searchItem searchItem-normal",a.showPopoverTime&&"searchItem-active"],onClick:()=>{a.showPopoverTime=!0}},[e("span",null,[r.timeName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",a.showPopoverOrchestra&&"searchItem-active"],onClick:()=>{a.showPopoverOrchestra=!0}},[e("span",null,[r.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",a.showPopoverSubject&&"searchItem-active"],onClick:()=>{a.showPopoverSubject=!0}},[e("span",null,[r.subjectName]),e("i",{class:"arrow"},null)])])]}),i.value?e(A,{modelValue:l.value,"onUpdate:modelValue":t=>l.value=t,onRefresh:V},{default:()=>[e(z,{finished:h.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:u,"loading-text":" "},be(s=m.value.map((t,Y)=>e(Q,{item:t,type:"time",index:Y+1},null)))?s:{default:()=>[s]})]}):e($,{tips:"\u6682\u65E0\u6392\u884C"},null),e(g,{show:a.showPopoverTime,"onUpdate:show":t=>a.showPopoverTime=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(J,{onCancel:()=>{a.showPopoverTime=!1},onConfirm:O,modelValue:a.currentDate,"onUpdate:modelValue":t=>a.currentDate=t,formatter:G,minDate:N.value,maxDate:D.value,columnsType:I.value},null)]}),e(g,{show:a.showPopoverOrchestra,"onUpdate:show":t=>a.showPopoverOrchestra=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(j,{columns:a.actions,onCancel:()=>a.showPopoverOrchestra=!1,onConfirm:t=>C(t),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(g,{show:a.showPopoverSubject,"onUpdate:show":t=>a.showPopoverSubject=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(j,{columns:a.subjects,onCancel:()=>a.showPopoverSubject=!1,onConfirm:t=>S(t),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});function Te(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!q(o)}var je=_({props:["toHeight"],emits:["setTime"],name:"day-bang",setup(o,{slots:T,attrs:P,emit:c}){B();const a=y({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,actions:[],subjects:[],currentDate:[v().format("YYYY"),v().format("MM")]}),r=y({practiceMonth:a.currentDate[0]+""+a.currentDate[1],timeName:a.currentDate[0]+"\u5E74"+a.currentDate[1]+"\u6708",orchestraId:"",orchestraName:"\u5168\u90E8\u4E50\u56E2",subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8",page:1,rows:50,sortType:"PRACTICE_TIMES"}),N=n(new Date(v().subtract(10,"year").format("YYYY-MM-DD"))),D=n(new Date(v().add(10,"year").format("YYYY-MM-DD"))),I=n(["year","month"]),l=n(!1),d=n(!1),h=n(!1),i=n(!1),m=n([]),p=n(o.toHeight);console.log(o.toHeight),U(()=>o.toHeight,s=>{p.value=s});const u=async()=>{d.value=!0;try{l.value&&(r.page=1,m.value=[],l.value=!1);const s=await w.post("/api-school/student/page",{data:{...r}});if(m.value.length>0&&s.data.pages===1)return;r.page=s.data.current+1,m.value=s.data.rows,i.value=m.value.length>0,console.log(i.value," showContact.value "),d.value=!1,h.value=!0}catch(s){const t=s.message;b(t),i.value=!1,h.value=!0}},O=s=>{r.practiceMonth=s.selectedValues[0]+s.selectedValues[1],r.timeName=s.selectedValues[0]+"\u5E74"+s.selectedValues[1]+"\u6708",a.showPopoverTime=!1,c("setTime",r.timeName),l.value=!0,u()},C=s=>{const t=s.selectedOptions[0]||{};r.orchestraId=t.value,r.orchestraName=t.name,a.showPopoverOrchestra=!1,l.value=!0,u()},S=s=>{const t=s.selectedOptions[0]||{};r.subjectId=t.value,r.subjectName=t.name,a.showPopoverSubject=!1,l.value=!0,u()},k=async()=>{try{const s=await w.post("/api-school/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});a.actions=s.data.rows.map(t=>({name:t.name,value:t.id})),a.actions.unshift({name:"\u5168\u90E8\u4E50\u56E2",value:""})}catch(s){const t=s.message;b(t)}},x=async()=>{try{const s=await w.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:9999}});a.subjects=s.data.rows.map(t=>({name:t.subjectName,value:t.subjectId})),a.subjects.unshift({name:"\u5168\u90E8\u58F0\u90E8",value:""})}catch(s){const t=s.message;b(t)}};E(()=>{x(),k(),u(),c("setTime",r.timeName)});const V=()=>{h.value=!1,d.value=!0,u()};return()=>{let s;return e("div",{class:[!i.value&&"emptyRootContainer",K.bangContainer],style:{minHeight:`calc(100vh - ${p.value}px)`}},[e(Z,{offsetTop:p.value,style:{width:"100%"}},{default:()=>[e("div",{class:"searchGroup"},[e("div",{class:["searchItem searchItem-normal",a.showPopoverTime&&"searchItem-active"],onClick:()=>{a.showPopoverTime=!0}},[e("span",null,[r.timeName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",a.showPopoverOrchestra&&"searchItem-active"],onClick:()=>{a.showPopoverOrchestra=!0}},[e("span",null,[r.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem searchItem-normal",a.showPopoverSubject&&"searchItem-active"],onClick:()=>{a.showPopoverSubject=!0}},[e("span",null,[r.subjectName]),e("i",{class:"arrow"},null)])])]}),i.value?e(A,{modelValue:l.value,"onUpdate:modelValue":t=>l.value=t,onRefresh:V,style:"min-height: 100vh;"},{default:()=>[e(z,{finished:h.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:u,"loading-text":" "},Te(s=m.value.map((t,Y)=>e(Q,{item:t,type:"day",index:Y+1},null)))?s:{default:()=>[s]})]}):e($,{tips:"\u6682\u65E0\u6392\u884C"},null),e(g,{show:a.showPopoverTime,"onUpdate:show":t=>a.showPopoverTime=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(J,{onCancel:()=>{a.showPopoverTime=!1},onConfirm:O,modelValue:a.currentDate,"onUpdate:modelValue":t=>a.currentDate=t,formatter:G,minDate:N.value,maxDate:D.value,columnsType:I.value},null)]}),e(g,{show:a.showPopoverOrchestra,"onUpdate:show":t=>a.showPopoverOrchestra=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(j,{columns:a.actions,onCancel:()=>a.showPopoverOrchestra=!1,onConfirm:t=>C(t),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(g,{show:a.showPopoverSubject,"onUpdate:show":t=>a.showPopoverSubject=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(j,{columns:a.subjects,onCancel:()=>a.showPopoverSubject=!1,onConfirm:t=>S(t),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});const _e="_topWrap_xa4v4_1",Pe="_topTime_xa4v4_6",Ne="_rankTabs_xa4v4_16";var M={topWrap:_e,topTime:Pe,rankTabs:Ne};const W=n("day"),L=n("");var Fe=_({name:"ranking-list",setup(){B();const o=y({heightV:0}),T=c=>{L.value=c},P=c=>{o.heightV=c,console.log(o.heightV,"\u83B7\u53D6\u9AD8\u5EA6")};return()=>e(F,null,[e(ee,{position:"top",background:"#F8F8F8",onGetHeight:P},{default:()=>[e("div",{class:M.topWrap},[e(X,{color:"#ffffff",backIconColor:"white",background:"transparent",border:!1},null),e("span",{class:M.topTime},[L.value])]),e(se,{active:W.value,"onUpdate:active":c=>W.value=c,class:M.rankTabs,background:"rgba(224, 69, 21,.71)","title-active-color":"#fff","title-inactive-color":"#fff",color:"#fff"},{default:()=>[e(H,{name:"day",title:"\u5929\u6570\u699C"},null),e(H,{name:"timer",title:"\u65F6\u957F\u699C"},null)]})]}),W.value=="timer"?e(ye,{onSetTime:c=>T(c),toHeight:o.heightV},null):e(je,{onSetTime:c=>T(c),toHeight:o.heightV},null)])}});export{Fe as default};
|