index-legacy.92eba918.js 5.1 KB

12
  1. !function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?t(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e,n,i,r,a,o){try{var s=t[a](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(i,r)}System.register(["./index-legacy.c1f63540.js","./index-legacy.7e71b67e.js","./index.module-legacy.3521c141.js","./index-legacy.ec5d708a.js","./index-legacy.4596d3ae.js","./index-legacy.3a7317ca.js","./index-legacy.3d6462c3.js","./index-legacy.8a8e9c42.js","./index-legacy.47196fed.js","./index-legacy.ff6bf1d9.js","./use-tab-status-legacy.77a01b2b.js"],(function(t){"use strict";var n,r,a,o,s,c,l,u,f,p,d,h,g,v,y,m,S,b,w,O,j,x;return{setters:[function(t){n=t.d,r=t.ag,a=t.r,o=t.$,s=t.e,c=t.b3,l=t.c,u=t.aj,f=t.a5,p=t.q,d=t.ak,h=t.al,g=t.m,v=t.g},function(t){y=t.O},function(t){m=t.s},function(t){S=t.d},function(t){b=t.O},function(t){w=t.O},function(t){O=t.L},function(t){j=t.C},function(t){x=t.T},function(){},function(){}],execute:function(){t("default",n({name:"my-orchestra",setup:function(){var t=r(),n=a({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}}),P=function(t){n.actions.forEach((function(t){t.selected=!1})),t.selected=!0,n.params.type="ALL"===t.value?null:t.value,n.showPopover=!1,n.params.page=1,n.list=[],n.listState.dataShow=!0,n.listState.loading=!1,n.listState.finished=!1,k()},k=function(){var t,r=(t=regeneratorRuntime.mark((function t(){var i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!n.isClick){t.next=3;break}return t.abrupt("return");case 3:return n.isClick=!0,t.next=6,g.post("/api-school/orchestra/page",{data:e(e({},n.params),{},{schoolId:v.user.data.school.id})});case 6:if(i=t.sent,n.listState.loading=!1,n.listState.refreshing=!1,r=i.data||{},!(n.list.length>0&&1===r.current)){t.next=12;break}return t.abrupt("return");case 12:n.list=n.list.concat(r.rows||[]),n.listState.finished=r.current>=r.pages,n.params.page=r.current+1,n.listState.dataShow=n.list.length>0,n.isClick=!1,t.next=25;break;case 19:t.prev=19,t.t0=t.catch(0),n.listState.dataShow=!1,n.listState.finished=!0,n.listState.refreshing=!1,n.isClick=!1;case 25:case"end":return t.stop()}}),t,null,[[0,19]])})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function s(t){i(o,r,a,s,c,"next",t)}function c(t){i(o,r,a,s,c,"throw",t)}s(void 0)}))});return function(){return r.apply(this,arguments)}}(),L=function(){n.params.page=1,n.list=[],n.listState.dataShow=!0,n.listState.loading=!1,n.listState.finished=!1,k()};o((function(){k(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",C,!1)}));var C=function(){s({api:"back"})};return c((function(){window.removeEventListener("popstate",C)})),function(){var e;return l("div",{class:!n.listState.dataShow&&"emptyRootContainer"},[l(y,{position:"top",onGetHeight:function(t){n.listState.height=t}},{default:function(){return[l(u,null,{right:function(){return l(f,{name:"plus",size:19,color:"#333",onClick:function(){t.push("/create-orchestra")}},null)}}),l("div",{class:"searchGroup-single"},[l("span",{onClick:function(){return n.showPopover=!0},class:["searchItem",n.showPopover?"searchItem-active":""]},[(e=n.params.type,{DELIVERY:"交付团",PROMOTION:"晋升团"}[e]||"全部乐团")])])];var e}}),n.listState.dataShow?l(b,{modelValue:n.listState.refreshing,"onUpdate:modelValue":function(t){return n.listState.refreshing=t},onRefresh:L,style:{minHeight:"calc(100vh - ".concat(n.listState.height,"px)")}},{default:function(){return[l(O,{finished:n.listState.finished,finishedText:" ",class:[m.liveList],onLoad:k,immediateCheck:!1},(i=e=n.list.map((function(e){return l(j,{isLink:!0,center:!0,class:m.oCell,onClick:function(){return function(e){console.log(e),t.push({path:"/orchestra-detail",query:{id:e.id}})}(e)}},{title:function(){return l("div",{class:m.oTitle},[l("div",null,[e.name]),l(x,{style:{marginLeft:"6px",flexShrink:0},color:"DELIVERY"===e.type?"#FF8057":"#64A9FF"},{default:function(){return[S[e.type]]}})])},label:function(){return l("p",null,[p("学员人数:"),e.currentStudentNum||0,p("人")])}})})),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!h(i)?e:{default:function(){return[e]}}))];var i}}):l(d,{btnStatus:!1,tips:"暂无乐团"},null),l(w,{show:n.showPopover,"onUpdate:show":function(t){return n.showPopover=t},actions:n.actions,onSelect:P},null)])}}}))}}}))}();