index-legacy.d4cd887d.js 8.4 KB

1
  1. !function(){function t(t,e,r,n,a,o,i){try{var s=t[o](i),c=s.value}catch(l){return void r(l)}s.done?e(c):Promise.resolve(c).then(n,a)}function e(e){return function(){var r=this,n=arguments;return new Promise((function(a,o){var i=e.apply(r,n);function s(e){t(i,a,o,s,c,"next",e)}function c(e){t(i,a,o,s,c,"throw",e)}s(void 0)}))}}var r=document.createElement("style");r.innerHTML="._train_8q9to_1{--van-tab-active-text-color: var(--van-primary-color);--van-tab-text-color: #333;--van-tab-font-size: .42667rem}._train_8q9to_1 ._cellGroup_8q9to_6{margin:.32rem .34667rem 0;overflow:hidden;border-radius:.26667rem}._train_8q9to_1 ._cellGroup_8q9to_6 ._select_8q9to_11{height:1.2rem}._train_8q9to_1 ._cellGroup_8q9to_6 ._select_8q9to_11 ._icon_8q9to_14{width:.45333rem;height:.45333rem;margin-right:.10667rem;flex-shrink:0}._train_8q9to_1 ._cellGroup_8q9to_6 ._select_8q9to_11 .van-cell__title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._train_8q9to_1 ._cellGroup_8q9to_6 ._select_8q9to_11 .van-cell__right-icon{color:#333;transform:rotate(90deg);margin:0 0 0 .10667rem}._reportList_8q9to_30{width:auto;margin:0 .34667rem .32rem;padding:.4rem .32rem;border-radius:.26667rem}._reportList_8q9to_30 .van-cell__title{font-size:.42667rem;color:#333}._reportList_8q9to_30 .van-cell_label{font-size:.37333rem;color:#777}._reportList_8q9to_30 .van-cell__value{flex:0 auto}\n",document.head.appendChild(r),System.register(["./index-legacy.1ca09415.js","./index-legacy.003d7ea8.js","./index-legacy.7311c0ed.js","./index-legacy.b95108a0.js","./index-legacy.387d38af.js","./index-legacy.b476c6b9.js","./index-legacy.1df5bf10.js","./index-legacy.95a4fcd5.js","./use-tab-status-legacy.f293322d.js","./utils-legacy.ffd457d5.js","./Picker-legacy.6115aae8.js","./index-legacy.524af6c9.js","./index-legacy.35a7a2b7.js"],(function(t){"use strict";var r,n,a,o,i,s,c,l,u,h,f,d,p,m,_,v,g,y,w,b,S,x,L;return{setters:[function(t){r=t.d,n=t.R,a=t.ag,o=t.r,i=t.ai,s=t.$,c=t.c,l=t.B,u=t.q,h=t.ak,f=t.P,d=t.a_,p=t.al,m=t.m,_=t.aj},function(t){v=t.O},function(t){g=t.O},function(t){y=t.L},function(t){w=t.C},function(t){b=t.D},function(t){S=t.P},function(t){x=t.T,L=t.a},function(){},function(){},function(){},function(){},function(){}],execute:function(){var q={train:"_train_8q9to_1",cellGroup:"_cellGroup_8q9to_6",select:"_select_8q9to_11",icon:"_icon_8q9to_14",reportList:"_reportList_8q9to_30"};var Y=r({name:"train-list",props:{type:{type:String,default:"WEEKLY"},orchestraList:{type:Array,default:function(){return[]}}},setup:function(t){var r=n(["year","month"]),_=a(),v=o({showPopoverTime:!1,timeName:i().format("YYYY")+"年"+i().format("MM")+"月",currentDate:[i().format("YYYY"),i().format("MM")],orchestraStatus:!1,selectOrchestra:{},isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},params:{page:1,rows:20}}),x=function(){var r=e(regeneratorRuntime.mark((function e(){var r,n,a,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!v.isClick){e.next=3;break}return e.abrupt("return");case 3:return v.isClick=!0,r=i(v.currentDate[0]+"-"+v.currentDate[1]+"01"),n=r.startOf("month").format("YYYY-MM-DD"),a=r.endOf("month").format("YYYY-MM-DD"),e.next=9,m.post("/api-school/orchestraReport/page",{data:{reportType:t.type,page:v.params.page,rows:v.params.rows,orchestraId:v.selectOrchestra.value,startTime:n,endTime:a}});case 9:if(o=e.sent,s=o.data,v.listState.loading=!1,v.listState.refreshing=!1,!(v.list.length>0&&1===s.current)){e.next=15;break}return e.abrupt("return");case 15:v.list=v.list.concat(s.rows||[]),v.listState.finished=s.current>=s.pages,v.params.page=s.current+1,v.listState.dataShow=v.list.length>0,v.isClick=!1,e.next=28;break;case 22:e.prev=22,e.t0=e.catch(0),v.listState.dataShow=!1,v.listState.finished=!0,v.listState.refreshing=!1,v.isClick=!1;case 28:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(){return r.apply(this,arguments)}}(),L=function(){v.params.page=1,v.list=[],v.listState.dataShow=!0,v.listState.loading=!1,v.listState.finished=!1,x()},Y=function(t){v.timeName=t.selectedValues[0]+"年"+t.selectedValues[1]+"月",v.showPopoverTime=!1,L()};return s(e(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.orchestraList.length>0&&(v.selectOrchestra=t.orchestraList[0]),e.next=4,x();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])})))),function(){var e;return c("div",{style:{minHeight:"calc(100vh - var(--van-tabs-line-height) - var(--header-height))",overflow:"hidden"}},[c("div",{class:"searchGroup",style:"background: transparent"},[c("div",{class:["searchItem",v.showPopoverTime&&"searchItem-active"],onClick:function(){v.showPopoverTime=!0}},[v.timeName,c("i",{class:"arrow"},null)]),c("div",{class:["searchItem",v.orchestraStatus&&"searchItem-active"],onClick:function(){v.orchestraStatus=!0}},[c("span",null,[v.selectOrchestra.text||" "]),c("i",{class:"arrow"},null)])]),c("div",{style:{overflowY:"auto",height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 1.17333rem)"}},[v.listState.dataShow?c(g,{modelValue:v.listState.refreshing,"onUpdate:modelValue":function(t){return v.listState.refreshing=t},onRefresh:L,style:{minHeight:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 1.17333rem)"}},{default:function(){return[c(y,{finished:v.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:x,immediateCheck:!1},(r=e=v.list.map((function(e){return c(w,{center:!0,class:q.reportList},{title:function(){return c("div",null,[e.orchestraName])},value:function(){return c(l,{type:"primary",round:!0,size:"small",onClick:function(){return function(e){var r="WEEKLY"===t.type?"/train-week-report":"/train-month-report";_.push({path:r,query:{id:e.id}})}(e)}},{default:function(){return[u("查看报告")]}})},label:function(){return"WEEKLY"===t.type?c("div",{class:q.time},[e.startTime,u("~"),e.endTime]):c("div",{class:q.time},[e.monthlyTime])}})})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!p(r)?e:{default:function(){return[e]}}))];var r}}):c(h,{btnStatus:!1,tips:"暂无训练报告"},null)]),c(f,{show:v.showPopoverTime,"onUpdate:show":function(t){return v.showPopoverTime=t},position:"bottom",round:!0,teleport:"body",class:"popupBottomSearch"},{default:function(){return[c(b,{onCancel:function(){v.showPopoverTime=!1},onConfirm:Y,modelValue:v.currentDate,"onUpdate:modelValue":function(t){return v.currentDate=t},formatter:d,columnsType:r.value},null)]}}),c(f,{show:v.orchestraStatus,"onUpdate:show":function(t){return v.orchestraStatus=t},position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:function(){return[c(S,{columns:t.orchestraList,onCancel:function(){return v.orchestraStatus=!1},onConfirm:function(t){v.selectOrchestra=t.selectedOptions[0],v.orchestraStatus=!1,L()}},null)]}})])}}});t("default",r({name:"train-report",setup:function(){var t=sessionStorage.getItem("mass-message-send"),r=o({loading:!0,tabValue:t||"WEEKLY",orchestraList:[],height:"auto"}),n=function(){var t=e(regeneratorRuntime.mark((function t(){var e,n,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r.loading=!0,t.next=4,m.post("/api-school/orchestra/page",{data:{page:1,rows:100,status:"DONE",type:"DELIVERY"}});case 4:e=t.sent,n=e.data,a=n.rows||[],o=[],a.forEach((function(t){o.push({text:t.name,value:t.id})})),o.unshift({text:"全部乐团",value:""}),r.orchestraList=[].concat(o),r.loading=!1,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),r.loading=!1;case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(){return t.apply(this,arguments)}}();return n(),function(){return c("div",{class:q.train},[c(v,{position:"top",onGetHeight:function(t){document.documentElement.style.setProperty("--header-height",t+"px"),r.height=t}},{default:function(){return[c(_,{border:!1},null)]}}),!r.loading&&c(x,{sticky:!0,lineWidth:20,lineHeight:4,offsetTop:r.height,swipeable:!0,animated:!0,active:r.tabValue,"onUpdate:active":function(t){return r.tabValue=t},onChange:function(t){sessionStorage.setItem("train-report-tab",t)}},{default:function(){return[c(L,{title:"周报",name:"WEEKLY"},{default:function(){return[c(Y,{type:"WEEKLY",orchestraList:r.orchestraList},null)]}}),c(L,{title:"月报",name:"MONTHLY"},{default:function(){return[c(Y,{type:"MONTHLY",orchestraList:r.orchestraList},null)]}})]}})])}}}))}}}))}();