1 |
- System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./index.module-legacy.3521c141.js","./index-legacy.4e015ad0.js","./index-legacy.d64e5695.js","./index-legacy.d552a2f3.js","./index-legacy.fad72574.js","./index-legacy.918b8c74.js","./index-legacy.11f1ea5f.js","./index-legacy.8c254533.js","./use-tab-status-legacy.91417466.js"],(function(t){"use strict";var e,a,s,i,n,l,o,c,r,d,u,h,p,f,g,S,m,y,v,w,j,x;return{setters:[function(t){e=t.d,a=t.ag,s=t.r,i=t.$,n=t.e,l=t.b7,o=t.c,c=t.aj,r=t.a5,d=t.q,u=t.ak,h=t.al,p=t.m,f=t.g},function(t){g=t.O},function(t){S=t.s},function(t){m=t.d},function(t){y=t.O},function(t){v=t.O},function(t){w=t.L},function(t){j=t.C},function(t){x=t.T},function(){},function(){}],execute:function(){t("default",e({name:"my-orchestra",setup(){const t=a(),e=s({showPopover:!1,actions:[{name:"全部乐团",selected:!0,value:"ALL"},{name:"交付团",value:"DELIVERY"},{name:"晋升团",value:"PROMOTION"}],isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},params:{type:null,status:"DONE",page:1,rows:20}}),L=t=>{e.actions.forEach((t=>{t.selected=!1})),t.selected=!0,e.params.type="ALL"===t.value?null:t.value,e.showPopover=!1,e.params.page=1,e.list=[],e.listState.dataShow=!0,e.listState.loading=!1,e.listState.finished=!1,k()},k=async()=>{try{if(e.isClick)return;e.isClick=!0;const t=await p.post("/api-school/orchestra/page",{data:{...e.params,schoolId:f.user.data.school.id}});e.listState.loading=!1,e.listState.refreshing=!1;const a=t.data||{};if(e.list.length>0&&1===a.current)return;e.list=e.list.concat(a.rows||[]),e.listState.finished=a.current>=a.pages,e.params.page=a.current+1,e.listState.dataShow=e.list.length>0,e.isClick=!1}catch{e.listState.dataShow=!1,e.listState.finished=!0,e.listState.refreshing=!1,e.isClick=!1}},C=()=>{e.params.page=1,e.list=[],e.listState.dataShow=!0,e.listState.loading=!1,e.listState.finished=!1,k()};i((()=>{k(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",O,!1)}));const O=()=>{n({api:"back"})};return l((()=>{window.removeEventListener("popstate",O)})),()=>{let a;return o("div",{class:!e.listState.dataShow&&"emptyRootContainer"},[o(g,{position:"top",onGetHeight:t=>{e.listState.height=t}},{default:()=>{return[o(c,null,{right:()=>o(r,{name:"plus",size:19,color:"#333",onClick:()=>{t.push("/create-orchestra")}},null)}),o("div",{class:"searchGroup-single"},[o("span",{onClick:()=>e.showPopover=!0,class:["searchItem",e.showPopover?"searchItem-active":""]},[(a=e.params.type,{DELIVERY:"交付团",PROMOTION:"晋升团"}[a]||"全部乐团")])])];var a}}),e.listState.dataShow?o(y,{modelValue:e.listState.refreshing,"onUpdate:modelValue":t=>e.listState.refreshing=t,onRefresh:C,style:{minHeight:`calc(100vh - ${e.listState.height}px)`}},{default:()=>{return[o(w,{finished:e.listState.finished,finishedText:" ",class:[S.liveList],onLoad:k,immediateCheck:!1},(s=a=e.list.map((e=>o(j,{isLink:!0,center:!0,class:S.oCell,onClick:()=>(e=>{console.log(e),t.push({path:"/orchestra-detail",query:{id:e.id}})})(e)},{title:()=>o("div",{class:S.oTitle},[o("div",null,[e.name]),o(x,{style:{marginLeft:"6px",flexShrink:0},color:"DELIVERY"===e.type?"#FF8057":"#64A9FF"},{default:()=>[m[e.type]]})]),label:()=>o("p",null,[d("学员人数:"),e.currentStudentNum||0,d("人")])}))),"function"==typeof s||"[object Object]"===Object.prototype.toString.call(s)&&!h(s)?a:{default:()=>[a]}))];var s}}):o(u,{btnStatus:!1,tips:"暂无乐团"},null),o(v,{show:e.showPopover,"onUpdate:show":t=>e.showPopover=t,actions:e.actions,onSelect:L},null)])}}}))}}}));
|