1 |
- !function(){function e(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,a)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(a,i){var o=t.apply(r,n);function s(t){e(o,a,i,s,c,"next",t)}function c(t){e(o,a,i,s,c,"throw",t)}s(void 0)}))}}var r=document.createElement("style");r.innerHTML="._train_6zu3g_1{--van-tab-active-text-color: var(--van-primary-color);--van-tab-text-color: #333;--van-tab-font-size: .42667rem}._train_6zu3g_1 ._cellGroup_6zu3g_6{margin:.32rem .34667rem 0;overflow:hidden;border-radius:.26667rem}._train_6zu3g_1 ._cellGroup_6zu3g_6 ._select_6zu3g_11{height:1.2rem}._train_6zu3g_1 ._cellGroup_6zu3g_6 ._select_6zu3g_11 ._icon_6zu3g_14{width:.45333rem;height:.45333rem;margin-right:.10667rem;flex-shrink:0}._train_6zu3g_1 ._cellGroup_6zu3g_6 ._select_6zu3g_11 .van-cell__title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._train_6zu3g_1 ._cellGroup_6zu3g_6 ._select_6zu3g_11 .van-cell__right-icon{color:#333;transform:rotate(90deg);margin:0 0 0 .10667rem}._reportList_6zu3g_30{width:auto;margin:0 .34667rem .32rem;padding:.4rem .32rem;border-radius:.26667rem}._reportList_6zu3g_30 .van-cell__title{font-size:.42667rem;color:#333}._reportList_6zu3g_30 .van-cell_label{font-size:.37333rem;color:#777}._reportList_6zu3g_30 .van-cell__value{flex:0 auto}._itemChild_6zu3g_47{flex:1}\n",document.head.appendChild(r),System.register(["./ResizeObserver.es-legacy.42c87f31.js","./index-legacy.3051ad75.js","./index-legacy.4e98d1df.js","./index-legacy.5ed6775c.js","./index-legacy.ed38cd1f.js","./index-legacy.200152ff.js","./index-legacy.f0837e3a.js","./index-legacy.4ff85114.js","./index-legacy.dd465861.js","./index-legacy.db49cff7.js","./use-tab-status-legacy.c8efb696.js","./utils-legacy.b90c958d.js","./Picker-legacy.bc86cfc8.js","./index-legacy.d630a845.js","./index-legacy.82cefb8a.js"],(function(e){"use strict";var r,n,a,i,o,s,c,u,l,h,f,d,p,m,g,_,v,y,w,b,x,S,Y;return{setters:[function(e){r=e.d,n=e.U,a=e.ai,i=e.r,o=e.ak,s=e.a1,c=e.c,u=e.B,l=e.t,h=e.am,f=e.P,d=e.b4,p=e.an,m=e.n,g=e.al},function(e){_=e.O},function(e){v=e.O},function(e){y=e.L},function(e){w=e.C},function(e){b=e.D},function(e){x=e.P},function(e){S=e.T,Y=e.a},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var z={train:"_train_6zu3g_1",cellGroup:"_cellGroup_6zu3g_6",select:"_select_6zu3g_11",icon:"_icon_6zu3g_14",reportList:"_reportList_6zu3g_30",itemChild:"_itemChild_6zu3g_47"};var L=r({name:"train-list",props:{type:{type:String,default:"WEEKLY"},orchestraList:{type:Array,default:function(){return[]}}},setup:function(e){var r=n(["year","month"]),g=a(),_=i({showPopoverTime:!1,timeName:o().format("YYYY")+"年"+o().format("MM")+"月",currentDate:[o().format("YYYY"),o().format("MM")],orchestraStatus:!1,selectOrchestra:{},isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},params:{page:1,rows:20}}),S=function(){var r=t(regeneratorRuntime.mark((function t(){var r,n,a,i,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!_.isClick){t.next=3;break}return t.abrupt("return");case 3:return _.isClick=!0,r=o(_.currentDate[0]+"-"+_.currentDate[1]+"01"),n=r.startOf("month").format("YYYY-MM-DD"),a=r.endOf("month").format("YYYY-MM-DD"),t.next=9,m.post("/api-school/orchestraReport/page",{data:{reportType:e.type,page:_.params.page,rows:_.params.rows,orchestraId:_.selectOrchestra.value,startTime:n,endTime:a}});case 9:if(i=t.sent,s=i.data,_.listState.loading=!1,_.listState.refreshing=!1,!(_.list.length>0&&1===s.current)){t.next=15;break}return t.abrupt("return");case 15:_.list=_.list.concat(s.rows||[]),_.listState.finished=s.current>=s.pages,_.params.page=s.current+1,_.listState.dataShow=_.list.length>0,_.isClick=!1,t.next=28;break;case 22:t.prev=22,t.t0=t.catch(0),_.listState.dataShow=!1,_.listState.finished=!0,_.listState.refreshing=!1,_.isClick=!1;case 28:case"end":return t.stop()}}),t,null,[[0,22]])})));return function(){return r.apply(this,arguments)}}(),Y=function(){_.params.page=1,_.list=[],_.listState.dataShow=!0,_.listState.loading=!1,_.listState.finished=!1,S()},L=function(e){_.timeName=e.selectedValues[0]+"年"+e.selectedValues[1]+"月",_.showPopoverTime=!1,Y()};return s(t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.orchestraList.length>0&&(_.selectOrchestra=e.orchestraList[0]),t.next=4,S();case 4:t.next=8;break;case 6:t.prev=6,t.t0=t.catch(0);case 8:case"end":return t.stop()}}),t,null,[[0,6]])})))),function(){var t;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",z.itemChild,_.showPopoverTime&&"searchItem-active"],onClick:function(){_.showPopoverTime=!0}},[_.timeName,c("i",{class:"arrow"},null)]),c("div",{class:["searchItem",z.itemChild,_.orchestraStatus&&"searchItem-active"],onClick:function(){_.orchestraStatus=!0}},[c("span",null,[_.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)"}},[_.listState.dataShow?c(v,{modelValue:_.listState.refreshing,"onUpdate:modelValue":function(e){return _.listState.refreshing=e},onRefresh:Y,style:{minHeight:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 1.17333rem)"}},{default:function(){return[c(y,{finished:_.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:S,immediateCheck:!1},(r=t=_.list.map((function(t){return c(w,{center:!0,class:z.reportList},{title:function(){return c("div",null,[(e=t.orchestraName,e&&e.length>13?e.substring(0,8)+"..."+e.substring(e.length-5,e.length):e)]);var e},value:function(){return c(u,{type:"primary",round:!0,size:"small",onClick:function(){return function(t){var r="WEEKLY"===e.type?"/train-week-report":"/train-month-report";g.push({path:r,query:{id:t.id}})}(t)}},{default:function(){return[l("查看报告")]}})},label:function(){return"WEEKLY"===e.type?c("div",{class:z.time},[o(t.startTime).format("YYYY/MM/DD"),l("-"),o(t.endTime).format("YYYY/MM/DD")]):c("div",{class:z.time},[t.monthlyTime])}})})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!p(r)?t:{default:function(){return[t]}}))];var r}}):c(h,{btnStatus:!1,tips:"暂无训练报告"},null)]),c(f,{show:_.showPopoverTime,"onUpdate:show":function(e){return _.showPopoverTime=e},position:"bottom",round:!0,teleport:"body",class:"popupBottomSearch"},{default:function(){return[c(b,{onCancel:function(){_.showPopoverTime=!1},onConfirm:L,modelValue:_.currentDate,"onUpdate:modelValue":function(e){return _.currentDate=e},formatter:d,columnsType:r.value},null)]}}),c(f,{show:_.orchestraStatus,"onUpdate:show":function(e){return _.orchestraStatus=e},position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:function(){return[c(x,{columns:e.orchestraList,onCancel:function(){return _.orchestraStatus=!1},onConfirm:function(e){_.selectOrchestra=e.selectedOptions[0],_.orchestraStatus=!1,Y()}},null)]}})])}}});e("default",r({name:"train-report",setup:function(){var e=sessionStorage.getItem("train-report-tab"),r=i({loading:!0,tabValue:e||"WEEKLY",orchestraList:[],height:"auto"}),n=function(){var e=t(regeneratorRuntime.mark((function e(){var t,n,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.loading=!0,e.next=4,m.post("/api-school/orchestra/page",{data:{page:1,rows:100,status:"DONE",type:"DELIVERY"}});case 4:t=e.sent,n=t.data,a=n.rows||[],i=[],a.forEach((function(e){i.push({text:e.name,value:e.id})})),i.unshift({text:"全部乐团",value:""}),r.orchestraList=[].concat(i),r.loading=!1,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),r.loading=!1;case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(){return e.apply(this,arguments)}}();return n(),function(){return c("div",{class:z.train},[c(_,{position:"top",onGetHeight:function(e){document.documentElement.style.setProperty("--header-height",e+"px"),r.height=e}},{default:function(){return[c(g,{border:!1},null)]}}),!r.loading&&c(S,{sticky:!0,lineWidth:20,lineHeight:4,offsetTop:r.height,swipeable:!0,animated:!0,active:r.tabValue,"onUpdate:active":function(e){return r.tabValue=e},onChange:function(e){sessionStorage.setItem("train-report-tab",e)}},{default:function(){return[c(Y,{title:"周报",name:"WEEKLY"},{default:function(){return[c(L,{type:"WEEKLY",orchestraList:r.orchestraList},null)]}}),c(Y,{title:"月报",name:"MONTHLY"},{default:function(){return[c(L,{type:"MONTHLY",orchestraList:r.orchestraList},null)]}})]}})])}}}))}}}))}();
|