import{s as p,F as _e}from"./forgotPassword-4c9df83a-1734950731618.js";import{d as Be}from"./teacherIcon-b8e3946d-1734950731618.js";import{d as M,b as j,c as q,e as E,r as S,q as z,f as e,w as x,k as i,aX as ie,N as J,aB as Te,aC as V,g as T,h as $,I as Ee,x as R,j as I,S as ke,l as G,m as O,aY as Fe,aZ as Se,a_ as be,Z as ce,a$ as Le,$ as B,C as U,T as xe,a0 as ye,a1 as ve,F as W,y as pe,aG as Ae,X as De,a as Re,A as Me,t as Ne,v as fe}from"./index-efb66432-1734950731618.js";import{U as Ce}from"./index-ff431115-1734950731618.js";import{b as we,c as Ue,a as $e,u as qe,d as Pe,e as Ve,f as Ge}from"./api-50208da3-1734950731618.js";import{t as Ie}from"./contants-84ba384e-1734950731618.js";import{N as K}from"./Cascader-500c8137-1734950731618.js";import{s as Oe,a as je,T as He,b as We,h as ze}from"./html2canvas.esm-840e8c9e-1734950731618.js";import{g as ge,s as F}from"./index-db345329-1734950731618.js";import{s as he}from"./api-d3492aaa-1734950731618.js";import{T as Je}from"./index-043f1db0-1734950731618.js";import{T as me}from"./index-ef2cd44a-1734950731618.js";import"./api-14703b96-1734950731618.js";import"./sendSms-c75679c1-1734950731618.js";const Ke=""+new URL("headerD-220e6507.png",import.meta.url).href,Qe=M({name:"setting-personInfo",setup(){var v,C,y,l;const k=j(),r=q(),o=E({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),n=S(),s=E({provinceCode:r.info.provinceCode,cityCode:r.info.cityCode,regionCode:r.info.regionCode,nickname:r.info.nickname,phone:r.info.phone,gender:r.info.gender,schoolId:(C=(v=r.info.schoolInfos)==null?void 0:v[0])==null?void 0:C.id,tenantId:(l=(y=r.info.schoolInfos)==null?void 0:y[0])==null?void 0:l.tenantId,id:r.info.id,avatar:r.info.avatar}),t=E({disabled:!0,openChangePwd:!1,uploadShow:!0,loading:!1,oldTecherform:{}}),b=async()=>{const u=await we();(u==null?void 0:u.code)===200&&(o.areaList=u.data)};z(()=>{b()});const f=()=>{n.value.validate(async u=>{if(!u){if(!s.provinceCode||!s.cityCode){k.error("请选择城区");return}await ie(s),console.log(s),r.getInfo(),t.disabled=!0,k.success("修改成功")}})};return()=>{var u,h;return e("div",{class:p.infoWrap},[e("div",{class:p.teacherInfoWrap},[e("div",{class:p.teacherHeadWrap},[e(x,{previewDisabled:!0,class:p.headerD,src:Ke},null),e(x,{previewDisabled:!0,class:p.defultHeade,src:s.avatar||Be},null),e("div",{class:[p.defultHeade,p.changeHead,p.hoverNone]},[i("修改头像"),t.uploadShow&&e(Ce,{class:[p.uploadFile],cropper:!0,"onUpdate:fileList":async d=>{s.avatar=d,t.uploadShow=!1,setTimeout(()=>{t.uploadShow=!0},100),await ie(s),console.log(s),r.getInfo()}},null)])]),e("div",{class:p.headerInfo},[e("p",{class:p.headerTitle},[r.info.nickname,r.info.teacherJobType&&e("span",{class:p.roleType},[Ie[r.info.teacherJobType]])]),e("p",{class:p.headerSubTitle},[(h=(u=r.info.schoolInfos)==null?void 0:u[0])==null?void 0:h.name])])]),e("div",{class:p.setInfo},[e(J,{ref:n,model:s,disabled:t.disabled},{default:()=>[e(Te,{cols:3,"x-gap":"100"},{default:()=>[e(V,null,{default:()=>[e(T,{label:"姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[e($,{maxlength:14,bordered:!t.disabled,placeholder:"请填写老师姓名",value:s.nickname,"onUpdate:value":d=>s.nickname=d},null)]})]}),e(V,null,{default:()=>[e(T,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写老师手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[e($,{bordered:!t.disabled,placeholder:"请填写老师手机号",value:s.phone,"onUpdate:value":d=>s.phone=d},null)]})]}),e(V,null,{default:()=>[e(T,{label:"性别",path:"gender",rule:[{required:!0,type:"number",message:"请选择性别",trigger:"blur"}]},{default:()=>[e(Ee,{bordered:!t.disabled,class:p.select,showArrow:!t.disabled,placeholder:"请选择性别",options:o.sexs,value:s.gender,"onUpdate:value":d=>s.gender=d},null)]})]}),e(V,null,{default:()=>[e(T,{label:"城区",path:"provinceCode",rule:{required:!0,type:"number",message:"请选择城区",trigger:"change"}},{default:()=>[!t.loading&&e(K,{bordered:!t.disabled,options:o.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:r.info.regionCode||r.info.cityCode||r.info.provinceCode,"onUpdate:value":(d,w,g)=>{var _,A,D;s.provinceCode=(_=g[0])==null?void 0:_.code,s.cityCode=(A=g[1])==null?void 0:A.code,s.regionCode=(D=g[2])==null?void 0:D.code}},null)]})]})]})]})]),t.disabled?e(R,{class:p.btnList,align:"center",justify:"end"},{default:()=>[e(I,{class:p.btn,color:"#198cfe",onClick:()=>t.openChangePwd=!0},{default:()=>[i("修改密码")]}),e(I,{class:p.btn,color:"#f24433",onClick:()=>{t.oldTecherform=Object.assign({},s),t.disabled=!1}},{default:()=>[i("修改信息")]})]}):e(R,{class:p.btnList,align:"center",justify:"end"},{default:()=>[e(I,{class:p.btn,onClick:()=>{var d;t.loading=!0,r.getInfo(),(d=n.value)==null||d.restoreValidation(),t.disabled=!0,Object.assign(s,t.oldTecherform),ke(()=>{t.loading=!1})}},{default:()=>[i("取消")]}),e(I,{class:p.btn,type:"primary",onClick:()=>f()},{default:()=>[i("完成")]})]}),e(G,{maskClosable:O,class:p.changePwdModal,show:t.openChangePwd,"onUpdate:show":d=>t.openChangePwd=d,preset:"dialog",showIcon:!1,title:"修改密码"},{default:()=>[e(_e,{phone:r.info.phone,onClose:()=>{t.openChangePwd=!1}},null)]})])}}}),Xe="_logo_1yh2l_1",Ze="_changeHead_1yh2l_12",Ye="_uploadFile_1yh2l_33",et="_formWrap_1yh2l_41",tt="_schoolInfo_1yh2l_71",at="_errorBtn_1yh2l_77",ot="_removeVisiable1_1yh2l_80",st="_btnGroupModal_1yh2l_83",nt="_addTeacher_1yh2l_90",lt="_btnList_1yh2l_153",ut="_btn_1yh2l_83",rt="_addStudentWrap_1yh2l_164",dt="_studentCLose_1yh2l_170",it="_stunentStart_1yh2l_179",ct="_addTitle_1yh2l_190",pt="_addTeacherTitle_1yh2l_204",ft="_addStudentInfo_1yh2l_211",gt="_studentInfoBg_1yh2l_219",ht="_studentCore_1yh2l_230",mt="_schoolLogo_1yh2l_244",bt="_studentCoreInfo_1yh2l_255",yt="_studentCoreInfoSubtitle_1yh2l_277",vt="_codewrap_1yh2l_286",Ct="_codewrapBg_1yh2l_296",wt="_codewrapSubmit_1yh2l_303",It="_studentBottom_1yh2l_323",_t="_downBtn_1yh2l_338",c={logo:Xe,changeHead:Ze,uploadFile:Ye,formWrap:et,schoolInfo:tt,errorBtn:at,removeVisiable1:ot,btnGroupModal:st,addTeacher:nt,btnList:lt,btn:ut,addStudentWrap:rt,studentCLose:dt,stunentStart:it,addTitle:ct,addTeacherTitle:pt,addStudentInfo:ft,studentInfoBg:gt,studentCore:ht,schoolLogo:mt,studentCoreInfo:bt,studentCoreInfoSubtitle:yt,codewrap:vt,codewrapBg:Ct,codewrapSubmit:wt,studentBottom:It,downBtn:_t},Bt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Tt=be("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null,-1),Et=be("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null,-1),kt=[Tt,Et],Ft=M({name:"Add",render:function(r,o){return Fe(),Se("svg",Bt,kt)}}),St=M({name:"teacher-operation",emits:["close"],props:{areaList:{type:Array,default:()=>[]}},setup(k,{emit:r}){var v,C,y,l;const o=q(),n=E({provinceCode:"",cityCode:"",regionCode:"",tenantId:(C=(v=o.info.schoolInfos)==null?void 0:v[0])==null?void 0:C.tenantId,phone:null,schoolId:(l=(y=o.info.schoolInfos)==null?void 0:y[0])==null?void 0:l.id,nickname:null,gender:1}),s=S(!1),t=S(),b=j(),f=async()=>{t.value.validate(async u=>{if(!u){try{s.value=!0,await Ue({...n}),b.success("添加成功")}catch(h){console.log(h)}setTimeout(()=>{s.value=!1,r("close")},100)}})};return()=>e("div",null,[e(J,{model:n,ref:t,showRequireMark:!1,"label-placement":"left","label-width":"126"},{default:()=>[e(T,{label:"老师姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[e($,{value:n.nickname,"onUpdate:value":u=>n.nickname=u,placeholder:"请输入老师姓名",clearable:!0,maxlength:14},null)]}),e(T,{label:"老师性别",path:"gender",rule:[{required:!0,message:"请选择老师性别"}]},{default:()=>[e(R,null,{default:()=>[e(ce("n-button"),{class:"genderBtn",type:n.gender?"info":void 0,tertiary:!n.gender,onClick:()=>{n.gender=1}},{default:()=>[i("男")]}),e(ce("n-button"),{class:"genderBtn",type:n.gender?void 0:"info",tertiary:!!n.gender,onClick:()=>{n.gender=0}},{default:()=>[i("女")]})]})]}),e(T,{label:"城区",path:"provinceCode",rule:[{required:!0,message:"请选择城区",trigger:"change"}]},{default:()=>[e(K,{to:"body",placeholder:"请选择城区",options:k.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover","onUpdate:value":(u,h,d)=>{var w,g,_;n.provinceCode=((w=d[0])==null?void 0:w.code)+"",n.cityCode=(g=d[1])==null?void 0:g.code,n.regionCode=(_=d[2])==null?void 0:_.code}},null)]}),e(T,{label:"手机号",path:"phone",rule:[{required:!0,message:"请输入正确的手机号码",trigger:"blur"},{pattern:/^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/,message:"请输入正确的手机号",trigger:"blur"}]},{default:()=>[e($,{maxlength:11,value:n.phone,"onUpdate:value":u=>n.phone=u,placeholder:"请输入手机号",clearable:!0},null)]}),e("div",{class:"nalert"},[e(Le,{type:"error",showIcon:!1,bordered:!1},{default:()=>[i("默认密码为yyszkt+手机号后四位")]})])]}),e(R,{style:{padding:"20px 0 32px 0"},justify:"center"},{default:()=>[e(I,{class:"actionBtn",round:!0,type:"default",onClick:()=>r("close")},{default:()=>[i("取消")]}),e(I,{class:"actionBtn",round:!0,type:"primary",onClick:()=>f(),loading:s.value},{default:()=>[i("确定")]})]})])}}),Lt=""+new URL("studentTitle-beff5468.png",import.meta.url).href,xt=""+new URL("teacherCore-bd5dba6c.png",import.meta.url).href,At=M({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(k,{emit:r}){var v,C,y,l,u,h;E({uploading:!1}),j();const o=q();S();const n="tenantId=".concat((C=(v=o.info.schoolInfos)==null?void 0:v[0])==null?void 0:C.tenantId,"&schoolId=").concat((l=(y=o.info.schoolInfos)==null?void 0:y[0])==null?void 0:l.id,"&schoolName=").concat((h=(u=o.info.schoolInfos)==null?void 0:u[0])==null?void 0:h.name),s="".concat(location.origin,"/classroom-app/#/teaher-register?")+n,t=E({saveLoading:!1,image:null,shareLoading:!1}),b=()=>{if(!t.saveLoading)if(t.saveLoading=!0,t.image)f();else{const d=document.getElementById("preview-container");ze(d,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async w=>{const g=w.toDataURL("image/png");console.log(g,"url===>"),t.image=g,f()}).catch(()=>{console.log("生成图片失败url===>"),t.saveLoading=!1})}},f=async()=>{setTimeout(()=>{t.saveLoading=!1},100);const d=document.createElement("a");d.setAttribute("download","新增老师.png"),d.href=t.image,d.click()};return()=>e("div",{class:[c.addStudentWrap]},[e("div",{onClick:()=>{console.log("点击"),r("close")}},[e(x,{src:Oe,previewDisabled:!0,class:c.studentCLose},null)]),e(x,{previewDisabled:!0,class:c.stunentStart,src:je},null),e(x,{class:[c.addTitle,c.addTeacherTitle],previewDisabled:!0,src:Lt},null),e("div",{class:c.addStudentInfo,id:"preview-container"},[e(x,{class:c.studentInfoBg,previewDisabled:!0,src:xt},null),e("div",{class:c.studentCore},[e("img",{alt:"img",crossorigin:"anonymous",class:c.schoolLogo,src:o.getUserInfo.schoolInfos[0].logo+"?some=".concat(new Date().getTime())},null),e("div",{class:c.studentCoreInfo},[e("h2",null,[o.getUserInfo.schoolInfos[0].name]),e("p",{class:c.studentCoreInfoSubtitle},[i("邀请您成为"),e("span",null,[i("音乐数字课堂老师")])]),e("div",{class:c.codewrap},[e(He,{margin:0,text:s,size:119},null)]),e("div",{class:c.codewrapSubmit},[e(x,{previewDisabled:!0,src:We},null),i("请扫描上方二维码 "),e("span",null,[i("完成注册")])," "])])])]),e("div",{class:c.studentBottom},[e("p",null,[i("请将二维码图片发送给老师,扫码完成注册")]),e("div",{class:c.downBtn,onClick:b},[i("下载图片")])])])}}),Dt=M({name:"teacher-guide",emits:["close"],setup(k,{emit:r}){const o=E({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:ge("teacher1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:B(-4),left:B(-75),width:B(472),height:B(230)},btnsStyle:{bottom:B(30),left:B(-84)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}},{ele:"",img:ge("teacher2.png"),imgStyle:{top:B(-4),left:B(-142),width:B(559),height:B(230)},btnsStyle:{bottom:B(30),left:B(-154)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}}],step:0}),n=S(!1),s=S({});(async()=>{try{const l=localStorage.getItem("teacher-guideInfo");l?s.value=JSON.parse(l)||null:s.value={},s.value&&s.value.teacherGuide?n.value=!1:n.value=!0}catch(l){console.log(l)}})();const b=()=>{var u,h,d,w;const l=document.getElementById("teacher-".concat(o.step));if(l){const g=l.getBoundingClientRect(),_=((u=o.steps[o.step].eleRectPadding)==null?void 0:u.left)||0,A=((h=o.steps[o.step].eleRectPadding)==null?void 0:h.top)||0,D=((d=o.steps[o.step].eleRectPadding)==null?void 0:d.width)||0,P=((w=o.steps[o.step].eleRectPadding)==null?void 0:w.height)||0;o.box={left:g.x-_+"px",top:g.y-A+"px",width:g.width+D+"px",height:g.height+P+"px"}}else C()},f=async l=>{try{if(l!=="base-setting")return;s.value?s.value.teacherGuide=!1:s.value={teacherGuide:!1};try{he({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(s.value)})}catch(u){console.log(u)}o.step=0,b(),n.value=!0}catch(u){}};z(()=>{b(),window.addEventListener("resize",v),U.on("teacher-guideInfo",f)});const v=()=>{b()};xe(()=>{window.removeEventListener("resize",v),U.off("teacher-guideInfo",f)});const C=()=>{if(o.step>=4){y();return}o.step=o.step+1,b()},y=async()=>{s.value?s.value.teacherGuide=!0:s.value={teacherGuide:!0};try{he({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(s.value)})}catch(l){console.log(l)}n.value=!1};return()=>e(W,null,[n.value?ye(e("div",{"onUpdate:show":l=>n.value=l,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:F.content,onClick:()=>C()},[e("div",{class:F.backBtn,onClick:l=>{l.stopPropagation(),y()}},[i("跳过")]),e("div",{class:F.box,style:{...o.box,...o.steps[o.step].boxStyle},id:"modeType-".concat(o.step)},[o.steps.map((l,u)=>{var h,d,w,g;return e("div",{onClick:_=>_.stopPropagation(),class:F.item,style:l.type=="bottom"?{display:u===o.step?"":"none",left:"".concat((h=l.eleRect)==null?void 0:h.left,"px"),top:"-".concat((d=l.imgStyle)==null?void 0:d.height)}:{display:u===o.step?"":"none",left:"".concat((w=l.eleRect)==null?void 0:w.left,"px"),top:"".concat((g=o.box)==null?void 0:g.height)}},[e("img",{class:F.img,style:l.imgStyle,src:l.img},null),e("div",{class:F.btns,style:l.btnsStyle},[o.step+1==o.steps.length?e(W,null,[e("div",{class:[F.endBtn],onClick:()=>y()},[i("完成")]),e("div",{class:F.nextBtn,onClick:()=>{o.step=0,b()}},[i("再看一遍")])]):e("div",{class:F.btn,onClick:()=>C()},[i("下一步 ("),o.step+1,i("/"),o.steps.length,i(")")])])])})])])]),[[ve,n.value,"show"]]):null])}}),Rt=M({name:"school-info",emits:["changeTab"],setup(k,{emit:r}){var A,D,P,Q,X,Z,Y,ee,te,ae,oe,se;const o=q(),n=E({areaList:[]}),s=E({name:(D=(A=o.info.schoolInfos)==null?void 0:A[0])==null?void 0:D.name,schoolId:(Q=(P=o.info.schoolInfos)==null?void 0:P[0])==null?void 0:Q.id,userId:o.info.id,logo:((Z=(X=o.info.schoolInfos)==null?void 0:X[0])==null?void 0:Z.logo)||o.info.avatar,provinceCode:((ee=(Y=o.info.schoolInfos)==null?void 0:Y[0])==null?void 0:ee.provinceCode)||"",cityCode:((ae=(te=o.info.schoolInfos)==null?void 0:te[0])==null?void 0:ae.cityCode)||"",regionCode:((se=(oe=o.info.schoolInfos)==null?void 0:oe[0])==null?void 0:se.regionCode)||""}),t=E({loading:!1,schoolLoading:!0,dataList:[],disabled:!0,changeVisiable:!1,messageLoading:!1,resetVisiable:!1,resetLoading:!1,resetMessage:"",resetMessageType:"reset",activeRow:{},modal:!1,qrModal:!1,oldTecherform:{},oldLoading:!1}),b=S(!1),f=()=>[{title:"老师姓名",key:"nickname",width:"15%",render:a=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>_(a.nickname)},[a.nickname])},{title:"角色",key:"jobType",width:"15%",render:a=>Ie[a.jobType]},{title:"手机号码",key:"phone",width:"15%",render:a=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>_(a.phone)},[a.phone])},{title:"性别",key:"questionTypeCode",width:"15%",render:a=>e("div",null,[a.gender?"男":"女"])},{title:"状态",key:"statusName",width:"15%",render:a=>e("div",null,[a.status==="ACTIVATION"?e(I,{text:!0},{default:()=>[i("启用")]}):e(I,{class:c.errorBtn,text:!0},{default:()=>[i("冻结")]})])},{title:"操作",key:"titleImg",width:"25%",render:a=>e(R,null,{default:()=>[e(I,{type:"primary",text:!0,disabled:a.id!==o.info.id&&v(a),onClick:()=>{t.resetMessage='重置"'.concat(a.nickname,'"的密码,是否继续?'),t.resetVisiable=!0,t.resetMessageType="reset",t.activeRow=a}},{default:()=>[i("重置密码")]}),a.status==="ACTIVATION"?e(W,null,[e(I,{disabled:a.id===o.info.id||v(a),type:"primary",text:!0,onClick:()=>h(a)},{default:()=>[i("冻结")]}),o.info.isSuperAdmin&&!a.manageAdmin&&e(I,{type:"primary",text:!0,onClick:()=>{t.changeVisiable=!0,t.activeRow=a}},{default:()=>[i("转交管理")]})]):e(I,{class:c.errorBtn,text:!0,onClick:()=>h(a)},{default:()=>[i("解冻")]})]})}],v=(a,m)=>!!(o.info.teacherJobType==="ADMIN"&&["ADMIN","HEADMASTER"].includes(a.jobType)),C=async()=>{const a=await we();(a==null?void 0:a.code)===200&&(n.areaList=a.data)},y=async()=>{var m,L,N;t.loading=!0;const a=await $e({schoolId:(L=(m=o.info.schoolInfos)==null?void 0:m[0])==null?void 0:L.id,page:1,rows:1e3});t.loading=!1,(a==null?void 0:a.code)===200&&Array.isArray((N=a==null?void 0:a.data)==null?void 0:N.rows)&&(t.dataList=a.data.rows),setTimeout(()=>{b.value=!0},500)},l=async()=>{t.messageLoading=!0;try{await qe({school:s.schoolId,newAdminId:t.activeRow.id,oldAdminId:s.userId}),u.success("转交成功"),r("changeTab","person"),await o.getInfo()}catch(a){}t.messageLoading=!1};z(()=>{C(),y()});const u=j(),h=a=>{const m=a.status==="LOCKED"?"解冻":"冻结";t.resetMessageType="locked",t.resetVisiable=!0,t.resetMessage="是否".concat(m,'"').concat(a.nickname,'"?'),t.activeRow=a},d=async()=>{t.resetLoading=!0;try{if(t.resetMessageType==="locked"){const a=t.activeRow.status==="LOCKED"?"解冻":"冻结";await Pe({ids:[t.activeRow.id],status:t.activeRow.status==="LOCKED"?"ACTIVATION":"LOCKED"}),y(),u.success(a+"成功")}else await Ve({userId:t.activeRow.id,clientType:"TEACHER"}),u.success("重置成功");t.resetVisiable=!1}catch(a){}t.resetLoading=!1},w=S(),g=()=>{var a;(a=w.value)==null||a.validate(async m=>{var L;m||(t.schoolLoading=!1,await Ge({...(L=o.info.schoolInfos)==null?void 0:L[0],...s}),t.schoolLoading=!0,u.success("修改成功"),await o.getInfo(),t.disabled=!0)})},_=a=>{const m=document.createElement("input");m.value=a,document.body.appendChild(m),m.select(),m.setSelectionRange(0,m.value.length),document.execCommand("Copy"),document.body.removeChild(m),u.success("复制成功")};return()=>e("div",{class:c.schoolInfo},[e(J,{ref:w,class:c.formWrap,model:s,style:{padding:"30px 0"},disabled:t.disabled},{default:()=>[e(R,{size:[30,20]},{default:()=>[e("div",{class:c.logo},[e(x,{previewDisabled:!1,src:s.logo,objectFit:"contain"},null),e("div",{class:c.changeHead},[i("修改头像"),t.schoolLoading&&e(Ce,{class:[c.uploadFile],cropper:!0,"onUpdate:fileList":a=>{s.logo=a,g()}},null)])]),e(T,{label:"学校名称",path:"name",showRequireMark:!1,rule:[{required:!0,message:"请填写学校名称",trigger:"blur"}]},{default:()=>[e($,{bordered:!t.disabled,maxlength:20,value:s.name,"onUpdate:value":a=>s.name=a},null)]}),e(T,{label:"城区"},{default:()=>{var a,m,L,N,ne,le;return[!t.oldLoading&&e(K,{placeholder:"请选择城区",bordered:!t.disabled,options:n.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:((m=(a=o.info.schoolInfos)==null?void 0:a[0])==null?void 0:m.regionCode)||((N=(L=o.info.schoolInfos)==null?void 0:L[0])==null?void 0:N.cityCode)||((le=(ne=o.info.schoolInfos)==null?void 0:ne[0])==null?void 0:le.provinceCode),"onUpdate:value":(Mt,Nt,H)=>{var ue,re,de;s.provinceCode=(ue=H[0])==null?void 0:ue.code,s.cityCode=(re=H[1])==null?void 0:re.code,s.regionCode=(de=H[2])==null?void 0:de.code}},null)]}}),e(T,null,null)]})]}),e(R,{style:{padding:"0 0 32px"}},{default:()=>[e(I,pe({focusable:!1},{id:"teacher-0"},{type:"primary",renderIcon:()=>e(De,{component:e(Ft,null,null)},null),onClick:()=>t.modal=!0}),{default:()=>[i("添加老师")]}),e(I,pe({focusable:!1},{id:"teacher-1"},{type:"primary",onClick:()=>t.qrModal=!0}),{default:()=>[i("老师注册二维码")]})]}),e(Ae,{loading:t.loading,columns:f(),data:t.dataList},{empty:()=>e(Je,null,null)}),e(G,{maskClosable:O,class:["modalTitle background",c.addTeacher],show:t.modal,"onUpdate:show":a=>t.modal=a,title:"添加老师",preset:"card",showIcon:!1},{default:()=>[e(St,{areaList:n.areaList,onClose:()=>{t.modal=!1,y()}},null)]}),t.qrModal?ye(e("div",{"onUpdate:show":a=>t.qrModal=a,class:"n-modal-mask"},[e(At,{onClose:()=>{t.qrModal=!1}},null)]),[[ve,t.qrModal,"show"]]):null,b.value?e(Dt,null,null):null,e(G,{maskClosable:O,show:t.changeVisiable,"onUpdate:show":a=>t.changeVisiable=a,preset:"card",class:["modalTitle",c.removeVisiable1],title:"转交管理员"},{default:()=>[e(me,{content:'
转交管理员后,您当前账号将无法查看和更改学校信息,请确认是否转交给【'.concat(t.activeRow.nickname,"】
"),cancelButtonText:"取消",confirmButtonText:"确认",loading:t.messageLoading,onClose:()=>t.changeVisiable=!1,onConfirm:l},null)]}),e(G,{maskClosable:O,show:t.resetVisiable,"onUpdate:show":a=>t.resetVisiable=a,preset:"card",class:["modalTitle",c.removeVisiable1],title:t.resetMessageType==="reset"?"重置密码":"温馨提示"},{default:()=>[e(me,{content:t.resetMessage,cancelButtonText:"取消",confirmButtonText:"确认",loading:t.resetLoading,onClose:()=>t.resetVisiable=!1,onConfirm:d},null)]})])}}),Xt=M({name:"base-setting",setup(k,{emit:r,attrs:o}){const n=S("person"),s=q(),t=Re();t.query.activeTab&&(n.value=t.query.activeTab,U.emit("base-setting-emit",n.value)),Me(()=>t.query.activeTab,f=>{n.value=f,U.emit("base-setting-emit",f)});const b=f=>{f&&(n.value=f)};return()=>e("div",{class:p.listWrap},[e(Ne,{class:p.customTabs,value:n.value,"onUpdate:value":[f=>n.value=f,f=>{U.emit("base-setting-emit",f)}],size:"large","pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[e(fe,{name:"person",tab:"个人信息"},{default:()=>[e(Qe,null,null)]}),(s.info.isSuperAdmin||s.info.teacherJobType==="HEADMASTER")&&e(fe,{name:"school",tab:"学校设置"},{default:()=>[e(Rt,{onChangeTab:b},null)]})]})])}});export{Xt as default};