import{ao as R,d as S,y as N,ah as C,ag as q,r as M,ai as t,$ as E,c as a,q as i,ak as B,B as G,P as V,b2 as j,F as U,al as Q,m as v,_ as W,R as x,aj as z}from"./index.5f7ffb46.js";import{O as I}from"./index.7790de2a.js";import{i as D}from"./countUp.min.6b87fae2.js";import{i as k}from"./isSameOrBefore.6d8d79ab.js";import{O as J}from"./index.fdad9231.js";import{G as F,a as h}from"./index.adf0b8fc.js";import{L as K}from"./index.9ef28852.js";import{D as X}from"./index.af85409e.js";import{P as Z}from"./index.5057303f.js";import{T as ee,a as H}from"./index.6bbd7daa.js";import"./index.78e196a2.js";import"./use-tab-status.69b57a37.js";import"./utils.0f86fc1f.js";import"./Picker.148c9d83.js";import"./index.de1f78a6.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";const ae="_gridContainer_a6cas_1",te="_title_a6cas_7",se="_red_a6cas_21",oe="_name_a6cas_24",re="_gridClass_a6cas_29",ne="_teacher_a6cas_34",ce="_className_a6cas_40",ie="_line_a6cas_47",le="_informationBottom_a6cas_69",ue="_codeContainer_a6cas_72",me="_codeImg_a6cas_72",de="_codeContent_a6cas_79",pe="_codeTitle_a6cas_82",fe="_codeName_a6cas_90",he="_codeQr_a6cas_97",_e="_codeBtnText_a6cas_109",ge="_codeTips_a6cas_119",ye="_close_a6cas_127",ve="_codeBottom_a6cas_132",De="_shareImg_a6cas_154",Ye="_shareText_a6cas_158";var r={gridContainer:ae,title:te,red:se,name:oe,gridClass:re,teacher:ne,className:ce,line:ie,informationBottom:le,codeContainer:ue,codeImg:me,codeContent:de,codeTitle:pe,codeName:fe,codeQr:he,codeBtnText:_e,codeTips:ge,close:ye,codeBottom:ve,shareImg:De,shareText:Ye},P={exports:{}};(function(d,l){(function(c,u){d.exports=u()})(R,function(){return function(c,u){u.prototype.isSameOrAfter=function(o,e){return this.isSame(o,e)||this.isAfter(o,e)}}})})(P);var A=P.exports;t.extend(k,A);function Te(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!Q(d)}var we=S({name:"detail-information",props:{termTimes:{type:Object,default:{}}},setup(d){const l=N(()=>d.termTimes.start),c=N(()=>d.termTimes.end),u=C(),o=q(),e=M({timeShow:!1,currentData:[t().year()+""],actionText:"\u4E0A\u5B66\u671F",actionType:"up",actionTerm:[{name:"\u4E0A\u5B66\u671F",selected:!0,value:"up"},{name:"\u4E0B\u5B66\u671F",value:"down"}],oPopover:!1,check:[],checkboxRefs:[],isLoading:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},bottomHeight:0,params:{startTime:t(t().year()+l.value).format("YYYY-MM-DD HH:mm:ss"),endTime:t(t().year()+c.value).add(1,"year").subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),page:1,rows:20},statistics:{},orchestraInfo:{}}),p=n=>{e.actionTerm.forEach(s=>{s.selected=!1}),n.selected=!0,e.actionText=n.name,e.actionType=n.value,n.value==="up"?(e.params.startTime=t(Number(e.currentData[0])+l.value).format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(Number(e.currentData[0])+c.value).add(1,"year").subtract(1,"day").format("YYYY-MM-DD HH:mm:ss")):n.value==="down"&&(e.params.startTime=t(Number(e.currentData[0])+c.value).add(1,"year").format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(Number(e.currentData[0])+l.value).add(1,"year").subtract(1,"day").format("YYYY-MM-DD HH:mm:ss")),e.oPopover=!1,b()},_=n=>{e.currentData=n.selectedValues;const s=Number(e.currentData[0])+1;e.actionType==="up"?(e.params.startTime=t(s+l.value).format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(s+c.value).add(1,"year").subtract(1,"day").format("YYYY-MM-DD HH:mm:ss")):e.actionType==="down"&&(e.params.startTime=t(s+c.value).format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(s+l.value).subtract(1,"day").format("YYYY-MM-DD HH:mm:ss")),e.timeShow=!1,b()},O=async()=>{try{const{data:n}=await v.get("/api-school/orchestra/detail/"+u.query.id);e.orchestraInfo=n||{}}catch{}},L=async()=>{try{const{data:n}=await v.post("/api-school/school/schoolSummaryStat",{data:{orchestraId:u.query.id}});e.statistics=n||{},$()}catch{}},Y=async()=>{try{if(e.isLoading)return;e.isLoading=!0;const n=await v.post("/api-school/classGroup/page",{data:{...e.params,orchestraId:u.query.id}});e.listState.loading=!1;const s=n.data||{};if(e.list.length>0&&s.current===1)return;const g=s.rows||[];e.list=e.list.concat(g),e.listState.finished=s.current>=s.pages,e.params.page=s.current+1,e.listState.dataShow=e.list.length>0,e.isLoading=!1}catch{e.listState.dataShow=!1,e.listState.finished=!0,e.isLoading=!1}},b=()=>{e.params.page=1,e.list=[],e.listState.dataShow=!0,e.listState.loading=!1,e.listState.finished=!1,Y()},$=()=>{W(()=>{const n=e.statistics;new D("currentStudentNum",n.currentStudent||0).start(),new D("time1",n.attendanceRate*100||0).start(),new D("time2",n.homeworkSubmissionRate*100||0).start(),new D("time3",n.practicePassRate*100||0).start()})};return E(async()=>{const n=t(t().year()+l.value).format("YYYY-MM-DD"),s=t(t().year()+c.value).format("YYYY-MM-DD"),g=t().format("YYYY-MM-DD");console.log(g,n);const T=t(g).isBefore(t(n)),w=t(g).isBefore(t(s)),y=t().year();T&&w&&(e.currentData=[y-1+""],e.params.startTime=t(y-1+l.value).format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(t().year()+c.value).subtract(1,"day").format("YYYY-MM-DD HH:mm:ss")),!T&&!w&&(e.params.startTime=t(t().year()+l.value).format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(t().year()+c.value).add(1,"year").subtract(1,"day").format("YYYY-MM-DD HH:mm:ss")),T&&!w&&(e.params.startTime=t(y+c.value).format("YYYY-MM-DD HH:mm:ss"),e.params.endTime=t(y+l.value).subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),e.actionTerm.forEach(f=>{f.value==="down"?(f.color="var(--van-primary-color)",e.actionText=f.text,e.actionType=f.value):f.color=""}),e.currentData=[y-1+""],e.actionText="\u4E0B\u5B66\u671F",e.actionType="down",e.actionTerm.forEach(f=>{f.value==="down"?f.selected=!0:f.selected=!1})),await O(),await L(),await Y()}),()=>{let n;return a(U,null,[a("div",{class:["searchGroup","van-hairline--top"]},[a("div",{class:["searchItem",e.timeShow?"searchItem-active":""],onClick:()=>e.timeShow=!0},[e.currentData[0],i("\u5E74 "),a("i",{class:"arrow"},null)]),a("div",{class:["searchItem",e.oPopover?"searchItem-active":""],onClick:()=>e.oPopover=!0},[e.actionText,i(" "),a("i",{class:"arrow"},null)])]),a("div",{style:{height:"calc(100vh - var(--header-height) - var(--van-tabs-line-height) - 1.17333rem)",overflow:"hidden",overflowY:"auto"}},[a(F,{border:!1,class:r.gridContainer},{default:()=>[a(h,null,{default:()=>[a("p",{class:[r.title,r.red]},[a("span",{id:"currentStudentNum"},[e.statistics.studentNum||0]),a("i",null,[i(" \u540D")])]),a("p",{class:r.name},[i("\u5728\u8BFB\u5B66\u5458")])]}),a(h,null,{default:()=>[a("p",{class:[r.title,r.red]},[a("span",{id:"time1"},[e.statistics.attendanceRate||0]),i("%")]),a("p",{class:r.name},[i("\u5230\u8BFE\u7387")])]}),a(h,null,{default:()=>[a("p",{class:[r.title,r.red]},[a("span",{id:"time2"},[e.statistics.homeworkRate||0]),i("%")]),a("p",{class:r.name},[i("\u4F5C\u4E1A\u63D0\u4EA4\u7387")])]}),a(h,null,{default:()=>[a("p",{class:[r.title,r.red]},[a("span",{id:"time3"},[e.statistics.homeworkQualifiedRate||0]),i("%")]),a("p",{class:r.name},[i("\u7EC3\u4E60\u5408\u683C\u7387")])]})]}),e.listState.dataShow?a(K,{finished:e.listState.finished,finishedText:" ",class:[r.liveList],onLoad:Y,immediateCheck:!1},Te(n=e.list.map(s=>a("div",{class:[r.gridContainer,r.gridClass]},[a("div",{class:r.className},[a("i",{class:r.line},null),s.name]),a(F,{border:!1,columnNum:3},{default:()=>[a(h,null,{default:()=>[a("p",{class:r.title},[s.preStudentNum||0]),a("p",{class:r.name},[i("\u5728\u8BFB\u5B66\u5458")])]}),a(h,null,{default:()=>[a("p",{class:[r.title,r.teacher,"van-ellipsis"]},[s.teacherName||"-"]),a("p",{class:r.name},[i("\u4F34\u5B66\u8001\u5E08")])]}),a(h,null,{default:()=>[a("p",{class:r.title},[s.completeCourseScheduleNum||0,i("/"),s.courseScheduleNum||0]),a("p",{class:r.name},[i("\u8BFE\u65F6")])]})]})])))?n:{default:()=>[n]}):a(B,{btnStatus:!1,tips:"\u6682\u65E0\u73ED\u7EA7"},null),e.orchestraInfo.canSignUp&&a(I,{position:"bottom",class:r.informationBottom,onGetHeight:s=>{e.bottomHeight=s}},{default:()=>[a("div",{class:"btnGroup"},[a(G,{round:!0,block:!0,type:"primary",onClick:()=>{o.push({path:"save-share-image",query:{type:"orchestra",id:u.query.id}})}},{default:()=>[i("\u62A5\u540D\u4E8C\u7EF4\u7801")]})])]})]),a(J,{show:e.oPopover,"onUpdate:show":s=>e.oPopover=s,actions:e.actionTerm,onSelect:p,teleport:"body"},null),a(V,{show:e.timeShow,"onUpdate:show":s=>e.timeShow=s,position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:()=>[a(X,{modelValue:e.currentData,"onUpdate:modelValue":s=>e.currentData=s,columnsType:["year"],formatter:j,onConfirm:_,onCancel:()=>e.timeShow=!1},null)]})])}}});const xe="_gridContainer_xmx94_1",Se="_title_xmx94_8",Ce="_red_xmx94_17",be="_name_xmx94_20",Ne="_gridClass_xmx94_25",Fe="_teacher_xmx94_31",He="_className_xmx94_35",Me="_line_xmx94_42",Ee="_gridCell_xmx94_50",Be="_img_xmx94_54",Ie="_courseware_xmx94_67",ke="_teacherDesc_xmx94_73",Pe="_classNum_xmx94_87",Ae="_classNumItem_xmx94_95",Oe="_use_xmx94_101",Le="_nums_xmx94_104",$e="_block_xmx94_110";var m={gridContainer:xe,title:Se,red:Ce,name:be,gridClass:Ne,teacher:Fe,className:He,line:Me,gridCell:Ee,img:Be,class:"_class_xmx94_35",courseware:Ie,teacherDesc:ke,classNum:Pe,classNumItem:Ae,use:Oe,nums:Le,block:$e};t.extend(k,A);var Re=S({name:"plan",props:{termTimes:{type:Object,default:{}},height:{type:[String,Number],default:0}},setup(d){const l=C(),c=M({isLoading:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:100}}),u=async()=>{try{const{data:o}=await v.post("/api-school/orchestraDataStatistics/orchestraTrainingProgress",{data:{orchestraId:l.query.id}});c.list=o||[],c.listState.dataShow=c.list.length>0}catch{c.listState.dataShow=!1}};return E(async()=>{await u()}),()=>a("div",{style:"height: calc(100vh - var(--header-height) - var(--van-tabs-line-height)); overflow: hidden; overflow-y: auto;"},[c.listState.dataShow?a("div",{class:[m.gridContainer]},[c.list.map(o=>a("div",{class:m.gridClass},[a("div",{class:m.className},[a("i",{class:m.line,style:{backgroundColor:o.coursewareNum{const{data:p}=await v.get("/api-school/sysParamConfig/queryByParamNameList",{params:{paramNames:"last_term_time,next_term_time"}});(p||[]).forEach(_=>{_.paramName==="last_term_time"?o.value.start=_.paramValue:_.paramName==="next_term_time"&&(o.value.end=_.paramValue)})})(),()=>a("div",{class:Ge.orchestraDetail},[a(I,{position:"top",onGetHeight:p=>{u.value=p,document.documentElement.style.setProperty("--header-height",p+"px")}},{default:()=>[a(z,{border:!1},null)]}),a(ee,{sticky:!0,lineWidth:20,lineHeight:4,active:c.value,"onUpdate:active":p=>c.value=p,animated:!0,offsetTop:u.value,swipeable:!0,onChange:p=>{sessionStorage.setItem("orchestra-detail-tab",p)}},{default:()=>[a(H,{title:"\u4E50\u56E2\u4FE1\u606F",name:"information"},{default:()=>[a(we,{termTimes:o.value},null)]}),a(H,{title:"\u8BAD\u7EC3\u8FDB\u5EA6",name:"plan"},{default:()=>[a(Re,{height:u.value,termTimes:o.value},null)]})]})])}});export{ca as default};