index-legacy-333ad25e-1714390128119.js 25 KB

1
  1. System.register(["./index-legacy-593f0982-1714390128119.js","./index.module-legacy-990676cd-1714390128119.js","./index-legacy-25fc703e-1714390128119.js","./index-legacy-ff2abf0e-1714390128119.js","./index-legacy-3354aaef-1714390128119.js","./api-legacy-98aa8317-1714390128119.js","./api-legacy-84a75497-1714390128119.js","./Cascader-legacy-5b8bfdea-1714390128119.js","./Scrollbar-legacy-af61c1fc-1714390128119.js","./contants-legacy-553ed366-1714390128119.js","./add-legacy-e7111c9d-1714390128119.js","./index-legacy-a2747e9a-1714390128119.js","./api-legacy-65c06072-1714390128119.js","./index-legacy-79a52246-1714390128119.js","./index-legacy-64168bef-1714390128119.js","./updateSubject-legacy-7a54d727-1714390128119.js","./api-legacy-0acba0d9-1714390128119.js","./use-async-legacy-025598b5-1714390128119.js","./addStudentModel-legacy-fb233023-1714390128119.js","./catchData-legacy-5ba6011d-1714390128119.js","./index-legacy-0e33e483-1714390128119.js","./urlUtils-legacy-cfb03d91-1714390128119.js","./index-legacy-d5e1f1e4-1714390128119.js","./Slider-legacy-62cd3948-1714390128119.js","./index-legacy-67e20a54-1714390128119.js","./icon_default-legacy-fa9bb009-1714390128119.js","./icon-plus-t-legacy-9d0f221a-1714390128119.js","./api-legacy-4f2c060c-1714390128119.js","./icon-pan-legacy-9492b61b-1714390128119.js","./ding-legacy-f3656c17-1714390128119.js","./state-legacy-0ea56965-1714390128119.js","./searchArray-legacy-37af03b3-1714390128119.js","./index-legacy-70051199-1714390128119.js","./api-legacy-faad19d2-1714390128119.js","./icon-collect-active-legacy-b7c75e66-1714390128119.js","./index-legacy-589e4951-1714390128119.js","./index-legacy-dfce1e35-1714390128119.js","./index-legacy-c13945ff-1714390128119.js","./index-legacy-c3df43e0-1714390128119.js","./teacherIcon-legacy-3eeb62c3-1714390128119.js","./index.module-legacy-7efba815-1714390128119.js","./html2canvas.esm-legacy-646e7b08-1714390128119.js"],(function(e,a){"use strict";var l,t,s,n,i,r,d,u,o,c,p,g,v,h,m,y,f,w,b,C,x,S,k,j,L,R,A,F,Y,I,G,N,U,B,V,T,E,W,P,O,M,q,D,z,J,K,$,Q,Z,_,H,X,ee,ae,le,te,se,ne,ie,re,de,ue,oe;return{setters:[e=>{l=e.d,t=e.e,s=e.b,n=e.r,i=e.y,r=e.p,d=e.f,u=e.N,o=e.g,c=e.x,p=e.w,g=e.j,v=e.k,h=e.S,m=e.aF,y=e.m,f=e.ax,w=e.aG,b=e.v,C=e.B,x=e.$,S=e.A,k=e.R,j=e.W,L=e.X,R=e.F,A=e.T,F=e.c,Y=e.u,I=e.a,G=e.aE,N=e.l},e=>{U=e.s},e=>{B=e.S},e=>{V=e.C},e=>{T=e.P},e=>{E=e.a,W=e.g,P=e.c,O=e.b,M=e.d,q=e.u,D=e.e,z=e.f},e=>{J=e.a},e=>{K=e.N},e=>{$=e.N},e=>{Q=e.g,Z=e.c},e=>{_=e.a},e=>{H=e.g,X=e.s},e=>{ee=e.g,ae=e.s},e=>{le=e.T},e=>{te=e.P},e=>{se=e.U},e=>{ne=e.g,ie=e.b},e=>{re=e.i,de=e.s},e=>{ue=e.A},e=>{oe=e.u},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){var a=document.createElement("style");a.textContent="._showContentWidth_1uy1t_1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n",document.head.appendChild(a);const ce=l({props:{activeRow:{type:Object,default:()=>({id:""})},gradeYearList:{type:Array,default:()=>[]},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(e,{emit:a}){const l=t({uploading:!1}),h=s(),m=n(),y=t({gradeYear:null,currentGradeNum:null,currentClass:null,instrumentId:null}),f=n([]),w=n([]);return i((()=>[y.gradeYear,y.currentGradeNum,y.currentClass]),(()=>{y.instrumentId=null,(async()=>{try{const{data:e}=await W({gradeYear:y.gradeYear,currentGradeNum:y.currentGradeNum,currentClass:y.currentClass}),a=e||[];w.value=a}catch{}})()})),r((()=>{(async()=>{try{const{data:e}=await J({}),a=[{label:e+1,value:e+1},{label:e,value:e}];f.value=a}catch{}})()})),()=>d("div",{class:[U.addClass]},[d(u,{"label-placement":"left",model:y,ref:m},{default:()=>[d(o,{path:"gradeYear",rule:[{required:!0,message:"请选择学年"}]},{default:()=>[d(V,c({style:{width:"400px"},options:f.value,placeholder:"选择学年",clearable:!0},{value:y.gradeYear,"onUpdate:value":e=>y.gradeYear=e}),null)]}),d(o,{path:"currentGradeNum",rule:[{required:!0,message:"请选择年级"}]},{default:()=>[d(V,c({style:{width:"400px"},options:e.gradeNumList,placeholder:"选择年级",clearable:!0},{value:y.currentGradeNum,"onUpdate:value":e=>y.currentGradeNum=e}),null)]}),d(o,{path:"currentClass",rule:[{required:!0,message:"请选择班级"}]},{default:()=>[d(V,c({style:{width:"400px"},options:e.classArray,placeholder:"选择班级",clearable:!0},{value:y.currentClass,"onUpdate:value":e=>y.currentClass=e}),null)]}),d(o,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[d(K,{placeholder:"请选择乐器",value:y.instrumentId,"onUpdate:value":e=>y.instrumentId=e,options:w.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),d(p,{class:U.btnGroup,justify:"center"},{default:()=>[d(g,{round:!0,onClick:()=>a("close")},{default:()=>[v("取消")]}),d(g,{round:!0,loading:l.uploading,onClick:()=>{m.value.validate((async e=>{if(!e){l.uploading=!0;try{await E({...y}),h.success("新增成功"),a("close"),a("getList"),l.uploading=!1}catch(t){console.log(t)}l.uploading=!1}}))},type:"primary"},{default:()=>[v("保存")]})]})])}});function pe(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!C(e)}const ge=l({props:{activeRow:{type:Object,default:()=>({id:""})}},name:"RestStudentBox",emits:["close","getList"],setup(e,{emit:a}){const l=s(),i=t({uploading:!1});n([]),n([]),n();const u=n([]);console.log(e.activeRow,"activeRow");const o=t({gradeYear:null,name:"",id:""}),C=n([]),x=n([]),S=n(null),k=n([]),j=n([]),L=n(null),R=n([]),A=async e=>await O({page:1,rows:999,classGroupId:e}),F=h((()=>(x.value||[]).filter((e=>-1!=e.label.indexOf(S.value||""))))),Y=h((()=>(j.value||[]).filter((e=>-1!=e.label.indexOf(L.value||"")))));return r((async()=>{(async()=>{try{const a=await P({page:1,rows:9999,upgradeFlag:!0});u.value=a.data.rows.map((a=>({label:a.name,key:a.id,gradeYear:a.gradeYear,disabled:a.id==e.activeRow.id}))),u.value[0].disabled?(o.name=u.value[1].label,o.id=u.value[1].key,o.gradeYear=u.value[1].gradeYear):(o.name=u.value[0].label,o.id=u.value[0].key,o.gradeYear=u.value[0].gradeYear);const l=await A(o.id);j.value=l.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id})))}catch(a){console.log(a)}})();const a=await A(e.activeRow.id);x.value=a.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id})))})),()=>{let t,s;return d("div",{class:[U.container,U.resetStudentWrap]},[d("div",{class:U.studentTransfer},[d("div",{class:U.studentTransferList},[d("div",{class:U.studentLeft},[d("div",{class:U.listTop},[d("p",null,[e.activeRow.name]),d("span",null,[v("(当前班级)")])]),d("div",{class:U.listCore},[d(m,{class:U.chioseCheckAllBox},{default:()=>[d(y,{onUpdateChecked:e=>{F.value.length===C.value.length?C.value=[]:C.value=F.value.map((e=>e.value))},checked:F.value.length===C.value.length,indeterminate:C.value.length>0&&F.value.length!==C.value.length,label:"全选"},null)]}),d(m,null,{default:()=>[d(B,c({placeholder:"请输入学生姓名"},{class:U.searchInput,searchWord:S.value,onChangeValue:e=>S.value=e}),null)]}),d($,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[d(f,{value:C.value,"onUpdate:value":e=>C.value=e},pe(t=F.value.map((e=>d(m,{class:U.chioseCheckBox},{default:()=>[d(y,{value:e.value,label:e.label},null)]}))))?t:{default:()=>[t]})]})]),d("div",{class:[U.bottomLeft,U.bottom]},[d("div",{class:U.bottomWrap},[v("共"),x.value.length,v("名学生")])])]),d("div",{class:U.chioseBox},[d("div",{class:[U.chioseBtn,U.chioseBtnRight],onClick:()=>(()=>{const e=x.value.filter((e=>-1!=C.value.indexOf(e.value)));if(e.length>0){const a=e.map((e=>({...e,studentId:e.value,toClassId:o.id})));R.value=R.value.filter((e=>!a.some((a=>a.value===e.value)))),R.value=R.value.concat(a)}x.value=x.value.filter((a=>!e.some((e=>e.value===a.value)))),e.forEach((e=>{j.value.push(e)})),C.value=[]})()},null),d("div",{class:U.chioseBtn,onClick:()=>(()=>{const a=j.value.filter((e=>-1!=k.value.indexOf(e.value)));if(a.length>0){const l=a.map((a=>({...a,studentId:a.value,toClassId:e.activeRow.id})));R.value=R.value.filter((e=>!l.some((a=>a.value===e.value)))),R.value=R.value.concat(l)}j.value=j.value.filter((e=>!a.some((a=>a.value===e.value)))),a.forEach((e=>{x.value.push(e)})),k.value=[],console.log(R.value," submitList.value===>")})()},null)]),d("div",{class:U.studentRight},[d("div",{class:U.listTop},[o.id?d(w,{key:"111",value:o.id,"onUpdate:value":e=>o.id=e,options:u.value,onSelect:e=>{(async e=>{u.value.forEach((a=>{a.key==e&&(o.name=a.label,o.gradeYear=a.gradeYear,o.id=a.key)}));const a=await A(e);j.value=a.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id}))),console.log(R.value,"submitList.value"),j.value=j.value.filter((e=>!R.value.some((a=>a.value===e.value)))),R.value.forEach((e=>{e.toClassId==o.id&&(console.log(e.toClassId,e),j.value.push({label:e.label,value:e.value}))}))})(e)},scrollable:!0},{default:()=>[d("div",{class:U.showGradeSection},[d("div",null,[o.name,o.gradeYear&&d("span",null,[v("("),o.gradeYear,v("学年)")])]),d(b,{class:U.smallArrow,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAATRJREFUSEtjZKAxYKSx+QyjFhAM4dEgGiRBZGxszPr+/Xuue/fufSToJAIKJCQkRF+8ePEapoxRWlpa+Oev31cYGBj4/zP8L337+vVUciwRFxfn/vvv36r//xm8GJkYZ7959SoNZA6jsLi4E8Pff3thhjIxMuW/fv1yEimWQA3f9v8/gx1U35O3b17Lgi1oaGhgmjJ12sH////bkGMJFsMZGBkY09+8eTULbAGIEBUV5fnPwLidVEuwG85U9ObNy354HMAYpFpCjOFwH5BqCbGGY1hATHCRYjhWC/BZwsTEMPfvv3/IqYWBkQE1zNFTH87CDlucMDIy3Pn/n0EFEYH4DcfpA3xxQorhBC2ABdc/BsbdDP//W5BqOFEWIOKE4cK/fwzyjEyMM9++fpVDbE4f+hUOAC9/xhn8Z6OyAAAAAElFTkSuQmCC",previewDisabled:!0},null)])]}):null]),d("div",{class:U.listCore},[d(m,{class:U.chioseCheckAllBox},{default:()=>[d(y,{onUpdateChecked:e=>{Y.value.length===k.value.length?k.value=[]:k.value=Y.value.map((e=>e.value))},checked:Y.value.length===k.value.length,indeterminate:k.value.length>0&&Y.value.length!==k.value.length,label:"全选"},null)]}),d(m,null,{default:()=>[d(B,c({placeholder:"请输入学生姓名"},{class:U.searchInput,searchWord:L.value,onChangeValue:e=>L.value=e}),null)]}),d($,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[d(f,{value:k.value,"onUpdate:value":e=>k.value=e},pe(s=Y.value.map((e=>d(m,{class:U.chioseCheckBox},{default:()=>[d(y,{value:e.value,label:e.label},null)]}))))?s:{default:()=>[s]})]})]),d("div",{class:[U.bottomRight,U.bottom]},[d("div",{class:U.bottomWrap},[v("共"),j.value.length,v("名学生")])])])])]),d(p,{class:U.btnGroup,justify:"center"},{default:()=>[d(g,{round:!0,onClick:()=>a("close")},{default:()=>[v("取消")]}),d(g,{round:!0,loading:i.uploading,type:"primary",onClick:()=>{(async()=>{if(u.value.length<2)l.error("当前只有一个班级,无法调整");else if(R.value<1)a("close");else try{await M(R.value),a("close"),a("getList")}catch(e){console.log(e)}})()}},{default:()=>[v("保存")]})]})])}}}),ve=l({name:"coai-guide",emits:["close"],setup(e,{emit:a}){const l=t({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:H("class1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:x(-4),left:x(-294),width:x(648),height:x(227)},btnsStyle:{bottom:x(30),left:x(-130)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("class2.png"),imgStyle:{top:x(-4),left:x(-276),width:x(515),height:x(227)},btnsStyle:{bottom:x(30),left:x(-110)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("class3.png"),imgStyle:{top:x(-4),width:x(437),height:x(227),left:x(-276)},btnsStyle:{bottom:x(30),left:x(-113)},eleRectPadding:{left:7,top:7,width:14,height:14}}],step:0}),s=n(!1),i=n({});(async()=>{try{const e=await ee({guideTag:"teacher-guideInfo"});e.data?i.value=JSON.parse(e.data?.guideValue)||null:i.value={},i.value&&i.value.classGuide?s.value=!1:s.value=!0}catch(e){console.log(e)}})();const u=()=>{const e=document.getElementById(`class-${l.step}`);if(e){const a=e.getBoundingClientRect(),t=l.steps[l.step].eleRectPadding?.left||0,s=l.steps[l.step].eleRectPadding?.top||0,n=l.steps[l.step].eleRectPadding?.width||0,i=l.steps[l.step].eleRectPadding?.height||0;l.box={left:a.x-t+"px",top:a.y-s+"px",width:a.width+n+"px",height:a.height+i+"px"}}else p()},o=async e=>{try{if("classList"!==e)return;i.value?i.value.classGuide=!1:i.value={classGuide:!1};try{await ae({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(a){console.log(a)}l.step=0,u(),s.value=!0}catch{}};r((()=>{u(),window.addEventListener("resize",c),S.on("teacher-guideInfo",(e=>o(e)))}));const c=()=>{u()};k((()=>{window.removeEventListener("resize",c),S.off("teacher-guideInfo",o)}));const p=()=>{l.step>=4?g():(l.step=l.step+1,u())},g=async()=>{i.value?i.value.classGuide=!0:i.value={classGuide:!0};try{await ae({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(e){console.log(e)}s.value=!1};return()=>d(R,null,[s.value?j(d("div",{"onUpdate:show":e=>s.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[d("div",{class:X.content,onClick:()=>p()},[d("div",{class:X.backBtn,onClick:e=>{e.stopPropagation(),g()}},[v("跳过")]),d("div",{class:X.box,style:{...l.box,...l.steps[l.step].boxStyle},id:`modeType-${l.step}`},[l.steps.map(((e,a)=>d("div",{onClick:e=>e.stopPropagation(),class:X.item,style:"bottom"==e.type?{display:a===l.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:a===l.step?"":"none",left:`${e.eleRect?.left}px`,top:`${l.box?.height}`}},[d("img",{class:X.img,style:e.imgStyle,src:e.img},null),d("div",{class:X.btns,style:e.btnsStyle},[l.step+1==l.steps.length?d(R,null,[d("div",{class:[X.endBtn],onClick:()=>g()},[v("完成")]),d("div",{class:X.nextBtn,onClick:()=>{l.step=0,u()}},[v("再看一遍")])]):d("div",{class:X.btn,onClick:()=>p()},[v("下一步 ("),l.step+1,v("/"),l.steps.length,v(")")])])])))])])]),[[L,s.value,"show"]]):null])}}),he="_showContentWidth_1uy1t_1",me=l({name:"the-tooltip",props:{maxWidth:{type:Number,default:300},showContentWidth:{type:Number,default:120},tipsContent:{type:String,default:""},content:{type:String,default:""},placement:{type:String,default:"top"},showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"}},setup:e=>()=>d(R,null,[d(A,{style:{maxWidth:e.maxWidth+"px"},trigger:e.trigger,placement:e.placement,showArrow:e.showArrow,delay:500},{trigger:()=>d("p",{style:{maxWidth:e.showContentWidth+"px"},class:he},[e.content]),default:()=>e.tipsContent||e.content})])}),ye=l({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(e,{emit:a}){const l=t({uploading:!1}),i=s(),c=n(),h=n([]),m=t({currentGradeNum:null,gradeYear:null,currentClass:null,instrumentId:null,id:null});r((()=>{m.currentGradeNum=e.activeRow.currentGradeNum,m.gradeYear=e.activeRow.gradeYear,m.currentClass=e.activeRow.currentClass,m.instrumentId=e.activeRow.instrumentId,m.id=e.activeRow.id,y()}));const y=async()=>{try{const{data:e}=await W({gradeYear:m.gradeYear,currentGradeNum:m.currentGradeNum,currentClass:m.currentClass}),a=e||[];h.value=a}catch{}};return()=>d("div",{class:[U.addClass]},[d(u,{"label-placement":"left",model:m,ref:c},{default:()=>[d(o,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[d(K,{placeholder:"请选择乐器",value:m.instrumentId,"onUpdate:value":e=>m.instrumentId=e,options:h.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),d(p,{class:U.btnGroup,justify:"center"},{default:()=>[d(g,{round:!0,onClick:()=>a("close")},{default:()=>[v("取消")]}),d(g,{round:!0,loading:l.uploading,onClick:()=>{c.value.validate((async e=>{if(!e){l.uploading=!0;try{await q({...m}),i.success("修改成功"),a("close"),a("getList"),l.uploading=!1}catch(t){console.log(t)}l.uploading=!1}}))},type:"primary"},{default:()=>[v("保存")]})]})])}});e("default",l({name:"class-classList",setup(){const e=oe(),a=F(),l=t({searchForm:{keyword:null,currentClass:"",currentGradeNum:"",instrumentId:"",gradeYear:"",gradeLevel:""},orchestraType:null,courseTypeCode:null,loading:!1,pagination:{page:1,rows:10,pageTotal:6},gradeNumList:[],tableList:[],studentVisible:!1,activeRow:null,showaddClass:!1,goCourseVisiable:!1,removeVisiable:!1,removeRow:{},previewModal:!1,previewParams:{},lastCourse:null,groupBtnLoading:!1,showResetClass:!1,showSubjectClass:!1,groupVisiable:!1,popSelectYearList:[],popSelectLevelList:[],addStudentVisible:!1}),i=n(),h=s(),m=Y(),y=I(),f=()=>{l.pagination.page=1,S(),de({current:l.searchForm,saveKey:y.path})},w=n(!1);l.gradeNumList=Q();const C=()=>{l.searchForm={keyword:null,currentClass:"",currentGradeNum:"",instrumentId:"",gradeYear:"",gradeLevel:""},l.popSelectYearList.length>1&&(l.searchForm.gradeYear=l.popSelectYearList[1].id),S(),de({current:l.searchForm,saveKey:y.path})},x=async()=>{try{await D({ids:l.removeRow.id}),S(),h.success("删除成功"),l.removeVisiable=!1}catch(e){console.log(e)}},S=async()=>{l.loading=!0;try{const e=await P({...l.searchForm,...l.pagination});l.tableList=e.data.rows,l.pagination.pageTotal=e.data.total,l.loading=!1,setTimeout((()=>{l.tableList.length>0&&(w.value=!0)}),500)}catch(e){l.loading=!1,console.log(e)}},k=e=>{l.activeRow=e,l.studentVisible=!0},A=async e=>{try{e.instrumentId?m.push({path:"/prepare-lessons",query:{lastUseCoursewareId:e.lessonCoursewareId,unit:e.lessonCoursewareKnowledgeDetailId,instrumentId:e.instrumentId,courseScheduleSubjectId:e.courseScheduleSubjectId,preStudentNum:e.preStudentNum,name:e.name,classGroupId:e.id}}):(l.showSubjectClass=!0,l.activeRow=e)}catch(a){console.log(a)}},E=e=>{l.activeRow=e,l.showResetClass=!0},W=async e=>{l.activeRow=e,l.groupVisiable=!0},O=async()=>{console.log(l.activeRow,"row"),l.groupBtnLoading=!0;try{await z({classGroupId:l.activeRow.id}),h.success("创建成功"),l.groupVisiable=!1,await S()}catch(e){console.log(e)}l.groupBtnLoading=!1};return re({current:l.searchForm,callBack:e=>{l.searchForm=e}}),r((async()=>{l.loading=!0,await e.getSubjects(),await(async()=>{try{const{data:e}=await ne(),a=e||[];a.forEach((e=>{e.name=e.name+"学年"})),l.popSelectYearList=a||[],a.length>1&&!l.searchForm.gradeYear&&(l.searchForm.gradeYear=a[1].id)}catch{}})(),await(async()=>{try{const{data:e}=await ie(),a=e||[];a.forEach((e=>{e.name=e.name+"级"})),a.unshift({id:"",name:"全部学级"}),l.popSelectLevelList=a||[],a.length>0&&!l.searchForm.gradeLevel&&(l.searchForm.gradeLevel=a[0].id)}catch{}})(),await S(),l.loading=!1})),()=>d("div",{class:U.listWrap},[d("div",{class:U.searchList},[d(u,{"label-placement":"left",inline:!0,ref:i},{default:()=>[d(o,null,{default:()=>[d(B,c({placeholder:"请输入班级名称"},{class:U.searchInput,searchWord:l.searchForm.keyword,onChangeValue:e=>l.searchForm.keyword=e}),null)]}),d(o,null,{default:()=>[d(V,c({options:l.popSelectYearList,placeholder:"选择学年",clearable:!1,inline:!0,labelField:"name",valueField:"id"},{value:l.searchForm.gradeYear,"onUpdate:value":e=>l.searchForm.gradeYear=e}),null)]}),d(o,null,{default:()=>[d(V,c({options:l.popSelectLevelList,placeholder:"选择学级",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:l.searchForm.gradeLevel,"onUpdate:value":e=>l.searchForm.gradeLevel=e}),null)]}),d(o,null,{default:()=>[d(V,c({options:l.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:l.searchForm.currentGradeNum,"onUpdate:value":e=>l.searchForm.currentGradeNum=e}),null)]}),d(o,null,{default:()=>[d(V,c({options:Z,placeholder:"选择班级",clearable:!0,inline:!0},{value:l.searchForm.currentClass,"onUpdate:value":e=>l.searchForm.currentClass=e}),null)]}),d(o,null,{default:()=>[d(K,{to:"body",placeholder:"选择乐器",options:[{value:"",label:"全部乐器"},...e.getSubjectList],childrenField:"instruments",checkStrategy:"child",expandTrigger:"hover",showPath:!1,value:l.searchForm.instrumentId,"onUpdate:value":[e=>l.searchForm.instrumentId=e,(e,a,l)=>{console.log(e,a,l)}]},null)]}),d(o,null,{default:()=>[d(p,{justify:"end"},{default:()=>[d(g,{type:"primary",class:"searchBtn",onClick:f},{default:()=>[v("搜索")]}),d(g,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[v("重置")]})]})]})]})]),d(g,{class:U.addBtn,type:"primary",onClick:()=>l.showaddClass=!0},{default:()=>[v("创建班级")],icon:()=>d(R,null,[d(b,{class:U.addBtnIcon,previewDisabled:!0,src:_},null)])}),d("div",{class:U.tableWrap},[d(G,{class:U.classTable,loading:l.loading,columns:[{title:"班级名称",key:"name"},{title:"学年",key:"gradeYear"},{title:"学级",key:"gradeLevel",render:e=>e.gradeLevel?`${e.gradeLevel}级`:""},{title:"班级乐器",key:"instrumentName"},{title:"学生人数",key:"preStudentNum"},{title:"上次学习",key:"lastStudy",width:"20%",render:e=>e.lastStudy?d(me,{maxWidth:300,showContentWidth:300,content:e.lastStudy},null):"--"},{title:"操作",key:"id",render:(e,t)=>d("div",null,[d(p,null,{default:()=>[0==t?d("div",{id:"class-0"},[d(g,{type:"primary",text:!0,onClick:()=>{m.push({path:"/classDetail",query:{name:e.name,id:e.id,gradeYear:e.gradeYear,upgradeFlag:e.upgradeFlag?1:0}})}},{default:()=>[v("详情")]})]):d(g,{type:"primary",text:!0,onClick:()=>{m.push({path:"/classDetail",query:{name:e.name,id:e.id,gradeYear:e.gradeYear,upgradeFlag:e.upgradeFlag?1:0}})}},{default:()=>[v("详情")]}),d(g,{type:"primary",disabled:!e.upgradeFlag||e.instrumentId,text:!0,onClick:()=>E(e)},{default:()=>[v("修改乐器")]}),d(g,0==t?c({type:"primary",disabled:!e.upgradeFlag},{id:"class-1"},{text:!0,onClick:()=>{k(e)}}):{type:"primary",disabled:!e.upgradeFlag,text:!0,onClick:()=>{k(e)}},{default:()=>[v("学生调整")]}),d(g,0==t?c({id:"class-2"},{disabled:!e.upgradeFlag,type:"primary",text:!0,onClick:()=>A(e)}):{disabled:!e.upgradeFlag,type:"primary",text:!0,onClick:()=>A(e)},{default:()=>[v("开始上课")]}),e.preStudentNum>0?null:d(g,{type:"error",color:"#EA4132",textColor:"#EA4132",text:!0,onClick:()=>{l.removeVisiable=!0,l.removeRow=e}},{default:()=>[v("删除")]}),e.imGroupId?null:d(g,{type:"primary",disabled:!e.upgradeFlag,text:!0,onClick:()=>{W(e)}},{default:()=>[v("创建群聊")]}),d(g,{type:"primary",disabled:!e.upgradeFlag,text:!0,onClick:()=>{const{schoolInfos:t}=a.getUserInfo,s=t.length>0?t[0].id:null;s&&(l.addStudentVisible=!0,l.activeRow={id:s,classId:e.id,currentGradeNum:e.currentGradeNum,currentClass:e.currentClass,gradeYear:e.gradeYear})}},{default:()=>[v("邀请学生")]})]})])}],data:l.tableList},{empty:()=>d(le,null,null)}),d(T,{page:l.pagination.page,"onUpdate:page":e=>l.pagination.page=e,pageSize:l.pagination.rows,"onUpdate:pageSize":e=>l.pagination.rows=e,pageTotal:l.pagination.pageTotal,"onUpdate:pageTotal":e=>l.pagination.pageTotal=e,onList:S,sync:!0},null)]),d(N,{show:l.studentVisible,"onUpdate:show":e=>l.studentVisible=e,preset:"card",class:["modalTitle background",U.studentVisible],title:"学生调整"},{default:()=>[d(ge,{activeRow:l.activeRow,onClose:()=>l.studentVisible=!1,onGetList:()=>S()},null)]}),d(N,{show:l.showaddClass,"onUpdate:show":e=>l.showaddClass=e,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"创建班级"},{default:()=>[d(ce,{gradeYearList:l.popSelectYearList,gradeNumList:l.gradeNumList,classArray:Z,onGetList:()=>S(),onClose:()=>l.showaddClass=!1},null)]}),d(N,{show:l.showResetClass,"onUpdate:show":e=>l.showResetClass=e,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[d(ye,{activeRow:l.activeRow,onGetList:()=>S(),onClose:()=>l.showResetClass=!1},null)]}),d(N,{show:l.showSubjectClass,"onUpdate:show":e=>l.showSubjectClass=e,style:{width:"500px"},preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[l.showSubjectClass?d(se,{activeRow:l.activeRow,onGetList:()=>S(),onConfirm:e=>{m.push({path:"/prepare-lessons",query:{...e}})},onClose:()=>l.showSubjectClass=!1},null):null]}),d(te,{show:l.previewModal,"onUpdate:show":e=>l.previewModal=e,type:"attend",params:l.previewParams},null),d(N,{show:l.removeVisiable,"onUpdate:show":e=>l.removeVisiable=e,preset:"card",class:["modalTitle",U.removeVisiable],title:"删除班级"},{default:()=>[d("div",{class:U.studentRemove},[d("p",null,[v("确定要删除班级么?"),d("span",null,[v("删除班级信息将会清空")]),v("。")]),d(p,{class:U.btnGroup,justify:"center"},{default:()=>[d(g,{round:!0,type:"primary",onClick:x},{default:()=>[v("确定")]}),d(g,{round:!0,onClick:()=>l.removeVisiable=!1},{default:()=>[v("取消")]})]})])]}),d(N,{show:l.groupVisiable,"onUpdate:show":e=>l.groupVisiable=e,preset:"card",class:["modalTitle",U.removeVisiable],title:"创建群聊"},{default:()=>[d("div",{class:U.studentRemove},[d("p",{style:{textAlign:"center"}},[v("是否创建班级群聊")]),d(p,{class:U.btnGroup,justify:"center"},{default:()=>[d(g,{round:!0,type:"primary",onClick:O,loading:l.groupBtnLoading,disabled:l.groupBtnLoading},{default:()=>[v("确定")]}),d(g,{round:!0,onClick:()=>l.groupVisiable=!1},{default:()=>[v("取消")]})]})])]}),w.value?d(ve,null,null):null,l.addStudentVisible?j(d("div",{"onUpdate:show":e=>l.addStudentVisible=e,class:["n-modal-mask",U.popBox]},[d(ue,{activeRow:l.activeRow,onClose:()=>{l.addStudentVisible=!1}},null)]),[[L,l.addStudentVisible,"show"]]):null])}}))}}}));