index-6d5ef485-1726219372904.js 32 KB

1
  1. import{d as W,e as T,b as Z,r as y,A as me,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 te,aH as P,n as q,aA as ae,aI as ve,w as z,D as fe,$ as C,C as le,T as he,a0 as ie,a1 as de,F as Q,V as ye,c as ce,u as be,a as Ce,aG as we,l as H,m as O}from"./index-1ec0a32d-1726219372904.js";import{s as r}from"./index.module-7d86a2ea-1726219372904.js";import{S as $}from"./index-965f51af-1726219372904.js";import{C as N}from"./index-c5832142-1726219372904.js";import{P as Fe}from"./index-be61723a-1726219372904.js";import{a as Le,g as pe,c as ge,b as Se,d as Ae,u as xe,e as ke,f as Ee}from"./api-0e5ba9bf-1726219372904.js";import{a as Re}from"./api-b3e2f6f8-1726219372904.js";import{N as ee}from"./Cascader-f5760f7f-1726219372904.js";import{N as se}from"./Scrollbar-c3ae1e59-1726219372904.js";import{g as Be,c as ue}from"./contants-fa54933f-1726219372904.js";import{a as De}from"./add-efe8238e-1726219372904.js";import{g as J,s as I}from"./index-db345329-1726219372904.js";import{s as re}from"./api-f5057ed1-1726219372904.js";import{T as Te}from"./index-2727764b-1726219372904.js";import{P as Ge}from"./index-264cd029-1726219372904.js";import{U as Ie}from"./updateSubject-a58a4b8f-1726219372904.js";import{g as Ye,b as je}from"./api-2821c39f-1726219372904.js";import{i as ze,s as ne}from"./use-async-9f56226e-1726219372904.js";import{s as A}from"./index.module-54c73193-1726219372904.js";import{s as Ue,a as Ne,T as We,b as Ve,h as Pe}from"./html2canvas.esm-6cb5f600-1726219372904.js";import{a as He}from"./urlUtils-72ef455d-1726219372904.js";import{u as Oe}from"./catchData-04337fe1-1726219372904.js";import"./index-6998537e-1726219372904.js";import"./index-d4bfaa45-1726219372904.js";import"./Slider-bd832880-1726219372904.js";import"./index-b48cb97f-1726219372904.js";import"./icon_default-d1bcaf5f-1726219372904.js";import"./useSpeak-0792de8d-1726219372904.js";import"./api-da5bf64f-1726219372904.js";import"./icon-pan-16e35a82-1726219372904.js";import"./api-9de750df-1726219372904.js";import"./ding-8e9054d5-1726219372904.js";import"./searchArray-26034d65-1726219372904.js";import"./contants-32f8b17d-1726219372904.js";import"./index-446e8014-1726219372904.js";import"./index-ff9a89ac-1726219372904.js";import"./index-20e23818-1726219372904.js";import"./index-29523425-1726219372904.js";import"./teacherIcon-b8e3946d-1726219372904.js";import"./index-31d1c307-1726219372904.js";import"./index-30bf2844-1726219372904.js";const Me=W({props:{activeRow:{type:Object,default:()=>({id:""})},gradeYearList:{type:Array,default:()=>[]},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(i,{emit:w}){const t=T({uploading:!1}),F=Z(),o=y(),u=T({gradeYear:null,currentGradeNum:null,currentClass:null,instrumentId:null}),d=y([]),v=y([]),L=()=>{o.value.validate(async s=>{if(!s){t.uploading=!0;try{await Le({...u}),F.success("新增成功"),w("close"),w("getList"),t.uploading=!1}catch(p){console.log(p)}t.uploading=!1}})},m=async()=>{try{const{data:s}=await Re({}),p=[{label:s+1,value:s+1},{label:s,value:s}];d.value=p}catch(s){}},f=async()=>{try{const{data:s}=await pe({gradeYear:u.gradeYear,currentGradeNum:u.currentGradeNum,currentClass:u.currentClass}),p=s||[];v.value=p}catch(s){}};return me(()=>[u.gradeYear,u.currentGradeNum,u.currentClass],()=>{u.instrumentId=null,f()}),K(()=>{m()}),()=>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:d.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:i.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:i.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:v.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:t.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(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!fe(i)}const Ze=W({props:{activeRow:{type:Object,default:()=>({id:""})}},name:"RestStudentBox",emits:["close","getList"],setup(i,{emit:w}){const t=Z(),F=T({uploading:!1});y([]),y([]),y();const o=y([]);console.log(i.activeRow,"activeRow");const u=T({gradeYear:null,name:"",id:""}),d=y([]),v=y([]),L=y(null),m=y([]),f=y([]),s=y(null),p=y([]),D=async()=>{try{const g=(await ge({page:1,rows:9999,upgradeFlag:!0})).data.rows||[],l=[],Y=[];if(g.forEach(j=>{const V={label:j.name,key:j.id,gradeYear:j.gradeYear,value:j.id,disabled:j.id==i.activeRow.id};i.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 x(u.id);f.value=j.data.rows.map(V=>({label:V.nickname+"("+V.id+")",value:V.id}))}}catch(c){console.log(c)}},x=async c=>await Se({page:1,rows:999,classGroupId:c}),G=async c=>{o.value.forEach(l=>{l.key==c&&(u.name=l.label,u.gradeYear=l.gradeYear,u.id=l.key)});const g=await x(c);f.value=g.data.rows.map(l=>({label:l.nickname+"("+l.id+")",value:l.id})),console.log(p.value,"submitList.value"),f.value=f.value.filter(l=>!p.value.some(Y=>Y.value===l.value)),p.value.forEach(l=>{l.toClassId==u.id&&(console.log(l.toClassId,l),f.value.push({label:l.label,value:l.value}))})},S=te(()=>(v.value||[]).filter(l=>l.label.indexOf(L.value||"")!=-1)),B=te(()=>(f.value||[]).filter(l=>l.label.indexOf(s.value||"")!=-1)),M=()=>{S.value.length===d.value.length?d.value=[]:d.value=S.value.map(c=>c.value)},X=()=>{B.value.length===m.value.length?m.value=[]:m.value=B.value.map(c=>c.value)},a=()=>{const c=v.value.filter(g=>d.value.indexOf(g.value)!=-1);if(c.length>0){const g=c.map(l=>({...l,studentId:l.value,toClassId:u.id}));p.value=p.value.filter(l=>!g.some(Y=>Y.value===l.value)),p.value=p.value.concat(g)}v.value=v.value.filter(g=>!c.some(l=>l.value===g.value)),c.forEach(g=>{f.value.push(g)}),d.value=[]},b=()=>{const c=f.value.filter(g=>m.value.indexOf(g.value)!=-1);if(c.length>0){const g=c.map(l=>({...l,studentId:l.value,toClassId:i.activeRow.id}));p.value=p.value.filter(l=>!g.some(Y=>Y.value===l.value)),p.value=p.value.concat(g)}f.value=f.value.filter(g=>!c.some(l=>l.value===g.value)),c.forEach(g=>{v.value.push(g)}),m.value=[],console.log(p.value," submitList.value===>")},k=async()=>{if(o.value.length<2){t.error("当前只有一个班级,无法调整");return}if(p.value<1){w("close");return}try{const c=await Ae(p.value);w("close"),w("getList")}catch(c){console.log(c)}};return K(async()=>{D();const c=await x(i.activeRow.id);v.value=c.data.rows.map(g=>({label:g.nickname+"("+g.id+")",value:g.id}))}),()=>{let c,g;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,[i.activeRow.name]),e("span",null,[n("("),i.activeRow.gradeYear,n("学年)")])]),e("div",{class:r.listCore},[e(P,{class:r.chioseCheckAllBox},{default:()=>[e(q,{onUpdateChecked:l=>{M()},checked:S.value.length===d.value.length,indeterminate:d.value.length>0&&S.value.length!==d.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(ae,{value:d.value,"onUpdate:value":l=>d.value=l},oe(c=S.value.map(l=>e(P,{class:r.chioseCheckBox},{default:()=>[e(q,{value:l.value,label:l.label},null)]})))?c:{default:()=>[c]})]})]),e("div",{class:[r.bottomLeft,r.bottom]},[e("div",{class:r.bottomWrap},[n("共"),v.value.length,n("名学生")])])]),e("div",{class:r.chioseBox},[e("div",{class:[r.chioseBtn,r.chioseBtnRight],onClick:()=>a()},null),e("div",{class:r.chioseBtn,onClick:()=>b()},null)]),e("div",{class:r.studentRight},[e("div",{class:r.listTop},[u.id?e(ve,{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===m.value.length,indeterminate:m.value.length>0&&B.value.length!==m.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(ae,{value:m.value,"onUpdate:value":l=>m.value=l},oe(g=B.value.map(l=>e(P,{class:r.chioseCheckBox},{default:()=>[e(q,{value:l.value,label:l.label},null)]})))?g:{default:()=>[g]})]})]),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:()=>{k()}},{default:()=>[n("保存")]})]})])}}}),Ke=W({name:"coai-guide",emits:["close"],setup(i,{emit:w}){const t=T({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:J("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:J("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:J("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 d=()=>{var p,D,x,G;const s=document.getElementById("class-".concat(t.step));if(s){const S=s.getBoundingClientRect(),B=((p=t.steps[t.step].eleRectPadding)==null?void 0:p.left)||0,M=((D=t.steps[t.step].eleRectPadding)==null?void 0:D.top)||0,X=((x=t.steps[t.step].eleRectPadding)==null?void 0:x.width)||0,a=((G=t.steps[t.step].eleRectPadding)==null?void 0:G.height)||0;t.box={left:S.x-B+"px",top:S.y-M+"px",width:S.width+X+"px",height:S.height+a+"px"}}else m()},v=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(p){console.log(p)}t.step=0,d(),F.value=!0}catch(p){}};K(()=>{d(),window.addEventListener("resize",L),le.on("teacher-guideInfo",v)});const L=()=>{d()};he(()=>{window.removeEventListener("resize",L),le.off("teacher-guideInfo",v)});const m=()=>{if(t.step>=4){f();return}t.step=t.step+1,d()},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(Q,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:()=>m()},[e("div",{class:I.backBtn,onClick:s=>{s.stopPropagation(),f()}},[n("跳过")]),e("div",{class:I.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((s,p)=>{var D,x,G,S;return e("div",{onClick:B=>B.stopPropagation(),class:I.item,style:s.type=="bottom"?{display:p===t.step?"":"none",left:"".concat((D=s.eleRect)==null?void 0:D.left,"px"),top:"-".concat((x=s.imgStyle)==null?void 0:x.height)}:{display:p===t.step?"":"none",left:"".concat((G=s.eleRect)==null?void 0:G.left,"px"),top:"".concat((S=t.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},[t.step+1==t.steps.length?e(Q,null,[e("div",{class:[I.endBtn],onClick:()=>f()},[n("完成")]),e("div",{class:I.nextBtn,onClick:()=>{t.step=0,d()}},[n("再看一遍")])]):e("div",{class:I.btn,onClick:()=>m()},[n("下一步 ("),t.step+1,n("/"),t.steps.length,n(")")])])])})])])]),[[de,F.value,"show"]]):null])}}),qe="_showContentWidth_1uy1t_1",Qe={showContentWidth:qe},Je=W({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(i){return()=>e(Q,null,[e(ye,{style:{maxWidth:i.maxWidth+"px"},trigger:i.trigger,placement:i.placement,showArrow:i.showArrow,delay:500},{trigger:()=>e("p",{style:{maxWidth:i.showContentWidth+"px"},class:[Qe.showContentWidth,"showContentWidthWrap"]},[i.content]),default:()=>i.tipsContent||i.content})])}}),$e=W({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(i,{emit:w}){const t=T({uploading:!1}),F=Z(),o=y(),u=y([]),d=T({currentGradeNum:null,gradeYear:null,currentClass:null,instrumentId:null,id:null});K(()=>{d.currentGradeNum=i.activeRow.currentGradeNum,d.gradeYear=i.activeRow.gradeYear,d.currentClass=i.activeRow.currentClass,d.instrumentId=i.activeRow.instrumentId,d.id=i.activeRow.id,L()});const v=()=>{o.value.validate(async m=>{if(!m){t.uploading=!0;try{await xe({...d}),F.success("修改成功"),w("close"),w("getList"),t.uploading=!1}catch(f){console.log(f)}t.uploading=!1}})},L=async()=>{try{const{data:m}=await pe({gradeYear:d.gradeYear,currentGradeNum:d.currentGradeNum,currentClass:d.currentClass}),f=m||[];u.value=f}catch(m){}};return()=>e("div",{class:[r.addClass]},[e(_,{"label-placement":"left",model:d,ref:o},{default:()=>[e(E,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[e(ee,{placeholder:"请选择乐器",value:d.instrumentId,"onUpdate:value":m=>d.instrumentId=m,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:t.uploading,onClick:()=>v(),type:"primary"},{default:()=>[n("保存")]})]})])}}),_e="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/2l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833/B6cxX3f9A2W2SfGHll/sPmdj2EB3pDFOCySNm2D1b4Yb2tn8zefwkKRlLKV7QgHBZs1Gx3p/77mI1gsbiVxF8MKX2dZSqyyfHY0zsje61nzL3/+glWCa0mcXANYKwtLpSqrEQ7P9zhjmbuJcfMpH2awAcbDiswScgbbYFlSKUVVYOmuGTdk3X3IJxmDDd35pSAfXPgdNhfkt/Q7CQ8FeXMIk5/0lgdA/q9fBlCU9WQqZ/4AAAAASUVORK5CYII=",et=""+new URL("strudentCore-ce06266f.png",import.meta.url).href,tt=W({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(i,{emit:w}){T({uploading:!1}),Z();const t=ce();y();const F=y(He()+"/classroom-app/#/register-new?sId=".concat(i.activeRow.id,"&gy=").concat(i.activeRow.gradeYear,"&ci=").concat(i.activeRow.classId,"&cgn=").concat(i.activeRow.currentGradeNum,"&cc=").concat(i.activeRow.currentClass,"&t=").concat(+new Date)),o=T({saveLoading:!1,image:null,shareLoading:!1}),u=()=>{if(!o.saveLoading)if(o.saveLoading=!0,o.image)d();else{const v=document.getElementById("preview-container");Pe(v,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async L=>{const m=L.toDataURL("image/png");o.image=m,d()}).catch(()=>{o.saveLoading=!1})}},d=async()=>{setTimeout(()=>{o.saveLoading=!1},100);const v=document.createElement("a");v.setAttribute("download","报名图片.png"),v.href=o.image,v.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:_e},null),e("div",{class:A.addStudentInfo,id:"preview-container"},[e(z,{class:A.studentInfoBg,previewDisabled:!0,src:et},null),e("div",{class:A.studentCore},[e("img",{alt:"img",crossorigin:"anonymous",class:A.schoolLogo,src:t.getUserInfo.schoolInfos[0].logo+"?some=".concat(new Date().getTime())},null),e("div",{class:A.studentCoreInfo},[e("h2",null,[t.getUserInfo.schoolInfos[0].name]),e("p",{class:A.studentCoreInfoSubtitle},[e("span",null,[n("报名注册")])]),e("div",{class:A.codewrap},[e(We,{margin:0,text:F.value,size:119},null)]),e("div",{class:A.codewrapSubmit},[e(z,{previewDisabled:!0,src:Ve},null),n("请使用微信扫码")])])])]),e("div",{class:A.studentBottom},[e("p",null,[n("请将二维码图片发送给学生家长,扫码完成报名")]),e("div",{class:A.downBtn,onClick:u},[n("下载图片")])])])}}),Ht=W({name:"class-classList",setup(){const i=Oe(),w=ce(),t=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=be(),d=Ce(),v=()=>{t.pagination.page=1,s(),ne({current:t.searchForm,saveKey:d.path})},L=y(!1);t.gradeNumList=Be();const m=()=>{t.searchForm={keyword:null,currentClass:"",currentGradeNum:"",instrumentId:"",gradeYear:"",gradeLevel:""},t.popSelectYearList.length>1&&(t.searchForm.gradeYear=t.popSelectYearList[1].id),t.pagination.page=1,s(),ne({current:t.searchForm,saveKey:d.path})},f=async()=>{try{await ke({ids:t.removeRow.id}),s(),o.success("删除成功"),t.removeVisiable=!1}catch(a){console.log(a)}},s=async()=>{t.loading=!0;try{const a=await ge({...t.searchForm,...t.pagination});t.tableList=a.data.rows,t.pagination.pageTotal=a.data.total,t.loading=!1,setTimeout(()=>{t.tableList.length>0&&(L.value=!0)},500)}catch(a){t.loading=!1,console.log(a)}},p=()=>[{title:"班级名称",key:"name"},{title:"学年",key:"gradeYear"},{title:"学级",key:"gradeLevel",render(a){return a.gradeLevel?"".concat(a.gradeLevel,"级"):""}},{title:"班级乐器",key:"instrumentName"},{title:"学生人数",key:"preStudentNum"},{title:"上次学习",key:"lastStudy",width:"20%",render(a){return a.lastStudy?e(Je,{maxWidth:300,showContentWidth:300,content:a.lastStudy},null):"--"}},{title:"操作",key:"id",render(a,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:a.name,id:a.id,gradeYear:a.gradeYear,upgradeFlag:a.upgradeFlag?1:0}})}},{default:()=>[n("详情")]})]):e(h,{type:"primary",text:!0,onClick:()=>{u.push({path:"/classDetail",query:{name:a.name,id:a.id,gradeYear:a.gradeYear,upgradeFlag:a.upgradeFlag?1:0}})}},{default:()=>[n("详情")]}),e(h,{type:"primary",disabled:!a.upgradeFlag||a.instrumentId,text:!0,onClick:()=>G(a)},{default:()=>[n("修改乐器")]}),b==0?e(h,R({type:"primary",disabled:!a.upgradeFlag},{id:"class-1"},{text:!0,onClick:()=>{D(a)}}),{default:()=>[n("学生调整")]}):e(h,{type:"primary",disabled:!a.upgradeFlag,text:!0,onClick:()=>{D(a)}},{default:()=>[n("学生调整")]}),b==0?e(h,R({id:"class-2"},{disabled:!a.upgradeFlag,type:"primary",text:!0,onClick:()=>x(a)}),{default:()=>[n("开始上课")]}):e(h,{disabled:!a.upgradeFlag,type:"primary",text:!0,onClick:()=>x(a)},{default:()=>[n("开始上课")]}),a.preStudentNum>0?null:e(h,{type:"error",color:"#EA4132",textColor:"#EA4132",text:!0,onClick:()=>{t.removeVisiable=!0,t.removeRow=a}},{default:()=>[n("删除")]}),a.imGroupId?null:e(h,{type:"primary",disabled:!a.upgradeFlag,text:!0,onClick:()=>{S(a)}},{default:()=>[n("创建群聊")]}),e(h,{type:"primary",disabled:!a.upgradeFlag,text:!0,onClick:()=>{const{schoolInfos:k}=w.getUserInfo,c=k.length>0?k[0].id:null;c&&(t.addStudentVisible=!0,t.activeRow={id:c,classId:a.id,currentGradeNum:a.currentGradeNum,currentClass:a.currentClass,gradeYear:a.gradeYear})}},{default:()=>[n("邀请学生")]})]})])}}],D=a=>{t.activeRow=a,t.studentVisible=!0},x=async a=>{try{a.instrumentId?u.push({path:"/prepare-lessons",query:{lastUseCoursewareId:a.lessonCoursewareId,unit:a.lessonCoursewareKnowledgeDetailId,instrumentId:a.instrumentId,courseScheduleSubjectId:a.courseScheduleSubjectId,preStudentNum:a.preStudentNum,name:a.name,classGroupId:a.id}}):(t.showSubjectClass=!0,t.activeRow=a)}catch(b){console.log(b)}},G=a=>{t.activeRow=a,t.showResetClass=!0},S=async a=>{t.activeRow=a,t.groupVisiable=!0},B=async()=>{console.log(t.activeRow,"row"),t.groupBtnLoading=!0;try{await Ee({classGroupId:t.activeRow.id}),o.success("创建成功"),t.groupVisiable=!1,await s()}catch(a){console.log(a)}t.groupBtnLoading=!1},M=async()=>{try{const{data:a}=await Ye(),b=a||[];b.forEach(k=>{k.name=k.name+"学年"}),t.popSelectYearList=b||[],b.length>1&&!t.searchForm.gradeYear&&(t.searchForm.gradeYear=b[1].id)}catch(a){}},X=async()=>{try{const{data:a}=await je(),b=a||[];b.forEach(k=>{k.name=k.name+"级"}),b.unshift({id:"",name:"全部学级"}),t.popSelectLevelList=b||[],b.length>0&&!t.searchForm.gradeLevel&&(t.searchForm.gradeLevel=b[0].id)}catch(a){}};return ze({current:t.searchForm,callBack:a=>{t.searchForm=a}}),K(async()=>{t.loading=!0,await i.getSubjects(),await M(),await X(),await s(),t.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:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(E,null,{default:()=>[e(N,R({options:t.popSelectYearList,placeholder:"选择学年",clearable:!1,inline:!0,labelField:"name",valueField:"id"},{value:t.searchForm.gradeYear,"onUpdate:value":a=>t.searchForm.gradeYear=a}),null)]}),e(E,null,{default:()=>[e(N,R({options:t.popSelectLevelList,placeholder:"选择学级",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:t.searchForm.gradeLevel,"onUpdate:value":a=>t.searchForm.gradeLevel=a}),null)]}),e(E,null,{default:()=>[e(N,R({options:t.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:t.searchForm.currentGradeNum,"onUpdate:value":a=>t.searchForm.currentGradeNum=a}),null)]}),e(E,null,{default:()=>[e(N,R({options:ue,placeholder:"选择班级",clearable:!0,inline:!0},{value:t.searchForm.currentClass,"onUpdate:value":a=>t.searchForm.currentClass=a}),null)]}),e(E,null,{default:()=>[e(ee,{to:"body",placeholder:"选择乐器",options:[{value:"",label:"全部乐器"},...i.getSubjectList],childrenField:"instruments",checkStrategy:"child",expandTrigger:"hover",showPath:!1,value:t.searchForm.instrumentId,"onUpdate:value":[a=>t.searchForm.instrumentId=a,(a,b,k)=>{console.log(a,b,k)}]},null)]}),e(E,null,{default:()=>[e(U,{justify:"end"},{default:()=>[e(h,{type:"primary",class:"searchBtn",onClick:v},{default:()=>[n("搜索")]}),e(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:m},{default:()=>[n("重置")]})]})]})]})]),e(h,{class:r.addBtn,type:"primary",onClick:()=>t.showaddClass=!0},{default:()=>[n("创建班级")],icon:()=>e(Q,null,[e(z,{class:r.addBtnIcon,previewDisabled:!0,src:De},null)])}),e("div",{class:r.tableWrap},[e(we,{class:r.classTable,loading:t.loading,columns:p(),data:t.tableList},{empty:()=>e(Te,null,null)}),e(Fe,{page:t.pagination.page,"onUpdate:page":a=>t.pagination.page=a,pageSize:t.pagination.rows,"onUpdate:pageSize":a=>t.pagination.rows=a,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":a=>t.pagination.pageTotal=a,onList:s,sync:!0},null)]),e(H,{maskClosable:O,show:t.studentVisible,"onUpdate:show":a=>t.studentVisible=a,preset:"card",class:["modalTitle background",r.studentVisible],title:"学生调整"},{default:()=>[e(Ze,{activeRow:t.activeRow,onClose:()=>t.studentVisible=!1,onGetList:()=>s()},null)]}),e(H,{maskClosable:O,show:t.showaddClass,"onUpdate:show":a=>t.showaddClass=a,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"创建班级"},{default:()=>[e(Me,{gradeYearList:t.popSelectYearList,gradeNumList:t.gradeNumList,classArray:ue,onGetList:()=>s(),onClose:()=>t.showaddClass=!1},null)]}),e(H,{maskClosable:O,show:t.showResetClass,"onUpdate:show":a=>t.showResetClass=a,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[e($e,{activeRow:t.activeRow,onGetList:()=>s(),onClose:()=>t.showResetClass=!1},null)]}),e(H,{maskClosable:O,show:t.showSubjectClass,"onUpdate:show":a=>t.showSubjectClass=a,style:{width:"500px"},preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[t.showSubjectClass?e(Ie,{activeRow:t.activeRow,onGetList:()=>s(),onConfirm:a=>{u.push({path:"/prepare-lessons",query:{...a}})},onClose:()=>t.showSubjectClass=!1},null):null]}),e(Ge,{show:t.previewModal,"onUpdate:show":a=>t.previewModal=a,type:"attend",params:t.previewParams},null),e(H,{maskClosable:O,show:t.removeVisiable,"onUpdate:show":a=>t.removeVisiable=a,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:()=>t.removeVisiable=!1},{default:()=>[n("取消")]})]})])]}),e(H,{maskClosable:O,show:t.groupVisiable,"onUpdate:show":a=>t.groupVisiable=a,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:t.groupBtnLoading,disabled:t.groupBtnLoading},{default:()=>[n("确定")]}),e(h,{round:!0,onClick:()=>t.groupVisiable=!1},{default:()=>[n("取消")]})]})])]}),L.value?e(Ke,null,null):null,t.addStudentVisible?ie(e("div",{"onUpdate:show":a=>t.addStudentVisible=a,class:["n-modal-mask",r.popBox]},[e(tt,{activeRow:t.activeRow,onClose:()=>{t.addStudentVisible=!1}},null)]),[[de,t.addStudentVisible,"show"]]):null])}});export{Ht as default};