!function(){var e=document.createElement("style");e.innerHTML='._searchBand_1s5pv_1{display:inline-block;font-size:.37333rem;font-weight:600;color:#333}._searchBand_1s5pv_1 ._bandName_1s5pv_7{display:inline-block;max-width:4.8rem;vertical-align:text-top}._gridContainer_1s5pv_12{margin:0 .34667rem .32rem}._gridContainer_1s5pv_12 ._title_1s5pv_15{font-size:.69333rem;font-weight:700;color:#333}._gridContainer_1s5pv_12 ._title_1s5pv_15 i{font-style:normal;font-size:.32rem;color:#333}._gridContainer_1s5pv_12 ._red_1s5pv_25{color:#f67146}._gridContainer_1s5pv_12 ._name_1s5pv_28{padding-top:.21333rem;font-size:.32rem;color:#777}._gridClass_1s5pv_33 ._img_1s5pv_33{width:1.06667rem;height:1.06667rem;margin-right:.32rem;border-radius:50%;overflow:hidden}._gridClass_1s5pv_33 ._teacherName_1s5pv_40{display:flex;align-items:center}._gridClass_1s5pv_33 ._teacherName_1s5pv_40 ._maxWidth_1s5pv_44{max-width:3.2rem}._gridClass_1s5pv_33 ._teacherName_1s5pv_40 ._name_1s5pv_28{padding-top:0;font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._gridClass_1s5pv_33 ._teacherName_1s5pv_40 .van-tag{margin-left:.16rem}._gridClass_1s5pv_33 ._classCheckbox_1s5pv_57{display:flex;justify-content:flex-end}._gridClass_1s5pv_33 ._orchestraName_1s5pv_61{padding-top:.08rem;font-size:.32rem;color:#777;line-height:.45333rem;max-width:5.33333rem}._gridClass_1s5pv_33 ._title_1s5pv_15{font-size:.64rem}._gridClass_1s5pv_33 ._className_1s5pv_71{padding:.45333rem .4rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._gridClass_1s5pv_33 ._className_1s5pv_71 ._line_1s5pv_78{display:inline-block;width:.10667rem;height:.32rem;background:#ff8057;border-radius:.08rem;margin-right:.16rem}._gridClass_1s5pv_33 .van-grid-item:after{content:" ";position:absolute;top:50%;right:0;margin-top:-.26667rem;width:.02667rem;height:.53333rem;background:#eaeaea;border-radius:.02667rem}._gridClass_1s5pv_33 .van-grid-item:last-child:after{display:none}._classCellGroup_1s5pv_100{margin-bottom:.32rem;border-radius:.26667rem;overflow:hidden}\n',document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./icon_teacher-legacy.07765f44.js","./index-legacy.fad72574.js","./index-legacy.8fb0ec91.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.11f1ea5f.js","./index-legacy.d39f6f47.js","./index-legacy.761bf286.js","./index-legacy.38b799d5.js"],(function(e){"use strict";var s,a,t,i,r,l,o,n,c,d,_,p,m,h,u,g,v,f,C,y,b,w,x,S,N;return{setters:[function(e){s=e.d,a=e.r,t=e.Z,i=e.$,r=e.c,l=e.aj,o=e.q,n=e.ak,c=e.B,d=e.P,_=e.al,p=e.m,m=e.g},function(e){h=e.O},function(e){u=e.i},function(e){g=e.L},function(e){v=e.C},function(e){f=e.C},function(e){C=e.C},function(e){y=e.I},function(e){b=e.T},function(e){w=e.C},function(e){x=e.G,S=e.a},function(e){N=e.P}],execute:function(){var k={searchBand:"_searchBand_1s5pv_1",bandName:"_bandName_1s5pv_7",gridContainer:"_gridContainer_1s5pv_12",title:"_title_1s5pv_15",red:"_red_1s5pv_25",name:"_name_1s5pv_28",gridClass:"_gridClass_1s5pv_33",img:"_img_1s5pv_33",teacherName:"_teacherName_1s5pv_40",maxWidth:"_maxWidth_1s5pv_44",classCheckbox:"_classCheckbox_1s5pv_57",orchestraName:"_orchestraName_1s5pv_61",className:"_className_1s5pv_71",line:"_line_1s5pv_78",classCellGroup:"_classCellGroup_1s5pv_100"};e("P",s({name:"practice-class",props:{classType:{type:String,default:""},orchestraId:{type:String,default:""},selectItem:{type:Array,default:()=>[]}},emits:["close","confirm"],setup(e,{slots:s,attrs:I,emit:j}){const P=a({showPopover:!1,orchestraId:e.orchestraId||null,orchestraName:null,orchestraList:[],isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20},check:e.selectItem||[],checkboxRefs:[]}),z=async()=>{try{if(P.isClick)return;P.isClick=!0;const{data:s}=await p.post("/api-school/classGroup/page",{data:{...P.params,schoolId:m.user.data.school.id,orchestraId:P.orchestraId,classType:e.classType}});P.isClick=!1,P.listState.loading=!1;const a=s||{};if(P.list.length>0&&1===a.current)return;P.list.concat(a.rows||[]).forEach((e=>{e.preStudentNum>0&&P.list.push(e)})),P.listState.finished=a.current>=a.pages,P.params.page=a.current+1,P.listState.dataShow=P.list.length>0}catch{P.listState.dataShow=!1,P.listState.finished=!0,P.isClick=!1}};t((()=>e.classType),(()=>{P.params.page=1,P.list=[],P.listState.dataShow=!0,P.listState.loading=!1,P.listState.finished=!1,z()}));const G=()=>{j("confirm",P.check),j("close")};return i((async()=>{e.orchestraId?await z():await(async()=>{try{const{data:e}=await p.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:m.user.data.school.id,status:"DONE"}}),s=e.rows||[],a=[];s.forEach((e=>{a.push({text:e.name,value:e.id})})),P.orchestraList=[...a],a.length>0&&(P.orchestraId=a[0].value,P.orchestraName=a[0].text,await z())}catch{}})()})),()=>{let s;return r("div",{class:[k.practiceClass,!P.listState.dataShow&&"emptyRootContainer"]},[r(h,{position:"top"},{default:()=>[r(l,{title:"选择班级",desotry:!1},null),!e.orchestraId&&r("div",{class:"searchGroup-single"},[r("div",{class:["searchItem",P.showPopover&&"searchItem-active"],onClick:()=>P.showPopover=!0},[r("span",null,[P.orchestraName])])])]}),P.listState.dataShow?r(g,{finished:P.listState.finished,style:{marginTop:e.orchestraId?"12px":0},finishedText:" ",class:[k.liveList],onLoad:z,immediateCheck:!1},{default:()=>{return[r(v,{class:[k.gridContainer,k.gridClass],modelValue:P.check,"onUpdate:modelValue":e=>P.check=e},(e=s=P.list.map((e=>r(f,{class:k.classCellGroup,onClick:()=>{var s;e.teacherId&&(s=e.id,P.checkboxRefs[s].toggle())},border:!1},{default:()=>[r(C,{center:!0,titleStyle:{flex:"0 auto"},valueClass:k.classCheckbox},{icon:()=>r(y,{src:u,class:k.img},null),title:()=>r("div",{class:k.content},[r("div",{class:k.teacherName},[e.teacherName?r("div",{class:[k.name,k.maxWidth,"van-ellipsis"]},[e.teacherName]):r("div",{class:[k.name,"van-ellipsis"],style:{color:"red"}},[o("暂未设置伴学老师")]),r(b,{type:"primary"},{default:()=>[e.name]})]),r("div",{class:[k.orchestraName,"van-ellipsis"]},[e.orchestraName])]),value:()=>r(w,{name:e.id,ref:s=>P.checkboxRefs[e.id]=s,disabled:!e.teacherId,onClick:e=>{e.stopPropagation()}},null)}),r(x,{border:!1,columnNum:3},{default:()=>[r(S,null,{default:()=>[r("p",{class:k.title},[e.preStudentNum]),r("p",{class:k.name},[o("学员人数")])]}),r(S,null,{default:()=>[r("p",{class:[k.title]},[e.courseScheduleNum-e.completeCourseScheduleNum]),r("p",{class:k.name},[o("剩余课时")])]}),r(S,null,{default:()=>[r("p",{class:k.title},[e.courseScheduleNum]),r("p",{class:k.name},[o("总课时")])]})]})]}))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!_(e)?s:{default:()=>[s]}))];var e}}):r(n,{btnStatus:!1,tips:"暂无班级"},null),r(h,{position:"bottom"},{default:()=>[r("div",{class:"btnGroup"},[r(c,{block:!0,round:!0,type:"primary",onClick:G},{default:()=>[o("确认")]})])]}),r(d,{show:P.showPopover,"onUpdate:show":e=>P.showPopover=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[r(N,{columns:P.orchestraList,onCancel:()=>P.showPopover=!1,onConfirm:e=>{P.orchestraId=e.selectedOptions[0].value,P.orchestraName=e.selectedOptions[0].text,P.showPopover=!1,P.params.page=1,P.list=[],P.listState.dataShow=!0,P.listState.loading=!1,P.listState.finished=!1,z()}},null)]})])}}}))}}}))}();