index.2640aa74.js 11 KB

1
  1. import{O as K}from"./index.42df3325.js";import{O as Q}from"./index.75b629b6.js";import{d as P,c as e,q as H,F as U,ag as W,r as y,ah as v,R as n,Z as B,$ as E,ai as $,P as g,aj as G,m as w,o as b}from"./index.13ca4bcb.js";import{O as q}from"./index.e4cacf09.js";import{s as X}from"./student-icon.30fb072d.js";import{I as ee}from"./index.5240421c.js";import{S as A}from"./index.13b30705.js";import{L as Z}from"./index.29df141b.js";import{D as z}from"./index.48909ec9.js";import{P as j}from"./index.cf95299d.js";import{T as te,a as L}from"./index.4cd47248.js";import"./index.f49da0ce.js";import"./use-tab-status.45bc1956.js";import"./utils.f04cb9c5.js";import"./index.510ab853.js";const ae="_itemWrap_y8c93_1",se="_wrapLeft_y8c93_9",oe="_numWrap_y8c93_14",re="_headerWrap_y8c93_28",ne="_studentName_y8c93_39",le="_tag_y8c93_45",ce="_wrapRight_y8c93_56";var f={itemWrap:ae,wrapLeft:se,numWrap:oe,headerWrap:re,studentName:ne,tag:le,wrapRight:ce},ue="./assets/first.9696dc0f.png",ie="./assets/second.e9b7016e.png",me="./assets/third.6edc909a.png",J=P({props:["item","type","index"],name:"rank-item",setup(o){return()=>e(U,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:ue,alt:""},null):null,o.index==2?e("img",{src:ie,alt:""},null):null,o.index==3?e("img",{src:me,alt:""},null):null,o.index>3?e("p",null,[o.index]):null]),e("div",{class:f.headerWrap},[e(ee,{width:"48px",height:"48px",fit:"cover",src:o.item.avatar?o.item.avatar:X,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]),H(" \u5929")]):e("p",null,[e("span",null,[o.item.practiceTimes?o.item.practiceTimes:0]),H(" \u5206\u949F")])])])])])}});function he(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!G(o)}var pe=P({name:"timer-bang",props:["toHeight"],emits:["setTime"],setup(o,{slots:T,attrs:D,emit:l}){W();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"}),I=n(new Date(v().subtract(10,"year").format("YYYY-MM-DD"))),N=n(new Date(v().add(10,"year").format("YYYY-MM-DD"))),O=n(["year","month"]),c=n(!1),d=n(!1),h=n(!1),i=n(!1),m=n([]),p=n(o.toHeight);B(()=>o.toHeight,s=>{p.value=s,console.log(p.value)});const u=async()=>{d.value=!0;try{c.value&&(r.page=1,m.value=[],c.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}},_=s=>{r.practiceMonth=s.selectedValues[0]+s.selectedValues[1],r.timeName=s.selectedValues[0]+"\u5E74"+s.selectedValues[1]+"\u6708",l("setTime",r.timeName),a.showPopoverTime=!1,c.value=!0,u()},S=s=>{const t=s.selectedOptions[0]||{};r.orchestraId=t.value,r.orchestraName=t.name,a.showPopoverOrchestra=!1,c.value=!0,u()},C=s=>{const t=s.selectedOptions[0]||{};r.subjectId=t.value,r.subjectName=t.name,a.showPopoverSubject=!1,c.value=!0,u()},x=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)}},k=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(()=>{k(),x(),u(),l("setTime",r.timeName)});const V=()=>{h.value=!1,d.value=!0,u()};return()=>{let s;return e("div",{class:!i.value&&"emptyRootContainer",style:{minHeight:`calc(100vh - ${p.value}px)`}},[e(A,{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(q,{modelValue:c.value,"onUpdate:modelValue":t=>c.value=t,onRefresh:V},{default:()=>[e(Z,{finished:h.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:u,"loading-text":" "},he(s=m.value.map((t,Y)=>e(J,{item:t,type:"time",index:Y+1},null)))?s:{default:()=>[s]})]}):e($,null,null),e(g,{show:a.showPopoverTime,"onUpdate:show":t=>a.showPopoverTime=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(z,{onCancel:()=>{a.showPopoverTime=!1},onConfirm:_,modelValue:a.currentDate,"onUpdate:modelValue":t=>a.currentDate=t,title:"\u9009\u62E9\u5E74\u6708",minDate:I.value,maxDate:N.value,columnsType:O.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=>S(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=>C(t),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});function ve(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!G(o)}var de=P({props:["toHeight"],emits:["setTime"],name:"day-bang",setup(o,{slots:T,attrs:D,emit:l}){W();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"}),I=n(new Date(v().subtract(10,"year").format("YYYY-MM-DD"))),N=n(new Date(v().add(10,"year").format("YYYY-MM-DD"))),O=n(["year","month"]),c=n(!1),d=n(!1),h=n(!1),i=n(!1),m=n([]),p=n(o.toHeight);console.log(o.toHeight),B(()=>o.toHeight,s=>{p.value=s});const u=async()=>{d.value=!0;try{c.value&&(r.page=1,m.value=[],c.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}},_=s=>{r.practiceMonth=s.selectedValues[0]+s.selectedValues[1],r.timeName=s.selectedValues[0]+"\u5E74"+s.selectedValues[1]+"\u6708",a.showPopoverTime=!1,l("setTime",r.timeName),c.value=!0,u()},S=s=>{const t=s.selectedOptions[0]||{};r.orchestraId=t.value,r.orchestraName=t.name,a.showPopoverOrchestra=!1,c.value=!0,u()},C=s=>{const t=s.selectedOptions[0]||{};r.subjectId=t.value,r.subjectName=t.name,a.showPopoverSubject=!1,c.value=!0,u()},x=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)}},k=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(()=>{k(),x(),u(),l("setTime",r.timeName)});const V=()=>{h.value=!1,d.value=!0,u()};return()=>{let s;return e("div",{class:!i.value&&"emptyRootContainer",style:{minHeight:`calc(100vh - ${p.value}px)`}},[e(A,{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(q,{modelValue:c.value,"onUpdate:modelValue":t=>c.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":" "},ve(s=m.value.map((t,Y)=>e(J,{item:t,type:"day",index:Y+1},null)))?s:{default:()=>[s]})]}):e($,null,null),e(g,{show:a.showPopoverTime,"onUpdate:show":t=>a.showPopoverTime=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(z,{onCancel:()=>{a.showPopoverTime=!1},onConfirm:_,modelValue:a.currentDate,"onUpdate:modelValue":t=>a.currentDate=t,title:"\u9009\u62E9\u5E74\u6708",minDate:I.value,maxDate:N.value,columnsType:O.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=>S(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=>C(t),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});const fe="_topWrap_xa4v4_1",ge="_topTime_xa4v4_6",we="_rankTabs_xa4v4_16";var M={topWrap:fe,topTime:ge,rankTabs:we};const R=n("day"),F=n("");var Ye=P({name:"ranking-list",setup(){W();const o=y({heightV:0}),T=l=>{F.value=l},D=l=>{o.heightV=l,console.log(o.heightV,"\u83B7\u53D6\u9AD8\u5EA6")};return()=>e(U,null,[e(Q,{position:"top",background:"#F8F8F8",onGetHeight:D},{default:()=>[e("div",{class:M.topWrap},[e(K,{color:"#ffffff",backIconColor:"white",background:"transparent",border:!1},null),e("span",{class:M.topTime},[F.value])]),e(te,{active:R.value,"onUpdate:active":l=>R.value=l,class:M.rankTabs,background:"rgba(224, 69, 21,.71)","title-active-color":"#fff","title-inactive-color":"#fff",color:"#fff"},{default:()=>[e(L,{name:"day",title:"\u5929\u6570\u699C"},null),e(L,{name:"timer",title:"\u65F6\u957F\u699C"},null)]})]}),R.value=="timer"?e(pe,{onSetTime:l=>T(l),toHeight:o.heightV},null):e(de,{onSetTime:l=>T(l),toHeight:o.heightV},null)])}});export{Ye as default};