1 |
- import{d as W,e as x,b as P,r as f,a5 as ue,q as M,f as e,N as q,g as L,y as A,x as I,j as g,k as u,J,aV as U,n as O,aN as $,aW as ne,w as j,a8 as oe,c as le,u as ie,a as de,ai as ce,aU as pe,l as N,m as V,V as me,aX as ve}from"./index-32ff339b-1743496079034.js";import{s}from"./index.module-eed6ff4d-1743496079034.js";import{S as K}from"./index-c5d2dc80-1743496079034.js";import{C as G}from"./index-80138d53-1743496079034.js";import{P as ge}from"./index-2da90e33-1743496079034.js";import{a as fe,g as se,c as re,b as he,d as ye,u as be,e as Ce,f as we}from"./api-d57212df-1743496079034.js";import{a as Fe}from"./api-70305ea7-1743496079034.js";import{N as Q}from"./Cascader-3026ed48-1743496079034.js";import{N as _}from"./Scrollbar-116ac88a-1743496079034.js";import{g as Le,c as ee}from"./contants-fb27bec1-1743496079034.js";import{a as Ae}from"./add-efe8238e-1743496079034.js";import{T as Se}from"./index-f645f05d-1743496079034.js";import{T as Ee}from"./index-f87b51ab-1743496079034.js";import{P as ke}from"./index-253b7afc-1743496079034.js";import{U as xe}from"./updateSubject-0c396063-1743496079034.js";import{g as De,b as Re}from"./api-eb509253-1743496079034.js";import{i as Be,s as ae}from"./use-async-1a70e441-1743496079034.js";import{s as w}from"./index.module-e80d7fa2-1743496079034.js";import{s as Te,a as Ye,T as je,b as Ie,h as Ge}from"./html2canvas.esm-39c06671-1743496079034.js";import{b as ze}from"./urlUtils-b5855a3c-1743496079034.js";import{u as Ue}from"./catchData-e5072c59-1743496079034.js";import"./index-c8b1d5a7-1743496079034.js";import"./index-1b97ce1c-1743496079034.js";import"./Slider-6d04791b-1743496079034.js";import"./index-f6cdd761-1743496079034.js";import"./icon_default-d1bcaf5f-1743496079034.js";import"./useSpeak-f0fad1e8-1743496079034.js";import"./api-a4f14706-1743496079034.js";import"./icon-pan-16e35a82-1743496079034.js";import"./utils-ca810235-1743496079034.js";import"./index-b35a1314-1743496079034.js";import"./ding-8e9054d5-1743496079034.js";import"./deep-clone-c0d00fc2-1743496079034.js";import"./searchArray-fcbe278d-1743496079034.js";import"./contants-84ba384e-1743496079034.js";import"./index-f30ec7e4-1743496079034.js";import"./index-e2ab6121-1743496079034.js";import"./index-7bfe5f9f-1743496079034.js";import"./index-a098cb7e-1743496079034.js";import"./teacherIcon-b8e3946d-1743496079034.js";import"./index-5f88418a-1743496079034.js";import"./index-c7c26d59-1743496079034.js";const Ne=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(d,{emit:C}){const a=x({uploading:!1}),k=P(),c=f(),r=x({gradeYear:null,currentGradeNum:null,currentClass:null,instrumentId:null}),n=f([]),h=f([]),S=()=>{c.value.validate(async m=>{if(!m){a.uploading=!0;try{await fe({...r}),k.success("新增成功"),C("close"),C("getList"),a.uploading=!1}catch(E){console.log(E)}a.uploading=!1}})},v=async()=>{try{const{data:m}=await Fe({}),E=[{label:m+1,value:m+1},{label:m,value:m}];n.value=E}catch(m){}},p=async()=>{try{const{data:m}=await se({gradeYear:r.gradeYear,currentGradeNum:r.currentGradeNum,currentClass:r.currentClass}),E=m||[];h.value=E}catch(m){}};ue(()=>[r.gradeYear,r.currentGradeNum,r.currentClass],()=>{r.instrumentId=null,p()});const D=f(),y=f();return M(()=>{D.value=d.gradeNumList.filter(m=>m.value),y.value=d.classArray.filter(m=>m.value),v()}),()=>e("div",{class:[s.addClass]},[e(q,{"label-placement":"left",model:r,ref:c},{default:()=>[e(L,{path:"gradeYear",rule:[{required:!0,message:"请选择学年"}]},{default:()=>[e(G,A({style:{width:"400px"},options:n.value,placeholder:"选择学年",clearable:!0},{value:r.gradeYear,"onUpdate:value":m=>r.gradeYear=m}),null)]}),e(L,{path:"currentGradeNum",rule:[{required:!0,message:"请选择年级"}]},{default:()=>[e(G,A({style:{width:"400px"},options:D.value,placeholder:"选择年级",clearable:!0},{value:r.currentGradeNum,"onUpdate:value":m=>r.currentGradeNum=m}),null)]}),e(L,{path:"currentClass",rule:[{required:!0,message:"请选择班级"}]},{default:()=>[e(G,A({style:{width:"400px"},options:y.value,placeholder:"选择班级",clearable:!0},{value:r.currentClass,"onUpdate:value":m=>r.currentClass=m}),null)]}),e(L,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[e(Q,{placeholder:"请选择乐器",value:r.instrumentId,"onUpdate:value":m=>r.instrumentId=m,options:h.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),e(I,{class:s.btnGroup,justify:"center"},{default:()=>[e(g,{round:!0,onClick:()=>C("close")},{default:()=>[u("取消")]}),e(g,{round:!0,loading:a.uploading,onClick:()=>S(),type:"primary"},{default:()=>[u("保存")]})]})])}}),Ve="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 te(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!oe(d)}const We=W({props:{activeRow:{type:Object,default:()=>({id:""})}},name:"RestStudentBox",emits:["close","getList"],setup(d,{emit:C}){const a=P(),k=x({uploading:!1});f([]),f([]),f();const c=f([]);console.log(d.activeRow,"activeRow");const r=x({gradeYear:null,name:"",id:""}),n=f([]),h=f([]),S=f(null),v=f([]),p=f([]),D=f(null),y=f([]),m=async()=>{try{const i=(await re({page:1,rows:9999,upgradeFlag:!0})).data.rows||[],l=[],R=[];if(i.forEach(B=>{const z={label:B.name,key:B.id,gradeYear:B.gradeYear,value:B.id,disabled:B.id==d.activeRow.id};d.activeRow.gradeYear===B.gradeYear?l.push(z):R.push(z)}),c.value=[...l,...R],c.value[0].disabled?c.value.length>1&&(r.name=c.value[1].label,r.id=c.value[1].key,r.gradeYear=c.value[1].gradeYear):(r.name=c.value[0].label,r.id=c.value[0].key,r.gradeYear=c.value[0].gradeYear),r.id){const B=await E(r.id);p.value=B.data.rows.map(z=>({label:z.nickname+"("+z.id+")",value:z.id}))}}catch(o){console.log(o)}},E=async o=>await he({page:1,rows:999,classGroupId:o}),X=async o=>{c.value.forEach(l=>{l.key==o&&(r.name=l.label,r.gradeYear=l.gradeYear,r.id=l.key)});const i=await E(o);p.value=i.data.rows.map(l=>({label:l.nickname+"("+l.id+")",value:l.id})),console.log(y.value,"submitList.value"),p.value=p.value.filter(l=>!y.value.some(R=>R.value===l.value)),y.value.forEach(l=>{l.toClassId==r.id&&(console.log(l.toClassId,l),p.value.push({label:l.label,value:l.value}))})},T=J(()=>(h.value||[]).filter(l=>l.label.indexOf(S.value||"")!=-1)),Y=J(()=>(p.value||[]).filter(l=>l.label.indexOf(D.value||"")!=-1)),Z=()=>{T.value.length===n.value.length?n.value=[]:n.value=T.value.map(o=>o.value)},t=()=>{Y.value.length===v.value.length?v.value=[]:v.value=Y.value.map(o=>o.value)},b=()=>{const o=h.value.filter(i=>n.value.indexOf(i.value)!=-1);if(o.length>0){const i=o.map(l=>({...l,studentId:l.value,toClassId:r.id}));y.value=y.value.filter(l=>!i.some(R=>R.value===l.value)),y.value=y.value.concat(i)}h.value=h.value.filter(i=>!o.some(l=>l.value===i.value)),o.forEach(i=>{p.value.push(i)}),n.value=[]},F=()=>{const o=p.value.filter(i=>v.value.indexOf(i.value)!=-1);if(o.length>0){const i=o.map(l=>({...l,studentId:l.value,toClassId:d.activeRow.id}));y.value=y.value.filter(l=>!i.some(R=>R.value===l.value)),y.value=y.value.concat(i)}p.value=p.value.filter(i=>!o.some(l=>l.value===i.value)),o.forEach(i=>{h.value.push(i)}),v.value=[],console.log(y.value," submitList.value===>")},H=async()=>{if(c.value.length<2){a.error("当前只有一个班级,无法调整");return}if(y.value<1){C("close");return}try{const o=await ye(y.value);C("close"),C("getList")}catch(o){console.log(o)}};return M(async()=>{m();const o=await E(d.activeRow.id);h.value=o.data.rows.map(i=>({label:i.nickname+"("+i.id+")",value:i.id}))}),()=>{let o,i;return e("div",{class:[s.container,s.resetStudentWrap]},[e("div",{class:s.studentTransfer},[e("div",{class:s.studentTransferList},[e("div",{class:s.studentLeft},[e("div",{class:s.listTop},[e("p",null,[d.activeRow.name]),e("span",null,[u("("),d.activeRow.gradeYear,u("学年)")])]),e("div",{class:s.listCore},[e(U,{class:s.chioseCheckAllBox},{default:()=>[e(O,{onUpdateChecked:l=>{Z()},checked:T.value.length===n.value.length,indeterminate:n.value.length>0&&T.value.length!==n.value.length,label:"全选"},null)]}),e(U,null,{default:()=>[e(K,A({placeholder:"请输入学生姓名"},{class:s.searchInput,searchWord:S.value,onChangeValue:l=>S.value=l}),null)]}),e(_,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[e($,{value:n.value,"onUpdate:value":l=>n.value=l},te(o=T.value.map(l=>e(U,{class:s.chioseCheckBox},{default:()=>[e(O,{value:l.value,label:l.label},null)]})))?o:{default:()=>[o]})]})]),e("div",{class:[s.bottomLeft,s.bottom]},[e("div",{class:s.bottomWrap},[u("共"),h.value.length,u("名学生")])])]),e("div",{class:s.chioseBox},[e("div",{class:[s.chioseBtn,s.chioseBtnRight],onClick:()=>b()},null),e("div",{class:s.chioseBtn,onClick:()=>F()},null)]),e("div",{class:s.studentRight},[e("div",{class:s.listTop},[r.id?e(ne,{key:"111",value:r.id,"onUpdate:value":l=>r.id=l,options:c.value,onSelect:l=>{X(l)},renderLabel:l=>e("div",{style:{display:"flex"}},[l.label,e("div",{style:{fontSize:"12Px"}},[u("("),l.gradeYear,u("学年)")])]),scrollable:!0},{default:()=>[e("div",{class:s.showGradeSection},[e("div",null,[r.name,r.gradeYear&&e("span",null,[u("("),r.gradeYear,u("学年)")])]),e(j,{class:s.smallArrow,src:Ve,previewDisabled:!0},null)])]}):null]),e("div",{class:s.listCore},[e(U,{class:s.chioseCheckAllBox},{default:()=>[e(O,{onUpdateChecked:l=>{t()},checked:Y.value.length===v.value.length,indeterminate:v.value.length>0&&Y.value.length!==v.value.length,label:"全选"},null)]}),e(U,null,{default:()=>[e(K,A({placeholder:"请输入学生姓名"},{class:s.searchInput,searchWord:D.value,onChangeValue:l=>D.value=l}),null)]}),e(_,{style:"max-height: 204px;min-height: 204px;margin-top:14px;"},{default:()=>[e($,{value:v.value,"onUpdate:value":l=>v.value=l},te(i=Y.value.map(l=>e(U,{class:s.chioseCheckBox},{default:()=>[e(O,{value:l.value,label:l.label},null)]})))?i:{default:()=>[i]})]})]),e("div",{class:[s.bottomRight,s.bottom]},[e("div",{class:s.bottomWrap},[u("共"),p.value.length,u("名学生")])])])])]),e(I,{class:s.btnGroup,justify:"center"},{default:()=>[e(g,{round:!0,onClick:()=>C("close")},{default:()=>[u("取消")]}),e(g,{round:!0,loading:k.uploading,type:"primary",onClick:()=>{H()}},{default:()=>[u("保存")]})]})])}}}),Pe=W({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(d,{emit:C}){const a=x({uploading:!1}),k=P(),c=f(),r=f([]),n=x({currentGradeNum:null,gradeYear:null,currentClass:null,instrumentId:null,id:null});M(()=>{n.currentGradeNum=d.activeRow.currentGradeNum,n.gradeYear=d.activeRow.gradeYear,n.currentClass=d.activeRow.currentClass,n.instrumentId=d.activeRow.instrumentId,n.id=d.activeRow.id,S()});const h=()=>{c.value.validate(async v=>{if(!v){a.uploading=!0;try{await be({...n}),k.success("修改成功"),C("close"),C("getList"),a.uploading=!1}catch(p){console.log(p)}a.uploading=!1}})},S=async()=>{try{const{data:v}=await se({gradeYear:n.gradeYear,currentGradeNum:n.currentGradeNum,currentClass:n.currentClass}),p=v||[];r.value=p}catch(v){}};return()=>e("div",{class:[s.addClass]},[e(q,{"label-placement":"left",model:n,ref:c},{default:()=>[e(L,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[e(Q,{placeholder:"请选择乐器",value:n.instrumentId,"onUpdate:value":v=>n.instrumentId=v,options:r.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),e(I,{class:s.btnGroup,justify:"center"},{default:()=>[e(g,{round:!0,onClick:()=>C("close")},{default:()=>[u("取消")]}),e(g,{round:!0,loading:a.uploading,onClick:()=>h(),type:"primary"},{default:()=>[u("保存")]})]})])}}),He="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/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qpwAc7et+VPc11jTrt+625833/B6cxX3f9A2W2SfGHll/sPmdj2EB3pDFOCySNm2D1b4Yb2tn8zefwkKRlLKV7QgHBZs1Gx3p/77mI1gsbiVxF8MKX2dZSqyyfHY0zsje61nzL3/+glWCa0mcXANYKwtLpSqrEQ7P9zhjmbuJcfMpH2awAcbDiswScgbbYFlSKUVVYOmuGTdk3X3IJxmDDd35pSAfXPgdNhfkt/Q7CQ8FeXMIk5/0lgdA/q9fBlCU9WQqZ/4AAAAASUVORK5CYII=",Oe=""+new URL("strudentCore-ce06266f.png",import.meta.url).href,Me=W({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(d,{emit:C}){x({uploading:!1}),P();const a=le();f();const k=f(ze()+"/classroom-app/#/register-new?sId=".concat(d.activeRow.id,"&gy=").concat(d.activeRow.gradeYear,"&ci=").concat(d.activeRow.classId,"&cgn=").concat(d.activeRow.currentGradeNum,"&cc=").concat(d.activeRow.currentClass,"&t=").concat(+new Date)),c=x({saveLoading:!1,image:null,shareLoading:!1}),r=()=>{if(!c.saveLoading)if(c.saveLoading=!0,c.image)n();else{const h=document.getElementById("preview-container");Ge(h,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async S=>{const v=S.toDataURL("image/png");c.image=v,n()}).catch(()=>{c.saveLoading=!1})}},n=async()=>{setTimeout(()=>{c.saveLoading=!1},100);const h=document.createElement("a");h.setAttribute("download","报名图片.png"),h.href=c.image,h.click()};return()=>e("div",{class:[w.addStudentWrap]},[e("div",{onClick:()=>{C("close")}},[e(j,{src:Te,previewDisabled:!0,class:w.studentCLose},null)]),e(j,{previewDisabled:!0,class:w.stunentStart,src:Ye},null),e(j,{class:w.addTitle,previewDisabled:!0,src:He},null),e("div",{class:w.addStudentInfo,id:"preview-container"},[e(j,{class:w.studentInfoBg,previewDisabled:!0,src:Oe},null),e("div",{class:w.studentCore},[e("img",{alt:"img",crossorigin:"anonymous",class:w.schoolLogo,src:a.getUserInfo.schoolInfos[0].logo+"?some=".concat(new Date().getTime())},null),e("div",{class:w.studentCoreInfo},[e("h2",null,[a.getUserInfo.schoolInfos[0].name]),e("p",{class:w.studentCoreInfoSubtitle},[e("span",null,[u("报名注册")])]),e("div",{class:w.codewrap},[e(je,{margin:0,text:k.value,size:119},null)]),e("div",{class:w.codewrapSubmit},[e(j,{previewDisabled:!0,src:Ie},null),u("请使用微信扫码")])])])]),e("div",{class:w.studentBottom},[e("p",null,[u("请将二维码图片发送给学生家长,扫码完成报名")]),e("div",{class:w.downBtn,onClick:r},[u("下载图片")])])])}}),ja=W({name:"class-classList",setup(){const d=Ue(),C=le(),a=x({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}),k=f(),c=P(),r=ie(),n=de(),h=()=>{a.pagination.page=1,p(),ae({current:a.searchForm,saveKey:n.path})};a.gradeNumList=Le();const S=()=>{a.searchForm={keyword:null,currentClass:"",currentGradeNum:"",instrumentId:"",gradeYear:"",gradeLevel:""},a.popSelectYearList.length>1&&(a.searchForm.gradeYear=a.popSelectYearList[1].id),a.pagination.page=1,p(),ae({current:a.searchForm,saveKey:n.path})},v=async()=>{try{await Ce({ids:a.removeRow.id}),p(),c.success("删除成功"),a.removeVisiable=!1}catch(t){console.log(t)}},p=async()=>{a.loading=!0;try{const t=await re({...a.searchForm,...a.pagination});a.tableList=t.data.rows,a.pagination.pageTotal=t.data.total,a.loading=!1}catch(t){a.loading=!1,console.log(t)}},D=()=>[{title:"班级名称",key:"name"},{title:"学年",key:"gradeYear"},{title:"学级",key:"gradeLevel",render(t){return t.gradeLevel?"".concat(t.gradeLevel,"级"):""}},{title:"班级乐器",key:"instrumentName",render(t){return t.instrumentName||"--"}},{title:"学生人数",key:"preStudentNum"},{title:"上次学习",key:"lastStudy",width:"20%",render(t){return t.lastStudy?e(Ee,{maxWidth:300,showContentWidth:300,content:t.lastStudy},null):"--"}},{title:"操作",key:"id",render(t,b){return e("div",null,[e(I,null,{default:()=>[b==0?e("div",{id:"class-0"},[e(g,{type:"primary",text:!0,onClick:()=>{r.push({path:"/classDetail",query:{name:t.name,id:t.id,gradeYear:t.gradeYear,upgradeFlag:t.upgradeFlag?1:0}})}},{default:()=>[u("详情")]})]):e(g,{type:"primary",text:!0,onClick:()=>{r.push({path:"/classDetail",query:{name:t.name,id:t.id,gradeYear:t.gradeYear,upgradeFlag:t.upgradeFlag?1:0}})}},{default:()=>[u("详情")]}),e(g,{type:"primary",disabled:!t.upgradeFlag||t.instrumentId,text:!0,onClick:()=>E(t)},{default:()=>[u("修改乐器")]}),b==0?e(g,A({type:"primary",disabled:!t.upgradeFlag},{id:"class-1"},{text:!0,onClick:()=>{y(t)}}),{default:()=>[u("学生调整")]}):e(g,{type:"primary",disabled:!t.upgradeFlag,text:!0,onClick:()=>{y(t)}},{default:()=>[u("学生调整")]}),b==0?e(g,A({id:"class-2"},{disabled:!t.upgradeFlag,type:"primary",text:!0,onClick:()=>m(t)}),{default:()=>[u("开始上课")]}):e(g,{disabled:!t.upgradeFlag,type:"primary",text:!0,onClick:()=>m(t)},{default:()=>[u("开始上课")]}),t.preStudentNum>0?null:e(g,{type:"error",color:"#EA4132",textColor:"#EA4132",text:!0,onClick:()=>{a.removeVisiable=!0,a.removeRow=t}},{default:()=>[u("删除")]}),t.imGroupId?null:e(g,{type:"primary",disabled:!t.upgradeFlag,text:!0,onClick:()=>{X(t)}},{default:()=>[u("创建群聊")]}),e(g,{type:"primary",disabled:!t.upgradeFlag,text:!0,onClick:()=>{const{schoolInfos:F}=C.getUserInfo,H=F.length>0?F[0].id:null;H&&(a.addStudentVisible=!0,a.activeRow={id:H,classId:t.id,currentGradeNum:t.currentGradeNum,currentClass:t.currentClass,gradeYear:t.gradeYear})}},{default:()=>[u("邀请学生")]})]})])}}],y=t=>{a.activeRow=t,a.studentVisible=!0},m=async t=>{try{t.instrumentId?r.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)}},E=t=>{a.activeRow=t,a.showResetClass=!0},X=async t=>{a.activeRow=t,a.groupVisiable=!0},T=async()=>{console.log(a.activeRow,"row"),a.groupBtnLoading=!0;try{await we({classGroupId:a.activeRow.id}),c.success("创建成功"),a.groupVisiable=!1,await p()}catch(t){console.log(t)}a.groupBtnLoading=!1},Y=async()=>{try{const{data:t}=await De(),b=t||[];b.forEach(F=>{F.name=F.name+"学年"}),a.popSelectYearList=b||[],b.length>1&&!a.searchForm.gradeYear&&(a.searchForm.gradeYear=b[1].id)}catch(t){}},Z=async()=>{try{const{data:t}=await Re(),b=t||[];b.forEach(F=>{F.name=F.name+"级"}),b.unshift({id:"",name:"全部学级"}),a.popSelectLevelList=b||[],b.length>0&&!a.searchForm.gradeLevel&&(a.searchForm.gradeLevel=b[0].id)}catch(t){}};return Be({current:a.searchForm,callBack:t=>{a.searchForm=t}}),M(async()=>{a.loading=!0,await d.getSubjects(),await Y(),await Z(),await p(),a.loading=!1}),()=>e("div",{class:s.listWrap},[e("div",{class:s.searchList},[e(q,{"label-placement":"left",inline:!0,ref:k},{default:()=>[e(L,null,{default:()=>[e(K,A({placeholder:"请输入班级名称"},{class:s.searchInput,searchWord:a.searchForm.keyword,onChangeValue:t=>a.searchForm.keyword=t}),null)]}),e(L,null,{default:()=>[e(G,A({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(L,null,{default:()=>[e(G,A({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(L,null,{default:()=>[e(G,A({options:a.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:a.searchForm.currentGradeNum,"onUpdate:value":t=>a.searchForm.currentGradeNum=t}),null)]}),e(L,null,{default:()=>[e(G,A({options:ee,placeholder:"选择班级",clearable:!0,inline:!0},{value:a.searchForm.currentClass,"onUpdate:value":t=>a.searchForm.currentClass=t}),null)]}),e(L,null,{default:()=>[e(Q,{to:"body",placeholder:"选择乐器",options:[{value:"",label:"全部乐器"},...d.getSubjectList],childrenField:"instruments",checkStrategy:"child",expandTrigger:"hover",showPath:!1,value:a.searchForm.instrumentId,"onUpdate:value":[t=>a.searchForm.instrumentId=t,(t,b,F)=>{console.log(t,b,F)}]},null)]}),e(L,null,{default:()=>[e(I,{justify:"end"},{default:()=>[e(g,{type:"primary",class:"searchBtn",onClick:h},{default:()=>[u("搜索")]}),e(g,{type:"primary",ghost:!0,class:"resetBtn",onClick:S},{default:()=>[u("重置")]})]})]})]})]),e(g,{class:s.addBtn,type:"primary",onClick:()=>a.showaddClass=!0},{default:()=>[u("创建班级")],icon:()=>e(ce,null,[e(j,{class:s.addBtnIcon,previewDisabled:!0,src:Ae},null)])}),e("div",{class:s.tableWrap},[e(pe,{class:s.classTable,loading:a.loading,columns:D(),data:a.tableList},{empty:()=>e(Se,null,null)}),e(ge,{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:p,sync:!0},null)]),e(N,{maskClosable:V,show:a.studentVisible,"onUpdate:show":t=>a.studentVisible=t,preset:"card",class:["modalTitle background",s.studentVisible],title:"学生调整"},{default:()=>[e(We,{activeRow:a.activeRow,onClose:()=>a.studentVisible=!1,onGetList:()=>p()},null)]}),e(N,{maskClosable:V,show:a.showaddClass,"onUpdate:show":t=>a.showaddClass=t,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"创建班级"},{default:()=>[e(Ne,{gradeYearList:a.popSelectYearList,gradeNumList:a.gradeNumList,classArray:ee,onGetList:()=>p(),onClose:()=>a.showaddClass=!1},null)]}),e(N,{maskClosable:V,show:a.showResetClass,"onUpdate:show":t=>a.showResetClass=t,style:{width:"500px"},"display-directive":"if",preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[e(Pe,{activeRow:a.activeRow,onGetList:()=>p(),onClose:()=>a.showResetClass=!1},null)]}),e(N,{maskClosable:V,show:a.showSubjectClass,"onUpdate:show":t=>a.showSubjectClass=t,style:{width:"500px"},preset:"card",class:["modalTitle background"],title:"修改乐器"},{default:()=>[a.showSubjectClass?e(xe,{activeRow:a.activeRow,onGetList:()=>p(),onConfirm:t=>{r.push({path:"/prepare-lessons",query:{...t}})},onClose:()=>a.showSubjectClass=!1},null):null]}),e(ke,{show:a.previewModal,"onUpdate:show":t=>a.previewModal=t,type:"attend",params:a.previewParams},null),e(N,{maskClosable:V,show:a.removeVisiable,"onUpdate:show":t=>a.removeVisiable=t,preset:"card",class:["modalTitle",s.removeVisiable],title:"删除班级"},{default:()=>[e("div",{class:s.studentRemove},[e("p",null,[u("确定要删除班级么?"),e("span",null,[u("删除班级信息将会清空")])]),e(I,{class:s.btnGroup,justify:"center"},{default:()=>[e(g,{round:!0,type:"primary",onClick:v},{default:()=>[u("确定")]}),e(g,{round:!0,onClick:()=>a.removeVisiable=!1},{default:()=>[u("取消")]})]})])]}),e(N,{maskClosable:V,show:a.groupVisiable,"onUpdate:show":t=>a.groupVisiable=t,preset:"card",class:["modalTitle",s.removeVisiable],title:"创建群聊"},{default:()=>[e("div",{class:s.studentRemove},[e("p",{style:{textAlign:"center"}},[u("是否创建班级群聊")]),e(I,{class:s.btnGroup,justify:"center"},{default:()=>[e(g,{round:!0,type:"primary",onClick:T,loading:a.groupBtnLoading,disabled:a.groupBtnLoading},{default:()=>[u("确定")]}),e(g,{round:!0,onClick:()=>a.groupVisiable=!1},{default:()=>[u("取消")]})]})])]}),a.addStudentVisible?me(e("div",{"onUpdate:show":t=>a.addStudentVisible=t,class:["n-modal-mask",s.popBox],style:{zIndex:"100001"}},[e(Me,{activeRow:a.activeRow,onClose:()=>{a.addStudentVisible=!1}},null)]),[[ve,a.addStudentVisible,"show"]]):null])}});export{ja as default};
|