month-report-legacy.84f6b7a8.js 8.2 KB

1
  1. !function(){function e(e,n,t,r,a,o,s){try{var i=e[o](s),c=i.value}catch(u){return void t(u)}i.done?n(c):Promise.resolve(c).then(r,a)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(a,o){var s=n.apply(t,r);function i(n){e(s,a,o,i,c,"next",n)}function c(n){e(s,a,o,i,c,"throw",n)}i(void 0)}))}}System.register(["./index-legacy.c1f63540.js","./week-report-legacy.66a29afb.js","./icon-or-legacy.41f67ed6.js","./index-legacy.25454ed0.js","./html2canvas.esm-legacy.19f9c2b7.js","./index-legacy.45d07924.js","./index-legacy.cdcc5f23.js","./universalTransition-legacy.c05506af.js","./index-legacy.4722dbad.js"],(function(e){"use strict";var t,r,a,o,s,i,c,u,l,h,d,p,m,f,T,A,g,E,v,C,R,w,y,N,O,S,D,U,L,x,k,b,H,B,I,P,M,_;return{setters:[function(e){t=e.d,r=e.ag,a=e.ah,o=e.r,s=e.$,i=e.c,c=e.aj,u=e._,l=e.an,h=e.q,d=e.a5,p=e.P,m=e.m,f=e.bj,T=e.e,A=e.o,g=e.bp,E=e.p,v=e.bC,C=e.bD},function(e){R=e.s,w=e.O,y=e.T,N=e.i,O=e.a,S=e.S,D=e.b,U=e.c,L=e.d,x=e.p,k=e.e,b=e.f},function(e){H=e.i},function(e){B=e.O},function(e){I=e.h},function(e){P=e.I},function(e){M=e.G,_=e.a},function(){},function(){}],execute:function(){var j="./assets/icon-train-month.8ecb8a4c.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMBAMAAACkW0HUAAAAElBMVEUAAABAFf87GP46Fv06GP86F/1KQQonAAAABXRSTlMADMN/YYlGpecAAAAvSURBVAjXY2BgYHRgAAGhYBDJqBpqAOKEhgaDOaFALpAD5EIpqCBECVQDTDvUMADDuwrdRd1HGQAAAABJRU5ErkJggg==",G=e("reportCourseType",{PERCUSSION:"打击乐",FLUTE:"长笛",SAX:"萨克斯",CLARINET:"单簧管",TRUMPET:"小号",TROMBONE:"长号",HORN:"圆号",BARITONE_TUBA:"上低音号-大号",EUPHONIUM:"上低音号",TUBA:"大号",MUSIC_THEORY:"乐理",INSTRUMENTAL_ENSEMBLE:"合奏"});e("default",t({name:"train-report",setup:function(){var e=r(),t=a(),Q=o({id:t.query.id,share:t.query.share,showQrcode:!1,url:window.location.href+"&share=1",width:0,height:0}),q=o({orchestraName:null,monthlyTime:null,startTime:null,endTime:null,COURSEWARE:{},coursewareList:[],COURSE_SCHEDULE:{},KNOWLEDGE:{},ORCHESTRA:{},PHOTO:{},STUDENT_ATTENDANCE:{},TEACHER_ATTENDANCE:{}}),F=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,m.get("/api-school/open/orchestraReport/detail/"+Q.id);case 3:for(r in n=e.sent,t=n.data,q.COURSEWARE=t.reportItem.COURSEWARE||{},q.COURSE_SCHEDULE=t.reportItem.COURSE_SCHEDULE||{},q.KNOWLEDGE=t.reportItem.KNOWLEDGE||{},q.ORCHESTRA=t.reportItem.ORCHESTRA||{},q.PHOTO=t.reportItem.PHOTO||{},q.STUDENT_ATTENDANCE=t.reportItem.STUDENT_ATTENDANCE||{},q.TEACHER_ATTENDANCE=t.reportItem.TEACHER_ATTENDANCE||{},q.orchestraName=t.orchestraName||"",q.monthlyTime=t.monthlyTime||"",q.startTime=t.startTime||"",q.endTime=t.endTime||"",q.COURSEWARE)"TOTAL"!=r&&q.coursewareList.push(G[r]);e.next=22;break;case 20:e.prev=20,e.t0=e.catch(0);case 22:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(){return e.apply(this,arguments)}}(),K=o({saveLoading:!1,image:null,shareLoading:!1}),Y=function(){var e=n(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!K.saveLoading){e.next=2;break}return e.abrupt("return");case 2:K.saveLoading=!0,K.image?J():(t=document.getElementById("preview-container"),I(t,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(function(){var e=n(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n.toDataURL("image/png"),K.image=t,J();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()).catch((function(){f(),K.saveLoading=!1})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){if(!K.shareLoading)if(K.shareLoading=!0,K.image)V();else{var e=document.getElementById("preview-container");I(e,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(function(){var e=n(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n.toDataURL("image/png"),K.image=t,V();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()).catch((function(){f(),K.shareLoading=!1}))}},V=function(){var e=K.image;setTimeout((function(){K.shareLoading=!1}),100),e&&T({api:"shareTripartite",content:{title:"",desc:"",image:e,video:"",type:"image",shareType:"wechat"}},(function(e){e&&e.content&&A(e.content.message||(e.content.status?"分享成功":"分享失败"))}))},J=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g({message:"图片生成中...",forbidClick:!0}),setTimeout((function(){K.saveLoading=!1}),100),e.next=4,E({api:"savePicture",content:{base64:K.image}});case 4:"success"===(null==(t=e.sent)||null===(n=t.content)||void 0===n?void 0:n.status)?v("保存成功"):C("保存失败");case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return s((function(){F()})),function(){return i("div",{class:[R.trainWeek,R.trainMonth,1==Q.share?R.trasinMonthShare:""]},[i("div",{class:R.trainContainer},null),i(c,{background:"transparent",border:!1,title:" ",color:"white",isBack:1!=Q.share},{right:function(){return 1!=Q.share&&i("i",{class:R.iconShare,onClick:function(){Q.showQrcode=!0,u((function(){var e=document.querySelector("#preview-container"),n=l(e);Q.width=n.width,Q.height=n.height,n.width>0&&n.height>0&&(e.style.width=Math.round(n.width)+"px",e.style.height=Math.round(n.height)+"px")}))}},null)}}),i("div",{class:[R.headerContant,R.teacherHeaderContant]},[i("div",{class:R.orchestra},[i(P,{src:H,class:R.iconOrchestra},null),i("span",null,[q.orchestraName])]),i("div",null,[i(P,{src:j,class:R.iconTrainWeek},null)]),i("div",{class:R.trainTimer},[q.monthlyTime])]),i(w,{type:"month",reportData:q.ORCHESTRA},null),i(y,{type:"month",reportData:q.COURSE_SCHEDULE},null),i("div",{class:[R.trainPhoto,R.teacherTrainPhoto]},[i(P,{src:N,class:R.iconPhoto},null),i("p",{onClick:function(){1!=Q.share&&e.push({path:"/school-photo"})},style:{display:"flex",alignItems:"center"}},[h("本月上传"),i("span",null,[q.PHOTO.TOTAL||0]),h("张训练照片"),1!=Q.share&&i(d,{name:O,size:"10",style:{marginLeft:"10px"}},null)])]),i(S,{type:"month",reportData:q.STUDENT_ATTENDANCE},null),i(D,{type:"month",reportData:q.TEACHER_ATTENDANCE},null),i("div",{class:[R.trainClass,R.teacherTrainClass]},[i(P,{src:U,class:R.iconPhoto},null),i("div",null,[i("p",{class:R.subjectTips},[h("课件使用未达标班级")]),i("p",{class:R.subjectNames,style:"color: #FF99A2"},[q.coursewareList.map((function(e){return e+" "}))])])]),i(L,{type:"month",reportData:q.KNOWLEDGE},null),i(p,{show:Q.showQrcode,"onUpdate:show":function(e){return Q.showQrcode=e},position:"bottom",style:{background:"transparent"}},{default:function(){return[i("div",{class:R.codeContainer},[i("div",{class:[R.codeImg,R.teacherCodeImg],id:"preview-container"},[i(P,{src:"./assets/popup-week-banner.72a73dd1.png",class:R.popupWeekBanner},null),i("div",{class:R.codeContent},[i("div",{class:[R.headerContant,R.teacherHeaderContant,R.headerContantPopup]},[i("div",{class:R.orchestra},[i(P,{src:H,class:R.iconOrchestra},null),i("span",null,[q.orchestraName])]),i("div",null,[i(P,{src:j,class:R.iconTrainWeek},null)]),i("div",{class:R.trainTimer},[i(P,{class:R.point,src:W},null),q.monthlyTime,i(P,{class:R.point,src:W},null)])]),i("div",{class:R.codeQr},[i(P,{src:x,class:R.popupQrcodeBg},null),i(B,{text:Q.url,size:"100%",logoSize:"small"},null)]),i("div",{style:{textAlign:"center"}},[i("span",{class:R.codeBtnText},[h("扫描上方二维码"),i("span",null,[h("查看训练月报")])])])])]),i("div",{class:R.codeBottom},[i(d,{name:"cross",size:22,class:R.close,color:"#666",onClick:function(){return Q.showQrcode=!1}},null),i("h3",{class:R.title},[i("i",null,null),h("分享方式")]),i(M,{columnNum:2,border:!1},{default:function(){return[i(_,{onClick:Y},{icon:function(){return i(P,{class:R.shareImg,src:k},null)},text:function(){return i("div",{class:R.shareText},[h("保存图片")])}}),i(_,{onClick:z},{icon:function(){return i(P,{class:R.shareImg,src:b},null)},text:function(){return i("div",{class:R.shareText},[h("微信")])}})]}})])])]}})])}}}))}}}))}();