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