index-legacy-d5d3ae31-1714059328110.js 25 KB

1
  1. System.register(["./index-legacy-fd1357e4-1714059328110.js","./index.module-legacy-990676cd-1714059328110.js","./index-legacy-dd2c1417-1714059328110.js","./index-legacy-c8764377-1714059328110.js","./index-legacy-99c02c82-1714059328110.js","./api-legacy-f6218cd8-1714059328110.js","./api-legacy-6c96a2f5-1714059328110.js","./Scrollbar-legacy-0cf474e1-1714059328110.js","./contants-legacy-e668f42e-1714059328110.js","./add-legacy-e7111c9d-1714059328110.js","./api-legacy-c42ced87-1714059328110.js","./index-legacy-b4d5a763-1714059328110.js","./index-legacy-41ace381-1714059328110.js","./Cascader-legacy-de1a898f-1714059328110.js","./updateSubject-legacy-b5d9d989-1714059328110.js","./api-legacy-52b0ef47-1714059328110.js","./use-async-legacy-f47f944a-1714059328110.js","./addStudentModel-legacy-51428f18-1714059328110.js","./catchData-legacy-fd3082a5-1714059328110.js","./index-legacy-e43438c9-1714059328110.js","./urlUtils-legacy-cfb03d91-1714059328110.js","./index-legacy-0e714cb3-1714059328110.js","./Slider-legacy-a757fbf0-1714059328110.js","./index-legacy-7d0651a6-1714059328110.js","./icon_default-legacy-fa9bb009-1714059328110.js","./icon-plus-t-legacy-9d0f221a-1714059328110.js","./api-legacy-b23128e8-1714059328110.js","./icon-pan-legacy-9492b61b-1714059328110.js","./ding-legacy-f3656c17-1714059328110.js","./state-legacy-310ac631-1714059328110.js","./searchArray-legacy-41b7429d-1714059328110.js","./index-legacy-9f2b3d84-1714059328110.js","./api-legacy-b235cb4f-1714059328110.js","./icon-collect-active-legacy-b7c75e66-1714059328110.js","./index-legacy-599ad2b0-1714059328110.js","./index-legacy-57b9155a-1714059328110.js","./index-legacy-a7e952ea-1714059328110.js","./index-legacy-4afc492d-1714059328110.js","./teacherIcon-legacy-3eeb62c3-1714059328110.js","./index.module-legacy-7efba815-1714059328110.js","./html2canvas.esm-legacy-07b87fa1-1714059328110.js"],(function(e,a){"use strict";var l,t,s,n,i,r,u,d,o,c,p,g,v,h,m,y,f,w,b,C,x,j,S,k,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,ue,de,oe;return{setters:[e=>{l=e.d,t=e.e,s=e.b,n=e.r,i=e.y,r=e.p,u=e.f,d=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.$,j=e.A,S=e.R,k=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.g,Q=e.c},e=>{Z=e.a},e=>{_=e.g,H=e.s,X=e.a,ee=e.b},e=>{ae=e.T},e=>{le=e.P},e=>{te=e.N},e=>{se=e.U},e=>{ne=e.g,ie=e.b},e=>{re=e.i,ue=e.s},e=>{de=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,subjectId:null}),f=n([]),w=n([]);return i((()=>[y.gradeYear,y.currentGradeNum,y.currentClass]),(()=>{y.subjectId=null,(async()=>{try{const{data:e}=await W({gradeYear:y.gradeYear,currentGradeNum:y.currentGradeNum,currentClass:y.currentClass}),a=e||[];w.value=a.map((e=>({label:e.name,value:e.id})))}catch{}})()})),r((()=>{(async()=>{try{const{data:e}=await J({}),a=[{label:e+1,value:e+1},{label:e,value:e}];f.value=a}catch{}})()})),()=>u("div",{class:[U.addClass]},[u(d,{"label-placement":"left",model:y,ref:m},{default:()=>[u(o,{path:"gradeYear",rule:[{required:!0,message:"请选择学年"}]},{default:()=>[u(V,c({style:{width:"400px"},options:f.value,placeholder:"选择学年",clearable:!0},{value:y.gradeYear,"onUpdate:value":e=>y.gradeYear=e}),null)]}),u(o,{path:"currentGradeNum",rule:[{required:!0,message:"请选择年级"}]},{default:()=>[u(V,c({style:{width:"400px"},options:e.gradeNumList,placeholder:"选择年级",clearable:!0},{value:y.currentGradeNum,"onUpdate:value":e=>y.currentGradeNum=e}),null)]}),u(o,{path:"currentClass",rule:[{required:!0,message:"请选择班级"}]},{default:()=>[u(V,c({style:{width:"400px"},options:e.classArray,placeholder:"选择班级",clearable:!0},{value:y.currentClass,"onUpdate:value":e=>y.currentClass=e}),null)]}),u(o,{path:"subjectId",rule:[{required:!0,message:"请选择声部"}]},{default:()=>[u(V,c({style:{width:"400px"},options:w.value,placeholder:"选择声部",clearable:!0},{value:y.subjectId,"onUpdate:value":e=>y.subjectId=e}),null)]})]}),u(p,{class:U.btnGroup,justify:"center"},{default:()=>[u(g,{round:!0,onClick:()=>a("close")},{default:()=>[v("取消")]}),u(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 d=n([]);console.log(e.activeRow,"activeRow");const o=t({gradeYear:null,name:"",id:""}),C=n([]),x=n([]),j=n(null),S=n([]),k=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(j.value||""))))),Y=h((()=>(k.value||[]).filter((e=>-1!=e.label.indexOf(L.value||"")))));return r((async()=>{(async()=>{try{const a=await P({page:1,rows:9999,upgradeFlag:!0});d.value=a.data.rows.map((a=>({label:a.name,key:a.id,gradeYear:a.gradeYear,disabled:a.id==e.activeRow.id}))),d.value[0].disabled?(o.name=d.value[1].label,o.id=d.value[1].key,o.gradeYear=d.value[1].gradeYear):(o.name=d.value[0].label,o.id=d.value[0].key,o.gradeYear=d.value[0].gradeYear);const l=await A(o.id);k.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 u("div",{class:[U.container,U.resetStudentWrap]},[u("div",{class:U.studentTransfer},[u("div",{class:U.studentTransferList},[u("div",{class:U.studentLeft},[u("div",{class:U.listTop},[u("p",null,[e.activeRow.name]),u("span",null,[v("(当前班级)")])]),u("div",{class:U.listCore},[u(m,{class:U.chioseCheckAllBox},{default:()=>[u(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)]}),u(m,null,{default:()=>[u(B,c({placeholder:"请输入学生姓名"},{class:U.searchInput,searchWord:j.value,onChangeValue:e=>j.value=e}),null)]}),u(K,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[u(f,{value:C.value,"onUpdate:value":e=>C.value=e},pe(t=F.value.map((e=>u(m,{class:U.chioseCheckBox},{default:()=>[u(y,{value:e.value,label:e.label},null)]}))))?t:{default:()=>[t]})]})]),u("div",{class:[U.bottomLeft,U.bottom]},[u("div",{class:U.bottomWrap},[v("共"),x.value.length,v("名学生")])])]),u("div",{class:U.chioseBox},[u("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=>{k.value.push(e)})),C.value=[]})()},null),u("div",{class:U.chioseBtn,onClick:()=>(()=>{const a=k.value.filter((e=>-1!=S.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)}k.value=k.value.filter((e=>!a.some((a=>a.value===e.value)))),a.forEach((e=>{x.value.push(e)})),S.value=[],console.log(R.value," submitList.value===>")})()},null)]),u("div",{class:U.studentRight},[u("div",{class:U.listTop},[o.id?u(w,{key:"111",value:o.id,"onUpdate:value":e=>o.id=e,options:d.value,onSelect:e=>{(async e=>{d.value.forEach((a=>{a.key==e&&(o.name=a.label,o.gradeYear=a.gradeYear,o.id=a.key)}));const a=await A(e);k.value=a.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id}))),console.log(R.value,"submitList.value"),k.value=k.value.filter((e=>!R.value.some((a=>a.value===e.value)))),R.value.forEach((e=>{e.toClassId==o.id&&(console.log(e.toClassId,e),k.value.push({label:e.label,value:e.value}))}))})(e)},scrollable:!0},{default:()=>[u("div",{class:U.showGradeSection},[u("div",null,[o.name,o.gradeYear&&u("span",null,[v("("),o.gradeYear,v("学年)")])]),u(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]),u("div",{class:U.listCore},[u(m,{class:U.chioseCheckAllBox},{default:()=>[u(y,{onUpdateChecked:e=>{Y.value.length===S.value.length?S.value=[]:S.value=Y.value.map((e=>e.value))},checked:Y.value.length===S.value.length,indeterminate:S.value.length>0&&Y.value.length!==S.value.length,label:"全选"},null)]}),u(m,null,{default:()=>[u(B,c({placeholder:"请输入学生姓名"},{class:U.searchInput,searchWord:L.value,onChangeValue:e=>L.value=e}),null)]}),u(K,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[u(f,{value:S.value,"onUpdate:value":e=>S.value=e},pe(s=Y.value.map((e=>u(m,{class:U.chioseCheckBox},{default:()=>[u(y,{value:e.value,label:e.label},null)]}))))?s:{default:()=>[s]})]})]),u("div",{class:[U.bottomRight,U.bottom]},[u("div",{class:U.bottomWrap},[v("共"),k.value.length,v("名学生")])])])])]),u(p,{class:U.btnGroup,justify:"center"},{default:()=>[u(g,{round:!0,onClick:()=>a("close")},{default:()=>[v("取消")]}),u(g,{round:!0,loading:i.uploading,type:"primary",onClick:()=>{(async()=>{if(d.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:_("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:_("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:_("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 X({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 d=()=>{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 ee({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(a){console.log(a)}l.step=0,d(),s.value=!0}catch{}};r((()=>{d(),window.addEventListener("resize",c),j.on("teacher-guideInfo",(e=>o(e)))}));const c=()=>{d()};S((()=>{window.removeEventListener("resize",c),j.off("teacher-guideInfo",o)}));const p=()=>{l.step>=4?g():(l.step=l.step+1,d())},g=async()=>{i.value?i.value.classGuide=!0:i.value={classGuide:!0};try{await ee({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(e){console.log(e)}s.value=!1};return()=>u(R,null,[s.value?k(u("div",{"onUpdate:show":e=>s.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[u("div",{class:H.content,onClick:()=>p()},[u("div",{class:H.backBtn,onClick:e=>{e.stopPropagation(),g()}},[v("跳过")]),u("div",{class:H.box,style:{...l.box,...l.steps[l.step].boxStyle},id:`modeType-${l.step}`},[l.steps.map(((e,a)=>u("div",{onClick:e=>e.stopPropagation(),class:H.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}`}},[u("img",{class:H.img,style:e.imgStyle,src:e.img},null),u("div",{class:H.btns,style:e.btnsStyle},[l.step+1==l.steps.length?u(R,null,[u("div",{class:[H.endBtn],onClick:()=>g()},[v("完成")]),u("div",{class:H.nextBtn,onClick:()=>{l.step=0,d()}},[v("再看一遍")])]):u("div",{class:H.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=>()=>u(R,null,[u(A,{style:{maxWidth:e.maxWidth+"px"},trigger:e.trigger,placement:e.placement,showArrow:e.showArrow,delay:500},{trigger:()=>u("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()=>u("div",{class:[U.addClass]},[u(d,{"label-placement":"left",model:m,ref:c},{default:()=>[u(o,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[u(te,{placeholder:"请选择乐器",value:m.instrumentId,"onUpdate:value":e=>m.instrumentId=e,options:h.value,checkStrategy:"child",showPath:!0,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),u(p,{class:U.btnGroup,justify:"center"},{default:()=>[u(g,{round:!0,onClick:()=>a("close")},{default:()=>[v("取消")]}),u(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,j(),ue({current:l.searchForm,saveKey:y.path})},w=n(!1);l.gradeNumList=$();const C=()=>{l.searchForm={keyword:null,currentClass:"",currentGradeNum:"",instrumentId:"",gradeYear:"",gradeLevel:""},l.popSelectYearList.length>1&&(l.searchForm.gradeYear=l.popSelectYearList[1].id),j(),ue({current:l.searchForm,saveKey:y.path})},x=async()=>{try{await D({ids:l.removeRow.id}),j(),h.success("删除成功"),l.removeVisiable=!1}catch(e){console.log(e)}},j=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)}},S=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 j()}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 j(),l.loading=!1})),()=>u("div",{class:U.listWrap},[u("div",{class:U.searchList},[u(d,{"label-placement":"left",inline:!0,ref:i},{default:()=>[u(o,null,{default:()=>[u(B,c({placeholder:"请输入班级名称"},{class:U.searchInput,searchWord:l.searchForm.keyword,onChangeValue:e=>l.searchForm.keyword=e}),null)]}),u(o,null,{default:()=>[u(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)]}),u(o,null,{default:()=>[u(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)]}),u(o,null,{default:()=>[u(V,c({options:l.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:l.searchForm.currentGradeNum,"onUpdate:value":e=>l.searchForm.currentGradeNum=e}),null)]}),u(o,null,{default:()=>[u(V,c({options:Q,placeholder:"选择班级",clearable:!0,inline:!0},{value:l.searchForm.currentClass,"onUpdate:value":e=>l.searchForm.currentClass=e}),null)]}),u(o,null,{default:()=>[u(te,{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)]}),u(o,null,{default:()=>[u(p,{justify:"end"},{default:()=>[u(g,{type:"primary",class:"searchBtn",onClick:f},{default:()=>[v("搜索")]}),u(g,{type:"primary",ghost:!0,class:"resetBtn",onClick:C},{default:()=>[v("重置")]})]})]})]})]),u(g,{class:U.addBtn,type:"primary",onClick:()=>l.showaddClass=!0},{default:()=>[v("创建班级")],icon:()=>u(R,null,[u(b,{class:U.addBtnIcon,previewDisabled:!0,src:Z},null)])}),u("div",{class:U.tableWrap},[u(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?u(me,{maxWidth:300,showContentWidth:300,content:e.lastStudy},null):"--"},{title:"操作",key:"id",render:(e,t)=>u("div",null,[u(p,null,{default:()=>[0==t?u("div",{id:"class-0"},[u(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("详情")]})]):u(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("详情")]}),u(g,{type:"primary",disabled:!e.upgradeFlag||e.instrumentId,text:!0,onClick:()=>E(e)},{default:()=>[v("修改乐器")]}),u(g,0==t?c({type:"primary",disabled:!e.upgradeFlag},{id:"class-1"},{text:!0,onClick:()=>{S(e)}}):{type:"primary",disabled:!e.upgradeFlag,text:!0,onClick:()=>{S(e)}},{default:()=>[v("学生调整")]}),u(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:u(g,{type:"error",color:"#EA4132",textColor:"#EA4132",text:!0,onClick:()=>{l.removeVisiable=!0,l.removeRow=e}},{default:()=>[v("删除")]}),e.imGroupId?null:u(g,{type:"primary",disabled:!e.upgradeFlag,text:!0,onClick:()=>{W(e)}},{default:()=>[v("创建群聊")]}),u(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:()=>u(ae,null,null)}),u(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:j,sync:!0},null)]),u(N,{show:l.studentVisible,"onUpdate:show":e=>l.studentVisible=e,preset:"card",class:["modalTitle background",U.studentVisible],title:"学生调整"},{default:()=>[u(ge,{activeRow:l.activeRow,onClose:()=>l.studentVisible=!1,onGetList:()=>j()},null)]}),u(N,{show:l.showaddClass,"onUpdate:show":e=>l.showaddClass=e,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"创建班级"},{default:()=>[u(ce,{gradeYearList:l.popSelectYearList,gradeNumList:l.gradeNumList,classArray:Q,onGetList:()=>j(),onClose:()=>l.showaddClass=!1},null)]}),u(N,{show:l.showResetClass,"onUpdate:show":e=>l.showResetClass=e,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"修改声部"},{default:()=>[u(ye,{activeRow:l.activeRow,onGetList:()=>j(),onClose:()=>l.showResetClass=!1},null)]}),u(N,{show:l.showSubjectClass,"onUpdate:show":e=>l.showSubjectClass=e,style:{width:"500px"},preset:"card",class:["modalTitle background"],title:"修改声部"},{default:()=>[l.showSubjectClass?u(se,{activeRow:l.activeRow,onGetList:()=>j(),onConfirm:e=>{m.push({path:"/prepare-lessons",query:{...e}})},onClose:()=>l.showSubjectClass=!1},null):null]}),u(le,{show:l.previewModal,"onUpdate:show":e=>l.previewModal=e,type:"attend",params:l.previewParams},null),u(N,{show:l.removeVisiable,"onUpdate:show":e=>l.removeVisiable=e,preset:"card",class:["modalTitle",U.removeVisiable],title:"删除班级"},{default:()=>[u("div",{class:U.studentRemove},[u("p",null,[v("确定要删除班级么?"),u("span",null,[v("删除班级信息将会清空")]),v("。")]),u(p,{class:U.btnGroup,justify:"center"},{default:()=>[u(g,{round:!0,type:"primary",onClick:x},{default:()=>[v("确定")]}),u(g,{round:!0,onClick:()=>l.removeVisiable=!1},{default:()=>[v("取消")]})]})])]}),u(N,{show:l.groupVisiable,"onUpdate:show":e=>l.groupVisiable=e,preset:"card",class:["modalTitle",U.removeVisiable],title:"创建群聊"},{default:()=>[u("div",{class:U.studentRemove},[u("p",{style:{textAlign:"center"}},[v("是否创建班级群聊")]),u(p,{class:U.btnGroup,justify:"center"},{default:()=>[u(g,{round:!0,type:"primary",onClick:O,loading:l.groupBtnLoading,disabled:l.groupBtnLoading},{default:()=>[v("确定")]}),u(g,{round:!0,onClick:()=>l.groupVisiable=!1},{default:()=>[v("取消")]})]})])]}),w.value?u(ve,null,null):null,l.addStudentVisible?k(u("div",{"onUpdate:show":e=>l.addStudentVisible=e,class:["n-modal-mask",U.popBox]},[u(de,{activeRow:l.activeRow,onClose:()=>{l.addStudentVisible=!1}},null)]),[[L,l.addStudentVisible,"show"]]):null])}}))}}}));