1 |
- import{ao as R,d as S,y as N,ah as C,ag as q,r as F,ai as t,$ as B,c as a,q as i,ak as I,B as G,P as V,a_ as j,F as U,al as Q,m as v,_ as W,R as x,aj as z}from"./index.332c7f08.js";import{O as k}from"./index.d7c1b6ac.js";import{C as Y}from"./countUp.min.9e8207da.js";import{i as E}from"./isSameOrBefore.c25d5b8a.js";import{O as J}from"./index.0197e410.js";import{G as H,a as h}from"./index.5e198b6f.js";import{L as K}from"./index.b186dfda.js";import{D as X}from"./index.1361b221.js";import{P as Z}from"./index.d1b94926.js";import{T as ee,a as M}from"./index.7c580591.js";import"./index.1fff19a4.js";import"./use-tab-status.9d769af8.js";import"./utils.4b86e8c9.js";import"./Picker.e56f94bd.js";import"./index.656e257f.js";import"./index.1e2dfe6e.js";import"./index.4aa8e076.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",me="_codeContainer_a6cas_72",ue="_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",Ye="_shareImg_a6cas_154",De="_shareText_a6cas_158";var r={gridContainer:ae,title:te,red:se,name:oe,gridClass:re,teacher:ne,className:ce,line:ie,informationBottom:le,codeContainer:me,codeImg:ue,codeContent:de,codeTitle:pe,codeName:fe,codeQr:he,codeBtnText:_e,codeTips:ge,close:ye,codeBottom:ve,shareImg:Ye,shareText:De},P={exports:{}};(function(d,l){(function(c,m){d.exports=m()})(R,function(){return function(c,m){m.prototype.isSameOrAfter=function(o,e){return this.isSame(o,e)||this.isAfter(o,e)}}})})(P);var O=P.exports;t.extend(E,O);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),m=C(),o=q(),e=F({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()},L=async()=>{try{const{data:n}=await v.get("/api-school/orchestra/detail/"+m.query.id);e.orchestraInfo=n||{}}catch{}},$=async()=>{try{const{data:n}=await v.post("/api-school/school/schoolSummaryStat",{data:{orchestraId:m.query.id}});e.statistics=n||{},A()}catch{}},D=async()=>{try{if(e.isLoading)return;e.isLoading=!0;const n=await v.post("/api-school/classGroup/page",{data:{...e.params,orchestraId:m.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,D()},A=()=>{W(()=>{const n=e.statistics;new Y("currentStudentNum",n.currentStudent||0).start(),new Y("time1",n.attendanceRate*100||0).start(),new Y("time2",n.homeworkSubmissionRate*100||0).start(),new Y("time3",n.practicePassRate*100||0).start()})};return B(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 L(),await $(),await D()}),()=>{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(H,{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:D,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(H,{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(I,{btnStatus:!1,tips:"\u6682\u65E0\u73ED\u7EA7"},null),e.orchestraInfo.canSignUp&&a(k,{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:m.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",He="_teacher_xmx94_31",Me="_className_xmx94_35",Fe="_line_xmx94_42",Be="_gridCell_xmx94_50",Ie="_img_xmx94_54",ke="_courseware_xmx94_67",Ee="_teacherDesc_xmx94_73",Pe="_classNum_xmx94_87",Oe="_classNumItem_xmx94_95",Le="_use_xmx94_101",$e="_nums_xmx94_104",Ae="_block_xmx94_110";var u={gridContainer:xe,title:Se,red:Ce,name:be,gridClass:Ne,teacher:He,className:Me,line:Fe,gridCell:Be,img:Ie,class:"_class_xmx94_35",courseware:ke,teacherDesc:Ee,classNum:Pe,classNumItem:Oe,use:Le,nums:$e,block:Ae};t.extend(E,O);var Re=S({name:"plan",props:{termTimes:{type:Object,default:{}},height:{type:[String,Number],default:0}},setup(d){const l=C(),c=F({isLoading:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:100}}),m=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 B(async()=>{await m()}),()=>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:[u.gridContainer]},[c.list.map(o=>a("div",{class:u.gridClass},[a("div",{class:u.className},[a("i",{class:u.line,style:{backgroundColor:o.coursewareNum<o.endCourseNum?"#FF928D":"#64A9FF"}},null),o.classGroupName]),a("div",{class:u.classNum},[a("div",{class:u.classNumItem},[a("i",{class:u.block,style:{backgroundColor:o.coursewareNum<o.endCourseNum?"#FF9B96":"#A2CDFF"}},null),a("span",{class:u.use},[i("\u5DF2\u4F7F\u7528")]),a("span",{class:u.nums,style:{color:o.coursewareNum<o.endCourseNum?"#F44541":"#333"}},[o.coursewareNum||0]),i("\u8BFE\u4EF6")]),a("div",{class:u.classNumItem},[a("i",{class:u.block},null),a("span",{class:u.use},[i("\u5DF2\u7ED3\u675F")]),a("span",{class:u.nums},[o.endCourseNum||0]),i("\u8282\u8BFE")])]),a(Z,{color:o.coursewareNum<o.endCourseNum?"linear-gradient(90deg, #FFC3A1 0%, #FF9895 100%)":"linear-gradient(90deg, #CDF1FF 0%, #A0CBFF 100%)",trackColor:"#ECECEC",showPivot:!1,style:{borderRadius:"10px"},percentage:o.endCourseNum?o.coursewareNum/o.endCourseNum*100:0,strokeWidth:8},null)]))]):a(I,{btnStatus:!1,tips:"\u6682\u65E0\u73ED\u7EA7"},null)])}});const qe="_orchestraDetail_xtf76_1";var Ge={orchestraDetail:qe},ca=S({name:"orchestra-detail",setup(){const d=C(),l=sessionStorage.getItem("orchestra-detail-tab"),c=x(l||d.query.tabs||"information");sessionStorage.removeItem("orchestra-detail-tab");const m=x("auto"),o=x({start:"09-01",end:"03-01"});return(async()=>{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(k,{position:"top",onGetHeight:p=>{m.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:m.value,swipeable:!0,onChange:p=>{sessionStorage.setItem("orchestra-detail-tab",p)}},{default:()=>[a(M,{title:"\u4E50\u56E2\u4FE1\u606F",name:"information"},{default:()=>[a(we,{termTimes:o.value},null)]}),a(M,{title:"\u8BAD\u7EC3\u8FDB\u5EA6",name:"plan"},{default:()=>[a(Re,{height:m.value,termTimes:o.value},null)]})]})])}});export{ca as default};
|