System.register(["./index.module-legacy-7aa015bf.js","./index-legacy-f9178d42.js","./index-legacy-b4a76d7a.js","./index-legacy-a6db5097.js","./api-legacy-65181897.js","./index-legacy-8f9c1531.js","./Scrollbar-legacy-e9f64ead.js","./api-legacy-93283718.js","./index-legacy-6e66f0c9.js","./contants-legacy-22486057.js","./add-legacy-e7111c9d.js","./index-legacy-0dc19f0e.js","./searchs-legacy-3b019a5a.js"],(function(e,l){"use strict";var a,t,s,i,n,o,u,c,d,r,p,g,v,h,m,y,f,b,w,x,C,k,A,L,R,I,S,j,B,G,U,N,T,E,V,F,O,P,W,q,D,M,Y,J,K,$,Z,z,H,Q;return{setters:[e=>{a=e.s},e=>{t=e.S},e=>{s=e.C},e=>{i=e.P},e=>{n=e.b,o=e.c,u=e.g,c=e.d,d=e.a,r=e.e},e=>{p=e.d,g=e.e,v=e.b,h=e.r,m=e.f,y=e.N,f=e.g,b=e.x,w=e.X,x=e.j,C=e.k,k=e.R,A=e.q,L=e.cl,R=e.l,I=e.cm,S=e.cn,j=e.o,B=e.a$,G=e.u,U=e.W,N=e.Z,T=e._,E=e.$,V=e.F,F=e.cc,O=e.ck,P=e.B},e=>{W=e.N},e=>{q=e.u,D=e.q,M=e.c,Y=e.l,J=e.b},e=>{K=e.u},e=>{$=e.g,Z=e.c},e=>{z=e.a},e=>{H=e.g,Q=e.s},null],execute:function(){const l=p({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(e,{emit:l}){const t=g({uploading:!1}),i=v(),o=h(),u=g({currentGradeNum:null,currentClass:null});return()=>m("div",{class:[a.addClass]},[m(y,{"label-placement":"left",model:u,ref:o},{default:()=>[m(f,{path:"currentGradeNum",rule:[{required:!0,message:"请选择年级"}]},{default:()=>[m(s,b({style:{width:"400px"},options:e.gradeNumList,placeholder:"选择年级",clearable:!0},{value:u.currentGradeNum,"onUpdate:value":e=>u.currentGradeNum=e}),null)]}),m(f,{path:"currentClass",rule:[{required:!0,message:"请选择班级"}]},{default:()=>[m(s,b({style:{width:"400px"},options:e.classArray,placeholder:"选择班级",clearable:!0},{value:u.currentClass,"onUpdate:value":e=>u.currentClass=e}),null)]})]}),m(w,{class:a.btnGroup,justify:"center"},{default:()=>[m(x,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),m(x,{round:!0,loading:t.uploading,onClick:()=>{o.value.validate((async e=>{if(console.log(u),console.log(e),!e)try{await n({...u}),i.success("新增成功"),l("close"),l("getList")}catch(a){console.log(a)}}))},type:"primary"},{default:()=>[C("保存")]})]})])}});function X(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!B(e)}const _=p({props:{activeRow:{type:Object,default:()=>({id:""})}},name:"RestStudentBox",emits:["close","getList"],setup(e,{emit:l}){const s=v(),i=g({uploading:!1});h([]),h([]),h();const n=h([]);console.log(e.activeRow,"activeRow");const d=g({name:"",id:""}),r=h([]),p=h([]),y=h(null),f=h([]),B=h([]),G=h(null),U=h([]),N=async e=>await u({page:1,rows:999,classGroupId:e}),T=k((()=>(p.value||[]).filter((e=>-1!=e.label.indexOf(y.value||""))))),E=k((()=>(B.value||[]).filter((e=>-1!=e.label.indexOf(G.value||"")))));return A((async()=>{(async()=>{try{const l=await o({page:1,rows:9999});n.value=l.data.rows.map((l=>({label:l.name,key:l.id,disabled:l.id==e.activeRow.id}))),n.value[0].disabled?(d.name=n.value[1].label,d.id=n.value[1].key):(d.name=n.value[0].label,d.id=n.value[0].key);const a=await N(d.id);B.value=a.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id})))}catch(l){console.log(l)}})();const l=await N(e.activeRow.id);p.value=l.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id})))})),()=>{let o,u;return m("div",{class:[a.container,a.resetStudentWrap]},[m("div",{class:a.studentTransfer},[m("div",{class:a.studentTransferList},[m("div",{class:a.studentLeft},[m("div",{class:a.listTop},[m("p",null,[e.activeRow.name]),m("span",null,[C("(当前班级)")])]),m("div",{class:a.listCore},[m(L,{class:a.chioseCheckAllBox},{default:()=>[m(R,{onUpdateChecked:e=>{T.value.length===r.value.length?r.value=[]:r.value=T.value.map((e=>e.value))},checked:T.value.length===r.value.length,indeterminate:r.value.length>0&&T.value.length!==r.value.length,label:"全选"},null)]}),m(L,null,{default:()=>[m(t,b({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:y.value,onChangeValue:e=>y.value=e}),null)]}),m(W,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[m(I,{value:r.value,"onUpdate:value":e=>r.value=e},X(o=T.value.map((e=>m(L,{class:a.chioseCheckBox},{default:()=>[m(R,{value:e.value,label:e.label},null)]}))))?o:{default:()=>[o]})]})]),m("div",{class:[a.bottomLeft,a.bottom]},[m("div",{class:a.bottomWrap},[C("共"),p.value.length,C("名学生")])])]),m("div",{class:a.chioseBox},[m("div",{class:[a.chioseBtn,a.chioseBtnRight],onClick:()=>(()=>{const e=p.value.filter((e=>-1!=r.value.indexOf(e.value)));if(e.length>0){const l=e.map((e=>({...e,studentId:e.value,toClassId:d.id})));U.value=U.value.filter((e=>!l.some((l=>l.value===e.value)))),U.value=U.value.concat(l)}p.value=p.value.filter((l=>!e.some((e=>e.value===l.value)))),e.forEach((e=>{B.value.push(e)})),r.value=[]})()},null),m("div",{class:a.chioseBtn,onClick:()=>(()=>{const l=B.value.filter((e=>-1!=f.value.indexOf(e.value)));if(l.length>0){const a=l.map((l=>({...l,studentId:l.value,toClassId:e.activeRow.id})));U.value=U.value.filter((e=>!a.some((l=>l.value===e.value)))),U.value=U.value.concat(a)}B.value=B.value.filter((e=>!l.some((l=>l.value===e.value)))),l.forEach((e=>{p.value.push(e)})),f.value=[],console.log(U.value," submitList.value===>")})()},null)]),m("div",{class:a.studentRight},[m("div",{class:a.listTop},[d.id?m(S,{key:"111",value:d.id,"onUpdate:value":e=>d.id=e,options:n.value,onSelect:e=>{(async e=>{n.value.forEach((l=>{l.key==e&&(d.name=l.label,d.id=l.key)}));const l=await N(e);B.value=l.data.rows.map((e=>({label:e.nickname+"("+e.id+")",value:e.id}))),console.log(U.value,"submitList.value"),B.value=B.value.filter((e=>!U.value.some((l=>l.value===e.value)))),U.value.forEach((e=>{e.toClassId==d.id&&(console.log(e.toClassId,e),B.value.push({label:e.label,value:e.value}))}))})(e)},scrollable:!0},{default:()=>[m("div",null,[d.name,m(j,{class:a.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]),m("div",{class:a.listCore},[m(L,{class:a.chioseCheckAllBox},{default:()=>[m(R,{onUpdateChecked:e=>{E.value.length===f.value.length?f.value=[]:f.value=E.value.map((e=>e.value))},checked:E.value.length===f.value.length,indeterminate:f.value.length>0&&E.value.length!==f.value.length,label:"全选"},null)]}),m(L,null,{default:()=>[m(t,b({placeholder:"请输入学生姓名"},{class:a.searchInput,searchWord:G.value,onChangeValue:e=>G.value=e}),null)]}),m(W,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[m(I,{value:f.value,"onUpdate:value":e=>f.value=e},X(u=E.value.map((e=>m(L,{class:a.chioseCheckBox},{default:()=>[m(R,{value:e.value,label:e.label},null)]}))))?u:{default:()=>[u]})]})]),m("div",{class:[a.bottomRight,a.bottom]},[m("div",{class:a.bottomWrap},[C("共"),B.value.length,C("名学生")])])])])]),m(w,{class:a.btnGroup,justify:"center"},{default:()=>[m(x,{round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),m(x,{round:!0,loading:i.uploading,type:"primary",onClick:()=>{(async()=>{if(n.value.length<2)s.error("当前只有一个班级,无法调整");else if(U.value<1)l("close");else try{await c(U.value),l("close"),l("getList")}catch(e){console.log(e)}})()}},{default:()=>[C("保存")]})]})])}}}),ee=p({name:"train-update",emits:["close"],props:{activeRow:{type:Object,default:()=>({id:"",currentGradeNum:""})}},setup(e,{emit:l}){const t=g({bookVersionId:null,classGroupId:null,category:null,chapter:null,subjectId:null,musicTagList:[],loading:!1,list:[],chapterList:[],unit:null,unitList:[],subjectList:[]}),s=G(),i=q(),n=v(),o=h(),u=K((()=>c()),500),c=async()=>{if(t.category=null,t.unit=null,t.category=null,t.chapter=null,t.loading=!0,t.bookVersionId)try{const{data:e}=await Y({page:1,rows:99,type:"COURSEWARE",enableFlag:1,bookVersionId:t.bookVersionId});t.list=e.rows.map((e=>({label:e.name,value:e.id})))}catch{}else t.list=[];t.loading=!1};return A((async()=>{await i.getSubjects(),t.subjectList=i.getSubjectList.map((e=>({label:e.name,value:e.id}))),(async()=>{t.unit=null,t.chapter=null;try{const{data:e}=await J({page:1,rows:99,type:"COURSEWARE"});(e.rows||[]).forEach((e=>{t.musicTagList.push({id:e.id,name:e.name})}))}catch{}})()})),()=>m("div",{class:a.trainUpdate},[m(y,{labelAlign:"left",labelPlacement:"left",ref:o,model:t},{default:()=>[m(f,{path:"bookVersionId",rule:[{required:!0,message:"选择教材版本"}]},{default:()=>[m(U,{placeholder:"选择教材版本",clearable:!0,options:[...t.musicTagList],labelField:"name",valueField:"id",value:t.bookVersionId,"onUpdate:value":[e=>t.bookVersionId=e,()=>u()]},null)]}),m(f,{path:"category",rule:[{required:!0,message:"请选择册别"}]},{default:()=>[m(U,b({options:[...t.list],placeholder:"选择册别",clearable:!0},{disabled:!t.bookVersionId,value:t.category,"onUpdate:value":[e=>t.category=e,()=>(async()=>{t.unit=null,t.chapter=null;try{if(t.category){const e=await d(t.category);t.unitList=e.data.lessonList.map((e=>({...e,label:e.name,value:e.id})))}else t.unitList=[]}catch(e){console.log(e)}})()]}),null)]}),m(f,{path:"unit",rule:[{required:!0,message:"请选择单元"}]},{default:()=>[m(U,b({disabled:!t.category},{options:[...t.unitList],placeholder:"选择单元",clearable:!0},{value:t.unit,"onUpdate:value":[e=>t.unit=e,()=>(()=>{if(t.chapter=null,t.unit){const e=t.unitList.find((e=>e.id===t.unit));t.chapterList=e.knowledgeList.map((e=>({...e,label:e.name,value:e.id}))),console.log("getchapterList",e)}else t.chapterList=[];console.log("getchapterList")})()]}),null)]}),m(f,{path:"chapter",rule:[{required:!0,message:"请选择章节"}]},{default:()=>[m(U,b({disabled:!t.unit},{options:[...t.chapterList],placeholder:"选择章节",clearable:!0},{value:t.chapter,"onUpdate:value":e=>t.chapter=e}),null)]}),m(f,{path:"subjectId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[m(U,b({options:[...t.subjectList],placeholder:"选择乐器",clearable:!0},{value:t.subjectId,"onUpdate:value":e=>t.subjectId=e}),null)]}),m(w,{class:a.updateBtnGroup},{default:()=>[m(x,{strong:!0,type:"default",round:!0,onClick:()=>l("close")},{default:()=>[C("取消")]}),m(x,{strong:!0,type:"primary",round:!0,onClick:()=>{o.value.validate((async a=>{if(a)return;const{data:i}=await D({coursewareDetailKnowledgeId:t.chapter,subjectId:t.subjectId,page:1,rows:99});if(console.log(e.activeRow.id,"props.activeRow.id"),await M({lessonCoursewareKnowledgeDetailId:t.chapter,classGroupId:e.activeRow.id}),i.rows&&i.rows.length>0){const{href:a}=s.resolve({path:"/attend-class",query:{type:"class",classGroupId:e.activeRow.id,subjectId:t.subjectId,detailId:t.chapter}});l("close"),window.open(a,+new Date+"")}else n.error("当前章节暂无课件,请重新选择")}))}},{default:()=>[C("确认")]})]})]})])}}),le=p({name:"coai-guide",emits:["close"],setup(e,{emit:l}){const a=g({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:H("class1.png"),handStyle:{top:"0.91rem"},imgStyle:{left:"-294px",width:"648px",height:"227px"},btnsStyle:{bottom:"30px",left:"-90px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("class2.png"),imgStyle:{top:"100%",left:"-283px",width:"515px",height:"227px"},btnsStyle:{bottom:"30px",left:N(-90)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("class3.png"),imgStyle:{width:"437px",height:"227px",left:"-282px"},btnsStyle:{bottom:"30px",left:"-130px"},eleRectPadding:{left:7,top:7,width:14,height:14}}],step:0}),t=h(!1),s=localStorage.getItem("teacher-guideInfo");s&&JSON.parse(s).classGuide?t.value=!1:t.value=!0;const i=()=>{const e=document.getElementById(`class-${a.step}`);if(e){const l=e.getBoundingClientRect(),t=a.steps[a.step].eleRectPadding?.left||0,s=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,n=a.steps[a.step].eleRectPadding?.height||0;a.box={left:l.x-t+"px",top:l.y-s+"px",width:l.width+i+"px",height:l.height+n+"px"},console.log(`coai-${a.step}`,a.box)}};A((()=>{i()}));const n=()=>{a.step>=4?o():(a.step=a.step+1,i())},o=()=>{let e=JSON.parse(localStorage.getItem("teacher-guideInfo")||"{}")||null;e?e.classGuide=!0:e={classGuide:!0},localStorage.setItem("teacher-guideInfo",JSON.stringify(e)),t.value=!1};return()=>m(V,null,[t.value?T(m("div",{"onUpdate:show":e=>t.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[m("div",{class:Q.content,onClick:()=>n()},[m("div",{class:Q.backBtn,onClick:e=>{e.stopPropagation(),o()}},[C("跳过")]),m("div",{class:Q.box,style:{...a.box,...a.steps[a.step].boxStyle},id:`modeType-${a.step}`},[a.steps.map(((e,l)=>m("div",{onClick:e=>e.stopPropagation(),class:Q.item,style:"bottom"==e.type?{display:l===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:l===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`${a.box?.height}`}},[m("img",{class:Q.img,style:e.imgStyle,src:e.img},null),m("div",{class:Q.btns,style:e.btnsStyle},[a.step+1==a.steps.length?m(V,null,[m("div",{class:[Q.endBtn],onClick:()=>o()},[C("完成")]),m("div",{class:Q.nextBtn,onClick:()=>{a.step=0,i()}},[C("再看一遍")])]):m("div",{class:Q.btn,onClick:()=>n()},[C("下一步 ("),a.step+1,C("/"),a.steps.length,C(")")])])])))])])]),[[E,t.value,"show"]]):null])}});e("default",p({name:"class-classList",setup(e,{emit:n}){const u=g({searchForm:{keyword:null,currentClass:null,currentGradeNum:null},orchestraType:null,courseTypeCode:null,loading:!1,pagination:{page:1,rows:10,pageTotal:6},gradeNumList:[],tableList:[],studentVisible:!1,activeRow:null,showaddClass:!1,goCourseVisiable:!1}),c=h(),d=F(),p=v(),k=G(),L=()=>{u.pagination.page=1,S(),console.log("search",u)},R=h(!1);u.gradeNumList=$();const I=()=>{u.searchForm={keyword:null,currentClass:null,currentGradeNum:null},S()},S=async()=>{u.loading=!0;try{const e=await o({...u.searchForm,...u.pagination});u.tableList=e.data.rows,u.pagination.pageTotal=e.data.total,u.loading=!1,setTimeout((()=>{u.tableList.length>0&&(R.value=!0)}),500)}catch(e){u.loading=!1,console.log(e)}console.log("getList")},B=()=>[{title:"班级名称",key:"name"},{title:"学生人数",key:"preStudentNum"},{title:"上次学习",key:"lastStudy",render:e=>m("p",null,[e.lastStudy?e.lastStudy:"--"])},{title:"操作",key:"id",render:(e,l)=>m("div",null,[m(w,null,{default:()=>[0==l?m("div",{id:"class-0"},[m(x,{type:"primary",text:!0,onClick:()=>{k.push({path:"/classDetail",query:{name:e.name,id:e.id}})}},{default:()=>[C("详情")]})]):m(x,{type:"primary",text:!0,onClick:()=>{k.push({path:"/classDetail",query:{name:e.name,id:e.id}})}},{default:()=>[C("详情")]}),m(x,0==l?b({type:"primary"},{id:"class-1"},{text:!0,onClick:()=>{U(e)}}):{type:"primary",text:!0,onClick:()=>{U(e)}},{default:()=>[C("学生调整")]}),m(x,0==l?b({id:"class-2"},{disabled:!(e.preStudentNum>0),type:"primary",text:!0,onClick:()=>N(e)}):{disabled:!(e.preStudentNum>0),type:"primary",text:!0,onClick:()=>N(e)},{default:()=>[C("开始上课")]}),e.preStudentNum>0?null:m("p",{style:{color:"#EA4132",cursor:"pointer"},onClick:()=>(async e=>{d.warning({title:"警告",content:`是否删除班级“${e.name}”?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{try{await r({ids:e.id}),S(),p.success("删除成功")}catch(l){console.log(l)}}})})(e)},[C("删除")])]})])}],U=e=>{u.activeRow=e,u.studentVisible=!0},N=e=>{u.activeRow=e,u.goCourseVisiable=!0};return A((()=>{S()})),()=>m("div",{class:a.listWrap},[m("div",{class:a.searchList},[m(y,{"label-placement":"left",inline:!0,ref:c},{default:()=>[m(f,null,{default:()=>[m(t,b({placeholder:"请输入班级名称"},{class:a.searchInput,searchWord:u.searchForm.keyword,onChangeValue:e=>u.searchForm.keyword=e}),null)]}),m(f,null,{default:()=>[m(s,b({options:u.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:u.searchForm.currentGradeNum,"onUpdate:value":e=>u.searchForm.currentGradeNum=e}),null)]}),m(f,null,{default:()=>[m(s,b({options:Z,placeholder:"选择班级",clearable:!0,inline:!0},{value:u.searchForm.currentClass,"onUpdate:value":e=>u.searchForm.currentClass=e}),null)]}),m(f,null,{default:()=>[m(w,{justify:"end"},{default:()=>[m(x,{type:"primary",class:"searchBtn",onClick:L},{default:()=>[C("搜索")]}),m(x,{type:"primary",ghost:!0,class:"resetBtn",onClick:I},{default:()=>[C("重置")]})]})]})]})]),m(x,{class:a.addBtn,type:"primary",onClick:()=>u.showaddClass=!0},{default:()=>[C("创建班级")],icon:()=>m(V,null,[m(j,{class:a.addBtnIcon,previewDisabled:!0,src:z},null)])}),m("div",{class:a.tableWrap},[m(O,{class:a.classTable,loading:u.loading,columns:B(),data:u.tableList},null),m(i,{page:u.pagination.page,"onUpdate:page":e=>u.pagination.page=e,pageSize:u.pagination.rows,"onUpdate:pageSize":e=>u.pagination.rows=e,pageTotal:u.pagination.pageTotal,"onUpdate:pageTotal":e=>u.pagination.pageTotal=e,onList:S,sync:!0,saveKey:"orchestraRegistration-key"},null)]),m(P,{show:u.studentVisible,"onUpdate:show":e=>u.studentVisible=e,style:{width:"707px"},preset:"card",class:["modalTitle background"],title:"学员调整"},{default:()=>[m(_,{activeRow:u.activeRow,onClose:()=>u.studentVisible=!1,onGetList:()=>S()},null)]}),m(P,{show:u.showaddClass,"onUpdate:show":e=>u.showaddClass=e,style:{width:"500px"},preset:"card",class:["modalTitle background"],title:"创建班级"},{default:()=>[m(l,{gradeNumList:u.gradeNumList,classArray:Z,onGetList:()=>S(),onClose:()=>u.showaddClass=!1},null)]}),m(P,{show:u.goCourseVisiable,"onUpdate:show":e=>u.goCourseVisiable=e,preset:"card",class:["modalTitle background",a.chioseModel],title:"选择课件"},{default:()=>[m(ee,{activeRow:u.activeRow,onClose:()=>u.goCourseVisiable=!1},null)]}),R.value?m(le,null,null):null])}}))}}}));