import{d as O,e as T,b as Z,r as y,A as ve,q as K,f as e,N as _,g as E,y as R,x as U,j as h,k as n,U as ae,aH as P,n as q,aA as te,aI as me,w as z,D as fe,$ as C,C as le,T as he,a0 as ie,a1 as de,F as J,c as ce,u as ye,a as be,aG as Ce,l as W,m as H}from"./index-efb66432-1734950731618.js";import{s as r}from"./index.module-f5d3eb8e-1734950731618.js";import{S as $}from"./index-7f4ffec0-1734950731618.js";import{C as N}from"./index-c7074e8f-1734950731618.js";import{P as we}from"./index-4013b1bc-1734950731618.js";import{a as Fe,g as pe,c as ge,b as Le,d as Se,u as Ae,e as ke,f as xe}from"./api-23af9df8-1734950731618.js";import{a as Ee}from"./api-5d798bfa-1734950731618.js";import{N as ee}from"./Cascader-500c8137-1734950731618.js";import{N as se}from"./Scrollbar-10f58cff-1734950731618.js";import{g as Re,c as ue}from"./contants-057fb90d-1734950731618.js";import{a as Be}from"./add-efe8238e-1734950731618.js";import{g as Q,s as I}from"./index-db345329-1734950731618.js";import{s as re}from"./api-d3492aaa-1734950731618.js";import{T as De}from"./index-043f1db0-1734950731618.js";import{T as Te}from"./index-c8d64418-1734950731618.js";import{P as Ge}from"./index-82b7102d-1734950731618.js";import{U as Ie}from"./updateSubject-4a5e4bdd-1734950731618.js";import{g as Ye,b as je}from"./api-14703b96-1734950731618.js";import{i as ze,s as ne}from"./use-async-65954bcc-1734950731618.js";import{s as A}from"./index.module-622ebf5e-1734950731618.js";import{s as Ue,a as Ne,T as Ve,b as Pe,h as We}from"./html2canvas.esm-840e8c9e-1734950731618.js";import{b as He}from"./urlUtils-7f82c85e-1734950731618.js";import{u as Oe}from"./catchData-e017bf09-1734950731618.js";import"./index-3baf626d-1734950731618.js";import"./index-1071cbc8-1734950731618.js";import"./Slider-f8e18c57-1734950731618.js";import"./index-b40f8126-1734950731618.js";import"./icon_default-d1bcaf5f-1734950731618.js";import"./useSpeak-591a8844-1734950731618.js";import"./api-9f0dec79-1734950731618.js";import"./icon-pan-16e35a82-1734950731618.js";import"./api-5c1c8c26-1734950731618.js";import"./ding-8e9054d5-1734950731618.js";import"./searchArray-e332cd94-1734950731618.js";import"./contants-84ba384e-1734950731618.js";import"./index-80ba3b64-1734950731618.js";import"./index-5585b177-1734950731618.js";import"./index-5fd713bb-1734950731618.js";import"./index-4064e060-1734950731618.js";import"./teacherIcon-b8e3946d-1734950731618.js";import"./index-3315377a-1734950731618.js";import"./index-ef2cd44a-1734950731618.js";const Me=O({props:{activeRow:{type:Object,default:()=>({id:""})},gradeYearList:{type:Array,default:()=>[]},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(g,{emit:w}){const a=T({uploading:!1}),F=Z(),o=y(),u=T({gradeYear:null,currentGradeNum:null,currentClass:null,instrumentId:null}),i=y([]),m=y([]),L=()=>{o.value.validate(async s=>{if(!s){a.uploading=!0;try{await Fe({...u}),F.success("新增成功"),w("close"),w("getList"),a.uploading=!1}catch(c){console.log(c)}a.uploading=!1}})},v=async()=>{try{const{data:s}=await Ee({}),c=[{label:s+1,value:s+1},{label:s,value:s}];i.value=c}catch(s){}},f=async()=>{try{const{data:s}=await pe({gradeYear:u.gradeYear,currentGradeNum:u.currentGradeNum,currentClass:u.currentClass}),c=s||[];m.value=c}catch(s){}};return ve(()=>[u.gradeYear,u.currentGradeNum,u.currentClass],()=>{u.instrumentId=null,f()}),K(()=>{v()}),()=>e("div",{class:[r.addClass]},[e(_,{"label-placement":"left",model:u,ref:o},{default:()=>[e(E,{path:"gradeYear",rule:[{required:!0,message:"请选择学年"}]},{default:()=>[e(N,R({style:{width:"400px"},options:i.value,placeholder:"选择学年",clearable:!0},{value:u.gradeYear,"onUpdate:value":s=>u.gradeYear=s}),null)]}),e(E,{path:"currentGradeNum",rule:[{required:!0,message:"请选择年级"}]},{default:()=>[e(N,R({style:{width:"400px"},options:g.gradeNumList,placeholder:"选择年级",clearable:!0},{value:u.currentGradeNum,"onUpdate:value":s=>u.currentGradeNum=s}),null)]}),e(E,{path:"currentClass",rule:[{required:!0,message:"请选择班级"}]},{default:()=>[e(N,R({style:{width:"400px"},options:g.classArray,placeholder:"选择班级",clearable:!0},{value:u.currentClass,"onUpdate:value":s=>u.currentClass=s}),null)]}),e(E,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[e(ee,{placeholder:"请选择乐器",value:u.instrumentId,"onUpdate:value":s=>u.instrumentId=s,options:m.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),e(U,{class:r.btnGroup,justify:"center"},{default:()=>[e(h,{round:!0,onClick:()=>w("close")},{default:()=>[n("取消")]}),e(h,{round:!0,loading:a.uploading,onClick:()=>L(),type:"primary"},{default:()=>[n("保存")]})]})])}}),Xe="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";function oe(g){return typeof g=="function"||Object.prototype.toString.call(g)==="[object Object]"&&!fe(g)}const Ze=O({props:{activeRow:{type:Object,default:()=>({id:""})}},name:"RestStudentBox",emits:["close","getList"],setup(g,{emit:w}){const a=Z(),F=T({uploading:!1});y([]),y([]),y();const o=y([]);console.log(g.activeRow,"activeRow");const u=T({gradeYear:null,name:"",id:""}),i=y([]),m=y([]),L=y(null),v=y([]),f=y([]),s=y(null),c=y([]),D=async()=>{try{const p=(await ge({page:1,rows:9999,upgradeFlag:!0})).data.rows||[],l=[],Y=[];if(p.forEach(j=>{const V={label:j.name,key:j.id,gradeYear:j.gradeYear,value:j.id,disabled:j.id==g.activeRow.id};g.activeRow.gradeYear===j.gradeYear?l.push(V):Y.push(V)}),o.value=[...l,...Y],o.value[0].disabled?o.value.length>1&&(u.name=o.value[1].label,u.id=o.value[1].key,u.gradeYear=o.value[1].gradeYear):(u.name=o.value[0].label,u.id=o.value[0].key,u.gradeYear=o.value[0].gradeYear),u.id){const j=await k(u.id);f.value=j.data.rows.map(V=>({label:V.nickname+"("+V.id+")",value:V.id}))}}catch(d){console.log(d)}},k=async d=>await Le({page:1,rows:999,classGroupId:d}),G=async d=>{o.value.forEach(l=>{l.key==d&&(u.name=l.label,u.gradeYear=l.gradeYear,u.id=l.key)});const p=await k(d);f.value=p.data.rows.map(l=>({label:l.nickname+"("+l.id+")",value:l.id})),console.log(c.value,"submitList.value"),f.value=f.value.filter(l=>!c.value.some(Y=>Y.value===l.value)),c.value.forEach(l=>{l.toClassId==u.id&&(console.log(l.toClassId,l),f.value.push({label:l.label,value:l.value}))})},S=ae(()=>(m.value||[]).filter(l=>l.label.indexOf(L.value||"")!=-1)),B=ae(()=>(f.value||[]).filter(l=>l.label.indexOf(s.value||"")!=-1)),M=()=>{S.value.length===i.value.length?i.value=[]:i.value=S.value.map(d=>d.value)},X=()=>{B.value.length===v.value.length?v.value=[]:v.value=B.value.map(d=>d.value)},t=()=>{const d=m.value.filter(p=>i.value.indexOf(p.value)!=-1);if(d.length>0){const p=d.map(l=>({...l,studentId:l.value,toClassId:u.id}));c.value=c.value.filter(l=>!p.some(Y=>Y.value===l.value)),c.value=c.value.concat(p)}m.value=m.value.filter(p=>!d.some(l=>l.value===p.value)),d.forEach(p=>{f.value.push(p)}),i.value=[]},b=()=>{const d=f.value.filter(p=>v.value.indexOf(p.value)!=-1);if(d.length>0){const p=d.map(l=>({...l,studentId:l.value,toClassId:g.activeRow.id}));c.value=c.value.filter(l=>!p.some(Y=>Y.value===l.value)),c.value=c.value.concat(p)}f.value=f.value.filter(p=>!d.some(l=>l.value===p.value)),d.forEach(p=>{m.value.push(p)}),v.value=[],console.log(c.value," submitList.value===>")},x=async()=>{if(o.value.length<2){a.error("当前只有一个班级,无法调整");return}if(c.value<1){w("close");return}try{const d=await Se(c.value);w("close"),w("getList")}catch(d){console.log(d)}};return K(async()=>{D();const d=await k(g.activeRow.id);m.value=d.data.rows.map(p=>({label:p.nickname+"("+p.id+")",value:p.id}))}),()=>{let d,p;return e("div",{class:[r.container,r.resetStudentWrap]},[e("div",{class:r.studentTransfer},[e("div",{class:r.studentTransferList},[e("div",{class:r.studentLeft},[e("div",{class:r.listTop},[e("p",null,[g.activeRow.name]),e("span",null,[n("("),g.activeRow.gradeYear,n("学年)")])]),e("div",{class:r.listCore},[e(P,{class:r.chioseCheckAllBox},{default:()=>[e(q,{onUpdateChecked:l=>{M()},checked:S.value.length===i.value.length,indeterminate:i.value.length>0&&S.value.length!==i.value.length,label:"全选"},null)]}),e(P,null,{default:()=>[e($,R({placeholder:"请输入学生姓名"},{class:r.searchInput,searchWord:L.value,onChangeValue:l=>L.value=l}),null)]}),e(se,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[e(te,{value:i.value,"onUpdate:value":l=>i.value=l},oe(d=S.value.map(l=>e(P,{class:r.chioseCheckBox},{default:()=>[e(q,{value:l.value,label:l.label},null)]})))?d:{default:()=>[d]})]})]),e("div",{class:[r.bottomLeft,r.bottom]},[e("div",{class:r.bottomWrap},[n("共"),m.value.length,n("名学生")])])]),e("div",{class:r.chioseBox},[e("div",{class:[r.chioseBtn,r.chioseBtnRight],onClick:()=>t()},null),e("div",{class:r.chioseBtn,onClick:()=>b()},null)]),e("div",{class:r.studentRight},[e("div",{class:r.listTop},[u.id?e(me,{key:"111",value:u.id,"onUpdate:value":l=>u.id=l,options:o.value,onSelect:l=>{G(l)},renderLabel:l=>e("div",{style:{display:"flex"}},[l.label,e("div",{style:{fontSize:"12Px"}},[n("("),l.gradeYear,n("学年)")])]),scrollable:!0},{default:()=>[e("div",{class:r.showGradeSection},[e("div",null,[u.name,u.gradeYear&&e("span",null,[n("("),u.gradeYear,n("学年)")])]),e(z,{class:r.smallArrow,src:Xe,previewDisabled:!0},null)])]}):null]),e("div",{class:r.listCore},[e(P,{class:r.chioseCheckAllBox},{default:()=>[e(q,{onUpdateChecked:l=>{X()},checked:B.value.length===v.value.length,indeterminate:v.value.length>0&&B.value.length!==v.value.length,label:"全选"},null)]}),e(P,null,{default:()=>[e($,R({placeholder:"请输入学生姓名"},{class:r.searchInput,searchWord:s.value,onChangeValue:l=>s.value=l}),null)]}),e(se,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[e(te,{value:v.value,"onUpdate:value":l=>v.value=l},oe(p=B.value.map(l=>e(P,{class:r.chioseCheckBox},{default:()=>[e(q,{value:l.value,label:l.label},null)]})))?p:{default:()=>[p]})]})]),e("div",{class:[r.bottomRight,r.bottom]},[e("div",{class:r.bottomWrap},[n("共"),f.value.length,n("名学生")])])])])]),e(U,{class:r.btnGroup,justify:"center"},{default:()=>[e(h,{round:!0,onClick:()=>w("close")},{default:()=>[n("取消")]}),e(h,{round:!0,loading:F.uploading,type:"primary",onClick:()=>{x()}},{default:()=>[n("保存")]})]})])}}}),Ke=O({name:"coai-guide",emits:["close"],setup(g,{emit:w}){const a=T({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:Q("class1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:C(-4),left:C(-294),width:C(648),height:C(227)},btnsStyle:{bottom:C(30),left:C(-130)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:Q("class2.png"),imgStyle:{top:C(-4),left:C(-276),width:C(515),height:C(227)},btnsStyle:{bottom:C(30),left:C(-110)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:Q("class3.png"),imgStyle:{top:C(-4),width:C(437),height:C(227),left:C(-276)},btnsStyle:{bottom:C(30),left:C(-113)},eleRectPadding:{left:7,top:7,width:14,height:14}}],step:0}),F=y(!1),o=y({});(async()=>{try{const s=localStorage.getItem("teacher-guideInfo");s?o.value=JSON.parse(s)||null:o.value={},o.value&&o.value.classGuide?F.value=!1:F.value=!0}catch(s){console.log(s)}})();const i=()=>{var c,D,k,G;const s=document.getElementById("class-".concat(a.step));if(s){const S=s.getBoundingClientRect(),B=((c=a.steps[a.step].eleRectPadding)==null?void 0:c.left)||0,M=((D=a.steps[a.step].eleRectPadding)==null?void 0:D.top)||0,X=((k=a.steps[a.step].eleRectPadding)==null?void 0:k.width)||0,t=((G=a.steps[a.step].eleRectPadding)==null?void 0:G.height)||0;a.box={left:S.x-B+"px",top:S.y-M+"px",width:S.width+X+"px",height:S.height+t+"px"}}else v()},m=async s=>{try{if(s!=="classList")return;o.value?o.value.classGuide=!1:o.value={classGuide:!1};try{re({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(o.value)})}catch(c){console.log(c)}a.step=0,i(),F.value=!0}catch(c){}};K(()=>{i(),window.addEventListener("resize",L),le.on("teacher-guideInfo",m)});const L=()=>{i()};he(()=>{window.removeEventListener("resize",L),le.off("teacher-guideInfo",m)});const v=()=>{if(a.step>=4){f();return}a.step=a.step+1,i()},f=async()=>{o.value?o.value.classGuide=!0:o.value={classGuide:!0};try{re({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(o.value)})}catch(s){console.log(s)}F.value=!1};return()=>e(J,null,[F.value?ie(e("div",{"onUpdate:show":s=>F.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:I.content,onClick:()=>v()},[e("div",{class:I.backBtn,onClick:s=>{s.stopPropagation(),f()}},[n("跳过")]),e("div",{class:I.box,style:{...a.box,...a.steps[a.step].boxStyle},id:"modeType-".concat(a.step)},[a.steps.map((s,c)=>{var D,k,G,S;return e("div",{onClick:B=>B.stopPropagation(),class:I.item,style:s.type=="bottom"?{display:c===a.step?"":"none",left:"".concat((D=s.eleRect)==null?void 0:D.left,"px"),top:"-".concat((k=s.imgStyle)==null?void 0:k.height)}:{display:c===a.step?"":"none",left:"".concat((G=s.eleRect)==null?void 0:G.left,"px"),top:"".concat((S=a.box)==null?void 0:S.height)}},[e("img",{class:I.img,style:s.imgStyle,src:s.img},null),e("div",{class:I.btns,style:s.btnsStyle},[a.step+1==a.steps.length?e(J,null,[e("div",{class:[I.endBtn],onClick:()=>f()},[n("完成")]),e("div",{class:I.nextBtn,onClick:()=>{a.step=0,i()}},[n("再看一遍")])]):e("div",{class:I.btn,onClick:()=>v()},[n("下一步 ("),a.step+1,n("/"),a.steps.length,n(")")])])])})])])]),[[de,F.value,"show"]]):null])}}),qe=O({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(g,{emit:w}){const a=T({uploading:!1}),F=Z(),o=y(),u=y([]),i=T({currentGradeNum:null,gradeYear:null,currentClass:null,instrumentId:null,id:null});K(()=>{i.currentGradeNum=g.activeRow.currentGradeNum,i.gradeYear=g.activeRow.gradeYear,i.currentClass=g.activeRow.currentClass,i.instrumentId=g.activeRow.instrumentId,i.id=g.activeRow.id,L()});const m=()=>{o.value.validate(async v=>{if(!v){a.uploading=!0;try{await Ae({...i}),F.success("修改成功"),w("close"),w("getList"),a.uploading=!1}catch(f){console.log(f)}a.uploading=!1}})},L=async()=>{try{const{data:v}=await pe({gradeYear:i.gradeYear,currentGradeNum:i.currentGradeNum,currentClass:i.currentClass}),f=v||[];u.value=f}catch(v){}};return()=>e("div",{class:[r.addClass]},[e(_,{"label-placement":"left",model:i,ref:o},{default:()=>[e(E,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[e(ee,{placeholder:"请选择乐器",value:i.instrumentId,"onUpdate:value":v=>i.instrumentId=v,options:u.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),e(U,{class:r.btnGroup,justify:"center"},{default:()=>[e(h,{round:!0,onClick:()=>w("close")},{default:()=>[n("取消")]}),e(h,{round:!0,loading:a.uploading,onClick:()=>m(),type:"primary"},{default:()=>[n("保存")]})]})])}}),Qe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAABSCAMAAAB+Ia+5AAACT1BMVEUAAAD/2FL/11f/sDH/sDD/xj//sDH/sTH/tDX/zEX/v0D/wzn/zkr/32X/sDD/zEf/32X/1FL/yUT/3mP/3WL/3WL/wjj/3GL/xDz/wzv/zkr/xz//4Gf/wTb/zUj/1FT/6HH/yUT/xD3/wjf/01P/wzz/sDH/3mT/5G3/wDj/xTr/11f/5nD/5XD/wTj/wTZUJg3/y0b/wTf/xDv/wjn/6nb/6HP/8YH/yUP/7Hn/xT3/x0D/737/7Xv/63j/8ID/1Vb/zkv/53H/z03/3WL/8oL/5nD/7n3/xj7/zUr/1FX/84T/ykT/2lz/yEH/0VD/5W7/21//6XT/5G3/32b/3GH/42z/1lj/4mr/11n/4Wn/2l7/zEf/3mP/zEn/01P/2Fv/0lL/0E7/4Gf/rzD/32T/0E//2Fr/0lH/4Gj/01T/zUn/1lf/84P/7XrdrkFvQhhpPBj/733zxk9bLRDdwFx3Sx59UCDy0mFiNRPrxFP/sDC8mkm7mEageDWSaS19Tx1vRBugejeEWSXYsUxpOxbJoUTQpEG7kj2EWyjQoT3Clz2ZcjRvQxpYKg7evFbQrlDQq0xvQRf5zlPyxU3CnkfXqkJdLxH501vCoEvClDmJXidgMhPx1WjzzlvRp0W0ijq7jTaYbCuEVyFyRhz43Gi8lkOSai7922TRsVPJpk7Em0Kui0GnfDKEWiaBVS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egG/jRS/QH34UNzwhpYHs4sH/y1fGF+ufe/4jy4Hy2jG3UpTO6L1c8st52BBzjrWPJpFJGRORxHzA6nr1gDy6PuK7Gc92B5ZCjn/vedDw+6ihxNYZ61binSj58LsNwqfC1np2Fld4Xl3Hcu6WGXSFm+z++1jzMM5dz/gfPhemuztSlQQpFeQapuegv0h4Hy1vYGHkjvmaRHyebmCsv5zE/yvUlmwPJWC5bzTFhu3rWk+193PlRaF4e13G57Wc6cSPqLshWWc+Nn9BEZy7kCy1sXRMX5cC+Z00paFMjNc36tSH+WstzoAw+kcRTM3EpWWE5nf9tGxvNheZLAcn4nWJ4Yyrn/PefD1d6ceq9O0eslvSSpJ8iVVI8lX5+y3Oq3POC+3/hPda1w/q40bkkOy3s9WM49sNxoS7r/VefFeh2QQmT/zH+mP9tialI65/Rnvf6T13OtXND8dedHpbZAvVan0HVWE2wd+aV+TsX5sdaoNShqFFiBPqdzu3+pn69rzpP1hko9sL2XetTWnS83N4bDjeFGiiHVGsNGY6Ohz9yDNVO71P9pXw5WHISBMABPFnIQC4IH0UoLbemhPewS9SDxBTyITyB9/8fYiZamIWwx6mEh8zEwk5n80y6GudhxMDyGB5bLjvLKkcFsXIhBDFjig09/KK9uHOZjO0FW2zFwkAulE50Fl/be/kN5IXJwEtVvurpTsL3eWH/uR5SPwE1wqskqpwAc7et+VPc11jTrt+625833/B6cxX3f9A2W2SfGHll/sPmdj2EB3pDFOCySNm2D1b4Yb2tn8zefwkKRlLKV7QgHBZs1Gx3p/77mI1gsbiVxF8MKX2dZSqyyfHY0zsje61nzL3/+glWCa0mcXANYKwtLpSqrEQ7P9zhjmbuJcfMpH2awAcbDiswScgbbYFlSKUVVYOmuGTdk3X3IJxmDDd35pSAfXPgdNhfkt/Q7CQ8FeXMIk5/0lgdA/q9fBlCU9WQqZ/4AAAAASUVORK5CYII=",Je=""+new URL("strudentCore-ce06266f.png",import.meta.url).href,$e=O({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(g,{emit:w}){T({uploading:!1}),Z();const a=ce();y();const F=y(He()+"/classroom-app/#/register-new?sId=".concat(g.activeRow.id,"&gy=").concat(g.activeRow.gradeYear,"&ci=").concat(g.activeRow.classId,"&cgn=").concat(g.activeRow.currentGradeNum,"&cc=").concat(g.activeRow.currentClass,"&t=").concat(+new Date)),o=T({saveLoading:!1,image:null,shareLoading:!1}),u=()=>{if(!o.saveLoading)if(o.saveLoading=!0,o.image)i();else{const m=document.getElementById("preview-container");We(m,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async L=>{const v=L.toDataURL("image/png");o.image=v,i()}).catch(()=>{o.saveLoading=!1})}},i=async()=>{setTimeout(()=>{o.saveLoading=!1},100);const m=document.createElement("a");m.setAttribute("download","报名图片.png"),m.href=o.image,m.click()};return()=>e("div",{class:[A.addStudentWrap]},[e("div",{onClick:()=>{w("close")}},[e(z,{src:Ue,previewDisabled:!0,class:A.studentCLose},null)]),e(z,{previewDisabled:!0,class:A.stunentStart,src:Ne},null),e(z,{class:A.addTitle,previewDisabled:!0,src:Qe},null),e("div",{class:A.addStudentInfo,id:"preview-container"},[e(z,{class:A.studentInfoBg,previewDisabled:!0,src:Je},null),e("div",{class:A.studentCore},[e("img",{alt:"img",crossorigin:"anonymous",class:A.schoolLogo,src:a.getUserInfo.schoolInfos[0].logo+"?some=".concat(new Date().getTime())},null),e("div",{class:A.studentCoreInfo},[e("h2",null,[a.getUserInfo.schoolInfos[0].name]),e("p",{class:A.studentCoreInfoSubtitle},[e("span",null,[n("报名注册")])]),e("div",{class:A.codewrap},[e(Ve,{margin:0,text:F.value,size:119},null)]),e("div",{class:A.codewrapSubmit},[e(z,{previewDisabled:!0,src:Pe},null),n("请使用微信扫码")])])])]),e("div",{class:A.studentBottom},[e("p",null,[n("请将二维码图片发送给学生家长,扫码完成报名")]),e("div",{class:A.downBtn,onClick:u},[n("下载图片")])])])}}),Pa=O({name:"class-classList",setup(){const g=Oe(),w=ce(),a=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}),F=y(),o=Z(),u=ye(),i=be(),m=()=>{a.pagination.page=1,s(),ne({current:a.searchForm,saveKey:i.path})},L=y(!1);a.gradeNumList=Re();const v=()=>{a.searchForm={keyword:null,currentClass:"",currentGradeNum:"",instrumentId:"",gradeYear:"",gradeLevel:""},a.popSelectYearList.length>1&&(a.searchForm.gradeYear=a.popSelectYearList[1].id),a.pagination.page=1,s(),ne({current:a.searchForm,saveKey:i.path})},f=async()=>{try{await ke({ids:a.removeRow.id}),s(),o.success("删除成功"),a.removeVisiable=!1}catch(t){console.log(t)}},s=async()=>{a.loading=!0;try{const t=await ge({...a.searchForm,...a.pagination});a.tableList=t.data.rows,a.pagination.pageTotal=t.data.total,a.loading=!1,setTimeout(()=>{a.tableList.length>0&&(L.value=!0)},500)}catch(t){a.loading=!1,console.log(t)}},c=()=>[{title:"班级名称",key:"name"},{title:"学年",key:"gradeYear"},{title:"学级",key:"gradeLevel",render(t){return t.gradeLevel?"".concat(t.gradeLevel,"级"):""}},{title:"班级乐器",key:"instrumentName"},{title:"学生人数",key:"preStudentNum"},{title:"上次学习",key:"lastStudy",width:"20%",render(t){return t.lastStudy?e(Te,{maxWidth:300,showContentWidth:300,content:t.lastStudy},null):"--"}},{title:"操作",key:"id",render(t,b){return e("div",null,[e(U,null,{default:()=>[b==0?e("div",{id:"class-0"},[e(h,{type:"primary",text:!0,onClick:()=>{u.push({path:"/classDetail",query:{name:t.name,id:t.id,gradeYear:t.gradeYear,upgradeFlag:t.upgradeFlag?1:0}})}},{default:()=>[n("详情")]})]):e(h,{type:"primary",text:!0,onClick:()=>{u.push({path:"/classDetail",query:{name:t.name,id:t.id,gradeYear:t.gradeYear,upgradeFlag:t.upgradeFlag?1:0}})}},{default:()=>[n("详情")]}),e(h,{type:"primary",disabled:!t.upgradeFlag||t.instrumentId,text:!0,onClick:()=>G(t)},{default:()=>[n("修改乐器")]}),b==0?e(h,R({type:"primary",disabled:!t.upgradeFlag},{id:"class-1"},{text:!0,onClick:()=>{D(t)}}),{default:()=>[n("学生调整")]}):e(h,{type:"primary",disabled:!t.upgradeFlag,text:!0,onClick:()=>{D(t)}},{default:()=>[n("学生调整")]}),b==0?e(h,R({id:"class-2"},{disabled:!t.upgradeFlag,type:"primary",text:!0,onClick:()=>k(t)}),{default:()=>[n("开始上课")]}):e(h,{disabled:!t.upgradeFlag,type:"primary",text:!0,onClick:()=>k(t)},{default:()=>[n("开始上课")]}),t.preStudentNum>0?null:e(h,{type:"error",color:"#EA4132",textColor:"#EA4132",text:!0,onClick:()=>{a.removeVisiable=!0,a.removeRow=t}},{default:()=>[n("删除")]}),t.imGroupId?null:e(h,{type:"primary",disabled:!t.upgradeFlag,text:!0,onClick:()=>{S(t)}},{default:()=>[n("创建群聊")]}),e(h,{type:"primary",disabled:!t.upgradeFlag,text:!0,onClick:()=>{const{schoolInfos:x}=w.getUserInfo,d=x.length>0?x[0].id:null;d&&(a.addStudentVisible=!0,a.activeRow={id:d,classId:t.id,currentGradeNum:t.currentGradeNum,currentClass:t.currentClass,gradeYear:t.gradeYear})}},{default:()=>[n("邀请学生")]})]})])}}],D=t=>{a.activeRow=t,a.studentVisible=!0},k=async t=>{try{t.instrumentId?u.push({path:"/prepare-lessons",query:{lastUseCoursewareId:t.lessonCoursewareId,unit:t.lessonCoursewareKnowledgeDetailId,instrumentId:t.instrumentId,courseScheduleSubjectId:t.courseScheduleSubjectId,preStudentNum:t.preStudentNum,name:t.name,classGroupId:t.id}}):(a.showSubjectClass=!0,a.activeRow=t)}catch(b){console.log(b)}},G=t=>{a.activeRow=t,a.showResetClass=!0},S=async t=>{a.activeRow=t,a.groupVisiable=!0},B=async()=>{console.log(a.activeRow,"row"),a.groupBtnLoading=!0;try{await xe({classGroupId:a.activeRow.id}),o.success("创建成功"),a.groupVisiable=!1,await s()}catch(t){console.log(t)}a.groupBtnLoading=!1},M=async()=>{try{const{data:t}=await Ye(),b=t||[];b.forEach(x=>{x.name=x.name+"学年"}),a.popSelectYearList=b||[],b.length>1&&!a.searchForm.gradeYear&&(a.searchForm.gradeYear=b[1].id)}catch(t){}},X=async()=>{try{const{data:t}=await je(),b=t||[];b.forEach(x=>{x.name=x.name+"级"}),b.unshift({id:"",name:"全部学级"}),a.popSelectLevelList=b||[],b.length>0&&!a.searchForm.gradeLevel&&(a.searchForm.gradeLevel=b[0].id)}catch(t){}};return ze({current:a.searchForm,callBack:t=>{a.searchForm=t}}),K(async()=>{a.loading=!0,await g.getSubjects(),await M(),await X(),await s(),a.loading=!1}),()=>e("div",{class:r.listWrap},[e("div",{class:r.searchList},[e(_,{"label-placement":"left",inline:!0,ref:F},{default:()=>[e(E,null,{default:()=>[e($,R({placeholder:"请输入班级名称"},{class:r.searchInput,searchWord:a.searchForm.keyword,onChangeValue:t=>a.searchForm.keyword=t}),null)]}),e(E,null,{default:()=>[e(N,R({options:a.popSelectYearList,placeholder:"选择学年",clearable:!1,inline:!0,labelField:"name",valueField:"id"},{value:a.searchForm.gradeYear,"onUpdate:value":t=>a.searchForm.gradeYear=t}),null)]}),e(E,null,{default:()=>[e(N,R({options:a.popSelectLevelList,placeholder:"选择学级",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:a.searchForm.gradeLevel,"onUpdate:value":t=>a.searchForm.gradeLevel=t}),null)]}),e(E,null,{default:()=>[e(N,R({options:a.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:a.searchForm.currentGradeNum,"onUpdate:value":t=>a.searchForm.currentGradeNum=t}),null)]}),e(E,null,{default:()=>[e(N,R({options:ue,placeholder:"选择班级",clearable:!0,inline:!0},{value:a.searchForm.currentClass,"onUpdate:value":t=>a.searchForm.currentClass=t}),null)]}),e(E,null,{default:()=>[e(ee,{to:"body",placeholder:"选择乐器",options:[{value:"",label:"全部乐器"},...g.getSubjectList],childrenField:"instruments",checkStrategy:"child",expandTrigger:"hover",showPath:!1,value:a.searchForm.instrumentId,"onUpdate:value":[t=>a.searchForm.instrumentId=t,(t,b,x)=>{console.log(t,b,x)}]},null)]}),e(E,null,{default:()=>[e(U,{justify:"end"},{default:()=>[e(h,{type:"primary",class:"searchBtn",onClick:m},{default:()=>[n("搜索")]}),e(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:v},{default:()=>[n("重置")]})]})]})]})]),e(h,{class:r.addBtn,type:"primary",onClick:()=>a.showaddClass=!0},{default:()=>[n("创建班级")],icon:()=>e(J,null,[e(z,{class:r.addBtnIcon,previewDisabled:!0,src:Be},null)])}),e("div",{class:r.tableWrap},[e(Ce,{class:r.classTable,loading:a.loading,columns:c(),data:a.tableList},{empty:()=>e(De,null,null)}),e(we,{page:a.pagination.page,"onUpdate:page":t=>a.pagination.page=t,pageSize:a.pagination.rows,"onUpdate:pageSize":t=>a.pagination.rows=t,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":t=>a.pagination.pageTotal=t,onList:s,sync:!0},null)]),e(W,{maskClosable:H,show:a.studentVisible,"onUpdate:show":t=>a.studentVisible=t,preset:"card",class:["modalTitle background",r.studentVisible],title:"学生调整"},{default:()=>[e(Ze,{activeRow:a.activeRow,onClose:()=>a.studentVisible=!1,onGetList:()=>s()},null)]}),e(W,{maskClosable:H,show:a.showaddClass,"onUpdate:show":t=>a.showaddClass=t,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"创建班级"},{default:()=>[e(Me,{gradeYearList:a.popSelectYearList,gradeNumList:a.gradeNumList,classArray:ue,onGetList:()=>s(),onClose:()=>a.showaddClass=!1},null)]}),e(W,{maskClosable:H,show:a.showResetClass,"onUpdate:show":t=>a.showResetClass=t,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[e(qe,{activeRow:a.activeRow,onGetList:()=>s(),onClose:()=>a.showResetClass=!1},null)]}),e(W,{maskClosable:H,show:a.showSubjectClass,"onUpdate:show":t=>a.showSubjectClass=t,style:{width:"500px"},preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[a.showSubjectClass?e(Ie,{activeRow:a.activeRow,onGetList:()=>s(),onConfirm:t=>{u.push({path:"/prepare-lessons",query:{...t}})},onClose:()=>a.showSubjectClass=!1},null):null]}),e(Ge,{show:a.previewModal,"onUpdate:show":t=>a.previewModal=t,type:"attend",params:a.previewParams},null),e(W,{maskClosable:H,show:a.removeVisiable,"onUpdate:show":t=>a.removeVisiable=t,preset:"card",class:["modalTitle",r.removeVisiable],title:"删除班级"},{default:()=>[e("div",{class:r.studentRemove},[e("p",null,[n("确定要删除班级么?"),e("span",null,[n("删除班级信息将会清空")]),n("。")]),e(U,{class:r.btnGroup,justify:"center"},{default:()=>[e(h,{round:!0,type:"primary",onClick:f},{default:()=>[n("确定")]}),e(h,{round:!0,onClick:()=>a.removeVisiable=!1},{default:()=>[n("取消")]})]})])]}),e(W,{maskClosable:H,show:a.groupVisiable,"onUpdate:show":t=>a.groupVisiable=t,preset:"card",class:["modalTitle",r.removeVisiable],title:"创建群聊"},{default:()=>[e("div",{class:r.studentRemove},[e("p",{style:{textAlign:"center"}},[n("是否创建班级群聊")]),e(U,{class:r.btnGroup,justify:"center"},{default:()=>[e(h,{round:!0,type:"primary",onClick:B,loading:a.groupBtnLoading,disabled:a.groupBtnLoading},{default:()=>[n("确定")]}),e(h,{round:!0,onClick:()=>a.groupVisiable=!1},{default:()=>[n("取消")]})]})])]}),L.value?e(Ke,null,null):null,a.addStudentVisible?ie(e("div",{"onUpdate:show":t=>a.addStudentVisible=t,class:["n-modal-mask",r.popBox]},[e($e,{activeRow:a.activeRow,onClose:()=>{a.addStudentVisible=!1}},null)]),[[de,a.addStudentVisible,"show"]]):null])}});export{Pa as default};