import{d as S,r as g,Z as B,$ as w,c as e,q as u,ag as L,ah as H,aj as U,_ as I,an as M,a5 as C,P as W,m as k,bj as O,e as _,o as F,bv as b,p as P,bG as G,bH as x}from"./index.5f7ffb46.js";import{r as K,s as l,t as Q,a as $,b as j,c as t,O as q,T as z,i as V,d as Y,S as J,e as X,f as Z,g as ee,p as te,h as ae,j as se}from"./week-report.70c7a0f1.js";import{i as v}from"./icon-or.620acfd8.js";import{O as oe}from"./index.6369cc1e.js";import{h as R}from"./html2canvas.esm.bd39409e.js";import{i as re,L as D,u as ne,a as le,b as ie,c as ce,d as ue,e as Ee,f as pe,g as he,h as Te,j as de,k as me,l as Ae,m as ge,n as Ce}from"./universalTransition.c9e35979.js";import{I as i}from"./index.276a5d68.js";import{G as Oe,a as f}from"./index.adf0b8fc.js";import"./index.5057303f.js";var y="./assets/icon-train-month.8ecb8a4c.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMBAMAAACkW0HUAAAAElBMVEUAAABAFf87GP46Fv06GP86F/1KQQonAAAABXRSTlMADMN/YYlGpecAAAAvSURBVAjXY2BgYHRgAAGhYBDJqBpqAOKEhgaDOaFALpAD5EIpqCBECVQDTDvUMADDuwrdRd1HGQAAAABJRU5ErkJggg==",ve="./assets/popup-week-banner.72a73dd1.png";ne([le,ie,ce,ue,Ee,pe,he,Te,de,me,Ae,ge,Ce]);var Re=S({name:"orchestra-num",props:{type:{type:String,default:"week"},reportData:{type:Object,default:()=>({})}},setup(p){const c=g({total:0,type:"target",workTarget:{},workSubmitted:{}});B(()=>p.reportData,()=>{s()});let r;const s=()=>{r&&r.dispose();const T=p.reportData||{},n=c.type==="target"?T.HOMEWORK_TARGET:T.HOMEWORK_SUBMITTED,d=[],m=[];for(const a in n)a==="TOTAL"?c.total=Math.ceil(n[a]*100):(d.push(K[a]),m.push(Math.ceil(n[a]*100)));const A=document.getElementById("overWorkEcharts");r=re(A);const h={xAxis:{type:"category",data:d,axisLabel:{rotate:45,fontSize:10,color:"#333"},axisLine:{lineStyle:{color:"#D6D6D6"}}},yAxis:{type:"value"},grid:{left:0,top:22,right:0,bottom:12,containLabel:!0},series:[{type:"bar",showBackground:!1,barWidth:15,itemStyle:{color:new D(0,0,0,1,[{offset:0,color:"#69DCE8"},{offset:.5,color:"#E5CEFB"},{offset:1,color:"#58A2FF"}])},emphasis:{itemStyle:{color:new D(0,0,0,1,[{offset:0,color:"#69DCE8"},{offset:.5,color:"#E5CEFB"},{offset:1,color:"#58A2FF"}])}},label:{show:!0,position:"top",fontSize:10,color:"#777"},data:m}]};h&&r.setOption(h)};return w(()=>{s()}),()=>e("div",{class:[l.trainSection,l.teacherOverSection]},[e("div",{class:l.trainTitle},[e("div",{class:l.name},[e(i,{src:p.type==="month"?Q:$,class:l.allowLine},null),c.type==="target"?"\u4F5C\u4E1A\u5B8C\u6210\u7387":"\u4F5C\u4E1A\u63D0\u4EA4\u7387"]),e("div",{class:l.countNums},[e(i,{src:j,class:l.arrowPoint},null),c.type==="target"?"\u603B\u5B8C\u6210\u7387":"\u603B\u63D0\u4EA4\u7387",e("span",null,[c.total]),u("%")])]),e("div",{class:l.trainSectionContent},[e("div",{class:l.tContent},[e("div",{class:l.calssEchartTitle},[e("span",{class:l.unit},[u("\u5355\u4F4D\uFF1A%")]),e("div",null,[e("span",{class:[l.overWorkType,c.type==="target"?l.overWorkActive:""],onClick:()=>{c.type="target",s()}},[u("\u4F5C\u4E1A\u5B8C\u6210\u7387")]),e("span",{class:[l.overWorkType,c.type==="submitted"?l.overWorkActive:""],onClick:()=>{c.type="submitted",s()}},[u("\u4F5C\u4E1A\u63D0\u4EA4\u7387")])])]),e("div",{id:"overWorkEcharts",class:l.classEcharts},null)])])])}});const De={PERCUSSION:"\u6253\u51FB\u4E50",FLUTE:"\u957F\u7B1B",SAX:"\u8428\u514B\u65AF",CLARINET:"\u5355\u7C27\u7BA1",TRUMPET:"\u5C0F\u53F7",TROMBONE:"\u957F\u53F7",HORN:"\u5706\u53F7",BARITONE_TUBA:"\u4E0A\u4F4E\u97F3\u53F7-\u5927\u53F7",EUPHONIUM:"\u4E0A\u4F4E\u97F3\u53F7",TUBA:"\u5927\u53F7",MUSIC_THEORY:"\u4E50\u7406",INSTRUMENTAL_ENSEMBLE:"\u5408\u594F"};var Ie=S({name:"train-report",setup(){const p=L(),c=H(),r=g({id:c.query.id,share:c.query.share,showQrcode:!1,url:window.location.href+"&share=1",width:0,height:0}),s=g({orchestraName:null,monthlyTime:null,startTime:null,endTime:null,COURSEWARE:{},coursewareList:[],COURSE_SCHEDULE:{},KNOWLEDGE:{},ORCHESTRA:{},PHOTO:{},STUDENT_ATTENDANCE:{},TEACHER_ATTENDANCE:{},HOMEWORK_TARGET:{},HOMEWORK_SUBMITTED:{},TEACHER_NOT_ATTENDANCE:{}}),T=async()=>{try{const{data:a}=await k.get("/api-school/open/orchestraReport/detail/"+r.id);s.COURSEWARE=a.reportItem.COURSEWARE||{},s.COURSE_SCHEDULE=a.reportItem.COURSE_SCHEDULE||{},s.KNOWLEDGE=a.reportItem.KNOWLEDGE||{},s.ORCHESTRA=a.reportItem.ORCHESTRA||{},s.HOMEWORK_TARGET=a.reportItem.HOMEWORK_TARGET||{},s.HOMEWORK_SUBMITTED=a.reportItem.HOMEWORK_SUBMITTED||{},s.PHOTO=a.reportItem.PHOTO||{},s.STUDENT_ATTENDANCE=a.reportItem.STUDENT_ATTENDANCE||{},s.TEACHER_ATTENDANCE=a.reportItem.TEACHER_ATTENDANCE||{},s.TEACHER_NOT_ATTENDANCE=a.reportItem.TEACHER_NOT_ATTENDANCE||{},s.orchestraName=a.orchestraName||"",s.monthlyTime=a.monthlyTime||"",s.startTime=a.startTime||"",s.endTime=a.endTime||"";const o=s.COURSEWARE;for(const E in o)E!="TOTAL"&&s.coursewareList.push(De[E])}catch{}},n=g({saveLoading:!1,image:null,shareLoading:!1}),d=async()=>{if(!n.saveLoading)if(n.saveLoading=!0,n.image)h();else{const a=document.getElementById("preview-container");R(a,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async o=>{const E=o.toDataURL("image/png");n.image=E,h()}).catch(()=>{O(),n.saveLoading=!1})}},m=()=>{if(!n.shareLoading)if(n.shareLoading=!0,n.image)A();else{const a=document.getElementById("preview-container");R(a,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async o=>{const E=o.toDataURL("image/png");n.image=E,A()}).catch(()=>{O(),n.shareLoading=!1})}},A=()=>{const a=n.image;setTimeout(()=>{n.shareLoading=!1},100),a&&_({api:"shareTripartite",content:{title:"",desc:"",image:a,video:"",type:"image",shareType:"wechat"}},o=>{o&&o.content&&F(o.content.message||(o.content.status?"\u5206\u4EAB\u6210\u529F":"\u5206\u4EAB\u5931\u8D25"))})},h=async()=>{var o;b({message:"\u56FE\u7247\u751F\u6210\u4E2D...",forbidClick:!0}),setTimeout(()=>{n.saveLoading=!1},100);const a=await P({api:"savePicture",content:{base64:n.image}});((o=a==null?void 0:a.content)==null?void 0:o.status)==="success"?G("\u4FDD\u5B58\u6210\u529F"):x("\u4FDD\u5B58\u5931\u8D25")};return w(()=>{T()}),()=>e("div",{class:[t.trainWeek,t.trainMonth,r.share==1?t.trasinMonthShare:""]},[e("div",{class:t.trainContainer},null),e(U,{background:"transparent",border:!1,title:" ",color:"white",isBack:r.share!=1},{right:()=>r.share!=1&&e("i",{class:t.iconShare,onClick:()=>{r.showQrcode=!0,I(()=>{const a=document.querySelector("#preview-container"),o=M(a);r.width=o.width,r.height=o.height,o.width>0&&o.height>0&&(a.style.width=Math.round(o.width)+"px",a.style.height=Math.round(o.height)+"px")})}},null)}),e("div",{class:[t.headerContant,t.teacherHeaderContant]},[e("div",{class:t.orchestra},[e(i,{src:v,class:t.iconOrchestra},null),e("span",null,[s.orchestraName])]),e("div",null,[e(i,{src:y,class:t.iconTrainWeek},null)]),e("div",{class:t.trainTimer},[s.monthlyTime])]),e(q,{type:"month",reportData:s.ORCHESTRA},null),e(z,{type:"month",reportData:s.COURSE_SCHEDULE},null),e(Re,{type:"month",reportData:{HOMEWORK_SUBMITTED:s.HOMEWORK_SUBMITTED,HOMEWORK_TARGET:s.HOMEWORK_TARGET}},null),e("div",{class:[t.trainPhoto,t.teacherTrainPhoto]},[e(i,{src:V,class:t.iconPhoto},null),e("p",{onClick:()=>{r.share!=1&&p.push({path:"/school-photo"})},style:{display:"flex",alignItems:"center"}},[u("\u672C\u6708\u4E0A\u4F20"),e("span",null,[s.PHOTO.TOTAL||0]),u("\u5F20\u8BAD\u7EC3\u7167\u7247"),r.share!=1&&e(C,{name:Y,size:"10",style:{marginLeft:"10px"}},null)])]),e(J,{type:"month",reportData:s.STUDENT_ATTENDANCE},null),e(X,{type:"month",reportData:s.TEACHER_ATTENDANCE,reportDataNot:s.TEACHER_NOT_ATTENDANCE},null),e("div",{class:[t.trainClass,t.teacherTrainClass]},[e(i,{src:Z,class:t.iconPhoto},null),e("div",null,[e("p",{class:t.subjectTips},[u("\u8BFE\u4EF6\u4F7F\u7528\u672A\u8FBE\u6807\u73ED\u7EA7")]),e("p",{class:t.subjectNames,style:"color: #FF99A2"},[s.coursewareList.map(a=>a+" ")])])]),e(ee,{type:"month",reportData:s.KNOWLEDGE},null),e(W,{show:r.showQrcode,"onUpdate:show":a=>r.showQrcode=a,position:"bottom",style:{background:"transparent"}},{default:()=>[e("div",{class:t.codeContainer},[e("div",{class:[t.codeImg,t.teacherCodeImg],id:"preview-container"},[e(i,{src:ve,class:t.popupWeekBanner},null),e("div",{class:t.codeContent},[e("div",{class:[t.headerContant,t.teacherHeaderContant,t.headerContantPopup]},[e("div",{class:t.orchestra},[e(i,{src:v,class:t.iconOrchestra},null),e("span",null,[s.orchestraName])]),e("div",null,[e(i,{src:y,class:t.iconTrainWeek},null)]),e("div",{class:t.trainTimer},[e(i,{class:t.point,src:N},null),s.monthlyTime,e(i,{class:t.point,src:N},null)])]),e("div",{class:t.codeQr},[e(i,{src:te,class:t.popupQrcodeBg},null),e(oe,{text:r.url,size:"100%",logoSize:"small"},null)]),e("div",{style:{textAlign:"center"}},[e("span",{class:t.codeBtnText},[u("\u626B\u63CF\u4E0A\u65B9\u4E8C\u7EF4\u7801"),e("span",null,[u("\u67E5\u770B\u8BAD\u7EC3\u6708\u62A5")])])])])]),e("div",{class:t.codeBottom},[e(C,{name:"cross",size:22,class:t.close,color:"#666",onClick:()=>r.showQrcode=!1},null),e("h3",{class:t.title},[e("i",null,null),u("\u5206\u4EAB\u65B9\u5F0F")]),e(Oe,{columnNum:2,border:!1},{default:()=>[e(f,{onClick:d},{icon:()=>e(i,{class:t.shareImg,src:ae},null),text:()=>e("div",{class:t.shareText},[u("\u4FDD\u5B58\u56FE\u7247")])}),e(f,{onClick:m},{icon:()=>e(i,{class:t.shareImg,src:se},null),text:()=>e("div",{class:t.shareText},[u("\u5FAE\u4FE1")])})]})])])]})])}});export{Ie as default,De as reportCourseType};