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.c1f63540.js","./index-legacy.7e71b67e.js","./index-legacy.4596d3ae.js","./index-legacy.3d6462c3.js","./index-legacy.8a8e9c42.js","./index-legacy.908aeecb.js","./index-legacy.6aa82d51.js","./index-legacy.aa9b4ef8.js","./use-tab-status-legacy.77a01b2b.js","./utils-legacy.270b3ede.js","./Picker-legacy.5a9c13b9.js","./index-legacy.49ab1c78.js","./index-legacy.6603017a.js"],(function(t){"use strict";var r,n,a,o,i,s,c,l,u,h,f,p,d,m,v,_,g,y,b,w,S,Y,x;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,p=t.a_,d=t.al,m=t.m,v=t.aj},function(t){_=t.O},function(t){g=t.O},function(t){y=t.L},function(t){b=t.C},function(t){w=t.D},function(t){S=t.P},function(t){Y=t.T,x=t.a},function(){},function(){},function(){},function(){},function(){}],execute:function(){var L={train:"_train_8q9to_1",cellGroup:"_cellGroup_8q9to_6",select:"_select_8q9to_11",icon:"_icon_8q9to_14",reportList:"_reportList_8q9to_30"};var q=r({name:"train-list",props:{type:{type:String,default:"WEEKLY"},orchestraList:{type:Array,default:function(){return[]}}},setup:function(t){var r=n(["year","month"]),v=a(),_=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}}),Y=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,!_.isClick){e.next=3;break}return e.abrupt("return");case 3:return _.isClick=!0,r=i(_.currentDate[0]+"-"+_.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:_.params.page,rows:_.params.rows,orchestraId:_.selectOrchestra.value,startTime:n,endTime:a}});case 9:if(o=e.sent,s=o.data,_.listState.loading=!1,_.listState.refreshing=!1,!(_.list.length>0&&1===s.current)){e.next=15;break}return e.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,e.next=28;break;case 22:e.prev=22,e.t0=e.catch(0),_.listState.dataShow=!1,_.listState.finished=!0,_.listState.refreshing=!1,_.isClick=!1;case 28:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(){return r.apply(this,arguments)}}(),x=function(){_.params.page=1,_.list=[],_.listState.dataShow=!0,_.listState.loading=!1,_.listState.finished=!1,Y()},q=function(t){_.timeName=t.selectedValues[0]+"年"+t.selectedValues[1]+"月",_.showPopoverTime=!1,x()};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&&(_.selectOrchestra=t.orchestraList[0]),e.next=4,Y();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",_.showPopoverTime&&"searchItem-active"],onClick:function(){_.showPopoverTime=!0}},[_.timeName,c("i",{class:"arrow"},null)]),c("div",{class:["searchItem",_.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(g,{modelValue:_.listState.refreshing,"onUpdate:modelValue":function(t){return _.listState.refreshing=t},onRefresh:x,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:Y,immediateCheck:!1},(r=e=_.list.map((function(e){return c(b,{center:!0,class:L.reportList},{title:function(){return c("div",null,[(t=e.orchestraName,t&&t.length>13?t.substring(0,8)+"..."+t.substring(t.length-5,t.length):t)]);var t},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";v.push({path:r,query:{id:e.id}})}(e)}},{default:function(){return[u("查看报告")]}})},label:function(){return"WEEKLY"===t.type?c("div",{class:L.time},[i(e.startTime).format("YYYY/MM/DD"),u("-"),i(e.endTime).format("YYYY/MM/DD")]):c("div",{class:L.time},[e.monthlyTime])}})})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!d(r)?e:{default:function(){return[e]}}))];var r}}):c(h,{btnStatus:!1,tips:"暂无训练报告"},null)]),c(f,{show:_.showPopoverTime,"onUpdate:show":function(t){return _.showPopoverTime=t},position:"bottom",round:!0,teleport:"body",class:"popupBottomSearch"},{default:function(){return[c(w,{onCancel:function(){_.showPopoverTime=!1},onConfirm:q,modelValue:_.currentDate,"onUpdate:modelValue":function(t){return _.currentDate=t},formatter:p,columnsType:r.value},null)]}}),c(f,{show:_.orchestraStatus,"onUpdate:show":function(t){return _.orchestraStatus=t},position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:function(){return[c(S,{columns:t.orchestraList,onCancel:function(){return _.orchestraStatus=!1},onConfirm:function(t){_.selectOrchestra=t.selectedOptions[0],_.orchestraStatus=!1,x()}},null)]}})])}}});t("default",r({name:"train-report",setup:function(){var t=sessionStorage.getItem("train-report-tab"),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:L.train},[c(_,{position:"top",onGetHeight:function(t){document.documentElement.style.setProperty("--header-height",t+"px"),r.height=t}},{default:function(){return[c(v,{border:!1},null)]}}),!r.loading&&c(Y,{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(x,{title:"周报",name:"WEEKLY"},{default:function(){return[c(q,{type:"WEEKLY",orchestraList:r.orchestraList},null)]}}),c(x,{title:"月报",name:"MONTHLY"},{default:function(){return[c(q,{type:"MONTHLY",orchestraList:r.orchestraList},null)]}})]}})])}}}))}}}))}();
|