import{O as u}from"./index.00e2f453.js";import{O as p}from"./index.4f243ca1.js";import{d,aQ as f,R as m,X as h,k as a,a2 as n,l,be as g,F as S,ad as w,g as y,s as v}from"./index.879f7421.js";import{s as r}from"./index.module.044c85fc.js";import{o as F}from"./index.a25f99fd.js";import{P as x}from"./index.2f620e25.js";import{L}from"./index.9f8069d8.js";import{C as b}from"./index.9a3a3b84.js";import{T as k}from"./index.30499db4.js";import"./use-tab-status.fe36a003.js";function E(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!w(s)}var R=d({name:"my-orchestra",setup(){const s=f(),t=m({showPopover:!1,actions:[{text:"\u5168\u90E8\u4E50\u56E2",color:"var(--van-primary-color)"},{text:"\u4EA4\u4ED8\u56E2"},{text:"\u664B\u5347\u56E2"}],list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,status:null,page:1,rows:20}}),i=async()=>{try{const o=await y.post("/api-school/orchestra/page",{data:{...t.params,schoolId:v.user.data.school.id}});t.listState.loading=!1;const e=o.data||{};if(t.list.length>0&&e.current===1)return;t.list=t.list.concat(e.rows||[]),t.listState.finished=e.current>=e.pages,t.params.page=e.current+1,t.listState.dataShow=t.list.length>0}catch{t.listState.dataShow=!1,t.listState.finished=!0}},c=o=>{console.log(o),s.push({path:"/orchestra-detail",query:{id:o}})};return h(()=>{i()}),()=>{let o;return a(S,null,[a(p,{position:"top"},{default:()=>[a(u,null,{right:()=>a(n,{name:"plus",size:19,color:"#333",onClick:()=>{s.push("/create-orchestra")}},null)}),a("div",{style:{padding:"12px 13px",background:"#F8F8F8"}},[a(x,{show:t.showPopover,"onUpdate:show":e=>t.showPopover=e,actions:t.actions,showArrow:!1,placement:"bottom-start",offset:[0,12]},{reference:()=>a("div",{class:r.searchBand},[l("\u5168\u90E8\u4E50\u56E2 "),a(n,{name:t.showPopover?"arrow-up":"arrow-down"},null)])})])]}),t.listState.dataShow?a(L,{loading:t.listState.loading,"onUpdate:loading":e=>t.listState.loading=e,finished:t.listState.finished,finishedText:" ",class:[r.liveList],onLoad:i,immediateCheck:!1},E(o=t.list.map(e=>a(b,{isLink:!0,center:!0,class:r.oCell,onClick:()=>c(e)},{title:()=>a("div",{class:r.oTitle},[e.name,a(k,{style:{marginLeft:"6px"},color:e.type==="DELIVERY"?"#FF8057":"#64A9FF"},{default:()=>[F[e.type]]})]),label:()=>a("p",null,[l("\u5B66\u751F\u4EBA\u6570\uFF1A"),e.currentStudentNum,l("\u4EBA")])})))?o:{default:()=>[o]}):a(g,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u4E50\u56E2"},null)])}}});export{R as default};
