index-legacy-e7e7a69e-1731319840132.js 29 KB

1
  1. System.register(["./forgotPassword-legacy-c4f90600-1731319840132.js","./teacherIcon-legacy-3eeb62c3-1731319840132.js","./index-legacy-bb6bf184-1731319840132.js","./index-legacy-d7900bc0-1731319840132.js","./api-legacy-f3f6b04c-1731319840132.js","./contants-legacy-8af64912-1731319840132.js","./Cascader-legacy-17668143-1731319840132.js","./html2canvas.esm-legacy-3c85f4c8-1731319840132.js","./index-legacy-7dba2a59-1731319840132.js","./api-legacy-a9e15595-1731319840132.js","./index-legacy-aabee6fc-1731319840132.js","./index-legacy-e0a2239b-1731319840132.js","./api-legacy-3483a894-1731319840132.js","./sendSms-legacy-89663aba-1731319840132.js"],(function(e,t){"use strict";var l,a,o,n,i,d,s,r,c,h,u,_,p,g,f,y,m,v,w,b,C,I,k,T,x,S,L,W,R,B,j,A,M,U,z,V,q,F,D,E,$,P,N,O,H,G,J,K,X,Z,Y,Q,ee,te,le,ae,oe,ne,ie,de,se,re;return{setters:[e=>{l=e.s,a=e.F},e=>{o=e.d},e=>{n=e.d,i=e.b,d=e.c,s=e.e,r=e.r,c=e.q,h=e.f,u=e.w,_=e.k,p=e.aX,g=e.N,f=e.aB,y=e.aC,m=e.g,v=e.h,w=e.I,b=e.x,C=e.j,I=e.S,k=e.l,T=e.m,x=e.aY,S=e.aZ,L=e.a_,W=e.Z,R=e.a$,B=e.$,j=e.C,A=e.T,M=e.a0,U=e.a1,z=e.F,V=e.y,q=e.aG,F=e.X,D=e.a,E=e.A,$=e.t,P=e.v},e=>{N=e.U},e=>{O=e.b,H=e.c,G=e.a,J=e.u,K=e.d,X=e.e,Z=e.f},e=>{Y=e.t},e=>{Q=e.N},e=>{ee=e.s,te=e.a,le=e.T,ae=e.b,oe=e.h},e=>{ne=e.g,ie=e.s},e=>{de=e.s},e=>{se=e.T},e=>{re=e.T},null,null],execute:function(){var ce=document.createElement("style");ce.textContent="._logo_1yh2l_1{position:relative;width:5.20833333vw;height:5.20833333vw;border-radius:50%;overflow:hidden}._logo_1yh2l_1 .n-image{width:100%;height:100%}._logo_1yh2l_1 ._changeHead_1yh2l_12{position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.7);display:flex;justify-content:center;align-items:center;font-size:.83333333rem;color:#fff;font-weight:600;transition:opacity .3s;border-radius:50%;cursor:pointer;opacity:0}._logo_1yh2l_1 ._changeHead_1yh2l_12:hover{opacity:1}._logo_1yh2l_1 ._uploadFile_1yh2l_33{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}._formWrap_1yh2l_41 .n-input{width:14.79166667vw;border-radius:.41666667vw}._formWrap_1yh2l_41 .n-input .n-input__input-el{height:2.60416667vw;font-size:.83333333rem}._formWrap_1yh2l_41 .n-input.n-input--disabled{background-color:#f5f6fa}._formWrap_1yh2l_41 .n-input.n-input--disabled .n-input__input-el{color:rgba(0,0,0,.4)}._formWrap_1yh2l_41 .n-base-selection{height:2.60416667vw;width:14.79166667vw;border-radius:.41666667vw}._formWrap_1yh2l_41 .n-base-selection .n-base-selection-label{height:2.60416667vw;font-size:.83333333rem}._formWrap_1yh2l_41 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:rgba(0,0,0,.4)}._formWrap_1yh2l_41 .n-base-selection.n-base-selection--disabled .n-base-selection-label .n-base-selection-input{color:rgba(0,0,0,.4)!important}._schoolInfo_1yh2l_71 .n-form-item .n-form-item-label{color:#777}._schoolInfo_1yh2l_71 .n-button{border-radius:.41666667vw}._schoolInfo_1yh2l_71 ._errorBtn_1yh2l_77 .n-button__content{color:#ff4d4f}._removeVisiable1_1yh2l_80{width:22.5vw}._removeVisiable1_1yh2l_80 ._btnGroupModal_1yh2l_83{padding:1.66666667vw 0}._removeVisiable1_1yh2l_80 ._btnGroupModal_1yh2l_83 .n-button{height:2.44791667vw;min-width:8.125vw}._addTeacher_1yh2l_90{width:28.95833333vw}._addTeacher_1yh2l_90 .n-form{padding:1.04166667vw 0}._addTeacher_1yh2l_90 .n-input{border-radius:.41666667vw}._addTeacher_1yh2l_90 .n-input .n-input__input-el{height:2.60416667vw;font-size:.83333333rem}._addTeacher_1yh2l_90 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._addTeacher_1yh2l_90 .n-base-selection{border-radius:.41666667vw}._addTeacher_1yh2l_90 .n-base-selection .n-base-selection-label{height:2.60416667vw;font-size:.83333333rem}._addTeacher_1yh2l_90 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._addTeacher_1yh2l_90 .n-form-item-blank{padding-right:1.5625vw}._addTeacher_1yh2l_90 .genderBtn{min-width:4.375vw;min-height:1.92708333vw;border-radius:.41666667vw}._addTeacher_1yh2l_90 .n-form-item-label{color:#777;padding:0;font-size:.9375rem}._addTeacher_1yh2l_90 .n-form-item-label__text{height:2.60416667vw;display:flex;align-items:center;justify-content:center}._addTeacher_1yh2l_90 .nalert{padding:0 1.5625vw}._addTeacher_1yh2l_90 .nalert .n-alert{background:#FFE8E8;text-align:center}._addTeacher_1yh2l_90 .nalert .n-alert-body .n-alert-body__content{color:#ea4132;font-size:calc(.72916667rem,12Px)}._addTeacher_1yh2l_90 .actionBtn{width:8.125vw;height:2.44791667vw;font-size:.9375rem}._btnList_1yh2l_153{width:100%}._btnList_1yh2l_153 ._btn_1yh2l_83{width:7.5vw;height:2.34375vw;border-radius:.41666667vw;font-size:.9375rem;font-weight:600!important;margin-right:1.25vw}._addStudentWrap_1yh2l_164{position:relative;width:19.6875vw;height:32.86458333vw;margin:6.25vw auto 0}._addStudentWrap_1yh2l_164 ._studentCLose_1yh2l_170{cursor:pointer;position:absolute;right:-3.48958333vw;top:-2.8125vw;width:2.1875vw;height:2.1875vw;z-index:100}._addStudentWrap_1yh2l_164 ._stunentStart_1yh2l_179{position:absolute;width:28.95833333vw;height:12.8125vw;left:-3.64583333vw;top:-5.10416667vw}._addStudentWrap_1yh2l_164 ._stunentStart_1yh2l_179 img{width:28.95833333vw;height:12.8125vw}._addStudentWrap_1yh2l_164 ._addTitle_1yh2l_190{width:11.04166667vw;height:2.08333333vw;top:-.46875vw;position:absolute;margin:0 auto;left:50%;margin-left:-5.52083333vw;z-index:100}._addStudentWrap_1yh2l_164 ._addTitle_1yh2l_190 img{width:11.04166667vw;height:2.08333333vw}._addStudentWrap_1yh2l_164 ._addTitle_1yh2l_190._addTeacherTitle_1yh2l_204{top:-.625vw;height:2.08333333vw}._addStudentWrap_1yh2l_164 ._addTitle_1yh2l_190._addTeacherTitle_1yh2l_204 img{height:2.08333333vw}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211{width:19.6875vw;height:32.86458333vw;position:relative;display:flex;flex-direction:column;align-items:center}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentInfoBg_1yh2l_219{position:absolute;width:19.6875vw;height:32.86458333vw}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentInfoBg_1yh2l_219 img{left:0;top:0;width:19.6875vw;height:32.86458333vw}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230{position:absolute;bottom:1.40625vw;left:1.25vw;width:17.1875vw;height:17.65625vw;background:rgba(255,255,255,.33);border-radius:.88541667vw;border:.10416667vw solid #ffffff;backdrop-filter:blur(.88541667vw);display:flex;flex-direction:column;align-items:center}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._schoolLogo_1yh2l_244{width:3.48958333vw;height:3.48958333vw;margin-top:-1.77083333vw;border:1px solid #fff;border-radius:50%;z-index:100;overflow:hidden;background-color:#fff;position:absolute}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255{margin-top:.3125vw;width:16.35416667vw;height:16.82291667vw;background:#ffffff;border-radius:.72916667vw;display:flex;flex-direction:column;align-items:center}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 h2{margin-top:1.92708333vw;height:1.14583333vw;font-size:.83333333rem;font-weight:600;color:#000;line-height:1.14583333vw;margin-bottom:.3125vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._studentCoreInfoSubtitle_1yh2l_277{font-size:.72916667rem;font-weight:400;color:#000}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._studentCoreInfoSubtitle_1yh2l_277 span{color:#198cfe;font-weight:600}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._codewrap_1yh2l_286{width:7.65625vw;height:7.55208333vw;position:relative;margin:.83333333vw 0 .9375vw;display:flex;flex-direction:column;align-items:center;justify-content:center}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._codewrap_1yh2l_286 ._codewrapBg_1yh2l_296{width:7.65625vw!important;height:7.55208333vw!important;top:0;left:0;position:absolute}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._codewrapSubmit_1yh2l_303{width:11.09375vw;height:1.82291667vw;border-radius:.9375vw;text-align:center;line-height:1.82291667vw;font-size:.72916667rem;color:#117de9;position:relative}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._codewrapSubmit_1yh2l_303 img{position:absolute;left:0;top:0;width:11.09375vw;height:1.82291667vw}._addStudentWrap_1yh2l_164 ._addStudentInfo_1yh2l_211 ._studentCore_1yh2l_230 ._studentCoreInfo_1yh2l_255 ._codewrapSubmit_1yh2l_303 span{font-weight:600}._addStudentWrap_1yh2l_164 ._studentBottom_1yh2l_323{width:21.875vw;position:absolute;left:-1.09375vw;bottom:-6.25vw;display:flex;flex-direction:column;align-items:center}._addStudentWrap_1yh2l_164 ._studentBottom_1yh2l_323 p{text-align:center;font-size:.83333333rem;color:#fff;margin-bottom:1.5625vw}._addStudentWrap_1yh2l_164 ._studentBottom_1yh2l_323 ._downBtn_1yh2l_338{width:13.33333333vw;height:2.8125vw;background:linear-gradient(291deg,#02BAFF 0%,#007AFE 100%);border-radius:1.5625vw;line-height:2.8125vw;font-size:1.14583333rem;font-weight:600;text-align:center;color:#fff;cursor:pointer}\n",document.head.appendChild(ce);const he=""+new URL("headerD-220e6507.png",t.meta.url).href,ue=n({name:"setting-personInfo",setup(){const e=i(),t=d(),n=s({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),x=r(),S=s({provinceCode:t.info.provinceCode,cityCode:t.info.cityCode,regionCode:t.info.regionCode,nickname:t.info.nickname,phone:t.info.phone,gender:t.info.gender,schoolId:t.info.schoolInfos?.[0]?.id,tenantId:t.info.schoolInfos?.[0]?.tenantId,id:t.info.id,avatar:t.info.avatar}),L=s({disabled:!0,openChangePwd:!1,uploadShow:!0,loading:!1,oldTecherform:{}});return c((()=>{(async()=>{const e=await O();200===e?.code&&(n.areaList=e.data)})()})),()=>h("div",{class:l.infoWrap},[h("div",{class:l.teacherInfoWrap},[h("div",{class:l.teacherHeadWrap},[h(u,{previewDisabled:!0,class:l.headerD,src:he},null),h(u,{previewDisabled:!0,class:l.defultHeade,src:S.avatar||o},null),h("div",{class:[l.defultHeade,l.changeHead,l.hoverNone]},[_("修改头像"),L.uploadShow&&h(N,{class:[l.uploadFile],cropper:!0,"onUpdate:fileList":async e=>{S.avatar=e,L.uploadShow=!1,setTimeout((()=>{L.uploadShow=!0}),100),await p(S),console.log(S),t.getInfo()}},null)])]),h("div",{class:l.headerInfo},[h("p",{class:l.headerTitle},[t.info.nickname,t.info.teacherJobType&&h("span",{class:l.roleType},[Y[t.info.teacherJobType]])]),h("p",{class:l.headerSubTitle},[t.info.schoolInfos?.[0]?.name])])]),h("div",{class:l.setInfo},[h(g,{ref:x,model:S,disabled:L.disabled},{default:()=>[h(f,{cols:3,"x-gap":"100"},{default:()=>[h(y,null,{default:()=>[h(m,{label:"姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[h(v,{maxlength:14,bordered:!L.disabled,placeholder:"请填写老师姓名",value:S.nickname,"onUpdate:value":e=>S.nickname=e},null)]})]}),h(y,null,{default:()=>[h(m,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写老师手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[h(v,{bordered:!L.disabled,placeholder:"请填写老师手机号",value:S.phone,"onUpdate:value":e=>S.phone=e},null)]})]}),h(y,null,{default:()=>[h(m,{label:"性别",path:"gender",rule:[{required:!0,type:"number",message:"请选择性别",trigger:"blur"}]},{default:()=>[h(w,{bordered:!L.disabled,class:l.select,showArrow:!L.disabled,placeholder:"请选择性别",options:n.sexs,value:S.gender,"onUpdate:value":e=>S.gender=e},null)]})]}),h(y,null,{default:()=>[h(m,{label:"城区",path:"provinceCode",rule:{required:!0,type:"number",message:"请选择城区",trigger:"change"}},{default:()=>[!L.loading&&h(Q,{bordered:!L.disabled,options:n.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:t.info.regionCode||t.info.cityCode||t.info.provinceCode,"onUpdate:value":(e,t,l)=>{S.provinceCode=l[0]?.code,S.cityCode=l[1]?.code,S.regionCode=l[2]?.code}},null)]})]})]})]})]),L.disabled?h(b,{class:l.btnList,align:"center",justify:"end"},{default:()=>[h(C,{class:l.btn,color:"#198cfe",onClick:()=>L.openChangePwd=!0},{default:()=>[_("修改密码")]}),h(C,{class:l.btn,color:"#f24433",onClick:()=>{L.oldTecherform=Object.assign({},S),L.disabled=!1}},{default:()=>[_("修改信息")]})]}):h(b,{class:l.btnList,align:"center",justify:"end"},{default:()=>[h(C,{class:l.btn,onClick:()=>{L.loading=!0,t.getInfo(),x.value?.restoreValidation(),L.disabled=!0,Object.assign(S,L.oldTecherform),I((()=>{L.loading=!1}))}},{default:()=>[_("取消")]}),h(C,{class:l.btn,type:"primary",onClick:()=>{x.value.validate((async l=>{l||(S.provinceCode&&S.cityCode?(await p(S),console.log(S),t.getInfo(),L.disabled=!0,e.success("修改成功")):e.error("请选择城区"))}))}},{default:()=>[_("完成")]})]}),h(k,{maskClosable:T,class:l.changePwdModal,show:L.openChangePwd,"onUpdate:show":e=>L.openChangePwd=e,preset:"dialog",showIcon:!1,title:"修改密码"},{default:()=>[h(a,{phone:t.info.phone,onClose:()=>{L.openChangePwd=!1}},null)]})])}}),_e="_logo_1yh2l_1",pe="_changeHead_1yh2l_12",ge="_uploadFile_1yh2l_33",fe="_formWrap_1yh2l_41",ye="_schoolInfo_1yh2l_71",me="_errorBtn_1yh2l_77",ve="_removeVisiable1_1yh2l_80",we="_addTeacher_1yh2l_90",be="_addStudentWrap_1yh2l_164",Ce="_studentCLose_1yh2l_170",Ie="_stunentStart_1yh2l_179",ke="_addTitle_1yh2l_190",Te="_addTeacherTitle_1yh2l_204",xe="_addStudentInfo_1yh2l_211",Se="_studentInfoBg_1yh2l_219",Le="_studentCore_1yh2l_230",We="_schoolLogo_1yh2l_244",Re="_studentCoreInfo_1yh2l_255",Be="_studentCoreInfoSubtitle_1yh2l_277",je="_codewrap_1yh2l_286",Ae="_codewrapSubmit_1yh2l_303",Me="_studentBottom_1yh2l_323",Ue="_downBtn_1yh2l_338",ze={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ve=[L("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null,-1),L("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null,-1)],qe=n({name:"Add",render:function(e,t){return x(),S("svg",ze,Ve)}}),Fe=n({name:"teacher-operation",emits:["close"],props:{areaList:{type:Array,default:()=>[]}},setup(e,{emit:t}){const l=d(),a=s({provinceCode:"",cityCode:"",regionCode:"",tenantId:l.info.schoolInfos?.[0]?.tenantId,phone:null,schoolId:l.info.schoolInfos?.[0]?.id,nickname:null,gender:1}),o=r(!1),n=r(),c=i();return()=>h("div",null,[h(g,{model:a,ref:n,showRequireMark:!1,"label-placement":"left","label-width":"126"},{default:()=>[h(m,{label:"老师姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[h(v,{value:a.nickname,"onUpdate:value":e=>a.nickname=e,placeholder:"请输入老师姓名",clearable:!0,maxlength:14},null)]}),h(m,{label:"老师性别",path:"gender",rule:[{required:!0,message:"请选择老师性别"}]},{default:()=>[h(b,null,{default:()=>[h(W("n-button"),{class:"genderBtn",type:a.gender?"info":void 0,tertiary:!a.gender,onClick:()=>{a.gender=1}},{default:()=>[_("男")]}),h(W("n-button"),{class:"genderBtn",type:a.gender?void 0:"info",tertiary:!!a.gender,onClick:()=>{a.gender=0}},{default:()=>[_("女")]})]})]}),h(m,{label:"城区",path:"provinceCode",rule:[{required:!0,message:"请选择城区",trigger:"change"}]},{default:()=>[h(Q,{to:"body",placeholder:"请选择城区",options:e.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover","onUpdate:value":(e,t,l)=>{a.provinceCode=l[0]?.code+"",a.cityCode=l[1]?.code,a.regionCode=l[2]?.code}},null)]}),h(m,{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:()=>[h(v,{maxlength:11,value:a.phone,"onUpdate:value":e=>a.phone=e,placeholder:"请输入手机号",clearable:!0},null)]}),h("div",{class:"nalert"},[h(R,{type:"error",showIcon:!1,bordered:!1},{default:()=>[_("默认密码为yyszkt+手机号后四位")]})])]}),h(b,{style:{padding:"20px 0 32px 0"},justify:"center"},{default:()=>[h(C,{class:"actionBtn",round:!0,type:"default",onClick:()=>t("close")},{default:()=>[_("取消")]}),h(C,{class:"actionBtn",round:!0,type:"primary",onClick:()=>(async()=>{n.value.validate((async e=>{if(!e){try{o.value=!0,await H({...a}),c.success("添加成功")}catch(l){console.log(l)}setTimeout((()=>{o.value=!1,t("close")}),100)}}))})(),loading:o.value},{default:()=>[_("确定")]})]})])}}),De=""+new URL("studentTitle-beff5468.png",t.meta.url).href,Ee=""+new URL("teacherCore-bd5dba6c.png",t.meta.url).href,$e=n({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(e,{emit:t}){s({uploading:!1}),i();const l=d();r();const a=`tenantId=${l.info.schoolInfos?.[0]?.tenantId}&schoolId=${l.info.schoolInfos?.[0]?.id}&schoolName=${l.info.schoolInfos?.[0]?.name}`,o=`${location.origin}/classroom-app/#/teaher-register?`+a,n=s({saveLoading:!1,image:null,shareLoading:!1}),c=()=>{if(!n.saveLoading)if(n.saveLoading=!0,n.image)p();else{const e=document.getElementById("preview-container");oe(e,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then((async e=>{const t=e.toDataURL("image/png");console.log(t,"url===>"),n.image=t,p()})).catch((()=>{console.log("生成图片失败url===>"),n.saveLoading=!1}))}},p=async()=>{setTimeout((()=>{n.saveLoading=!1}),100);const e=document.createElement("a");e.setAttribute("download","新增老师.png"),e.href=n.image,e.click()};return()=>h("div",{class:[be]},[h("div",{onClick:()=>{console.log("点击"),t("close")}},[h(u,{src:ee,previewDisabled:!0,class:Ce},null)]),h(u,{previewDisabled:!0,class:Ie,src:te},null),h(u,{class:[ke,Te],previewDisabled:!0,src:De},null),h("div",{class:xe,id:"preview-container"},[h(u,{class:Se,previewDisabled:!0,src:Ee},null),h("div",{class:Le},[h("img",{alt:"img",crossorigin:"anonymous",class:We,src:l.getUserInfo.schoolInfos[0].logo+`?some=${(new Date).getTime()}`},null),h("div",{class:Re},[h("h2",null,[l.getUserInfo.schoolInfos[0].name]),h("p",{class:Be},[_("邀请您成为"),h("span",null,[_("音乐数字课堂老师")])]),h("div",{class:je},[h(le,{margin:0,text:o,size:119},null)]),h("div",{class:Ae},[h(u,{previewDisabled:!0,src:ae},null),_("请扫描上方二维码 "),h("span",null,[_("完成注册")])," "])])])]),h("div",{class:Me},[h("p",null,[_("请将二维码图片发送给老师,扫码完成注册")]),h("div",{class:Ue,onClick:c},[_("下载图片")])])])}}),Pe=n({name:"teacher-guide",emits:["close"],setup(e,{emit:t}){const l=s({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:ne("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:ne("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}),a=r(!1),o=r({});(async()=>{try{const e=localStorage.getItem("teacher-guideInfo");o.value=e?JSON.parse(e)||null:{},o.value&&o.value.teacherGuide?a.value=!1:a.value=!0}catch(e){console.log(e)}})();const n=()=>{const e=document.getElementById(`teacher-${l.step}`);if(e){const t=e.getBoundingClientRect(),a=l.steps[l.step].eleRectPadding?.left||0,o=l.steps[l.step].eleRectPadding?.top||0,n=l.steps[l.step].eleRectPadding?.width||0,i=l.steps[l.step].eleRectPadding?.height||0;l.box={left:t.x-a+"px",top:t.y-o+"px",width:t.width+n+"px",height:t.height+i+"px"}}else u()},i=async e=>{try{if("base-setting"!==e)return;o.value?o.value.teacherGuide=!1:o.value={teacherGuide:!1};try{de({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(o.value)})}catch(t){console.log(t)}l.step=0,n(),a.value=!0}catch{}};c((()=>{n(),window.addEventListener("resize",d),j.on("teacher-guideInfo",i)}));const d=()=>{n()};A((()=>{window.removeEventListener("resize",d),j.off("teacher-guideInfo",i)}));const u=()=>{l.step>=4?p():(l.step=l.step+1,n())},p=async()=>{o.value?o.value.teacherGuide=!0:o.value={teacherGuide:!0};try{de({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(o.value)})}catch(e){console.log(e)}a.value=!1};return()=>h(z,null,[a.value?M(h("div",{"onUpdate:show":e=>a.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[h("div",{class:ie.content,onClick:()=>u()},[h("div",{class:ie.backBtn,onClick:e=>{e.stopPropagation(),p()}},[_("跳过")]),h("div",{class:ie.box,style:{...l.box,...l.steps[l.step].boxStyle},id:`modeType-${l.step}`},[l.steps.map(((e,t)=>h("div",{onClick:e=>e.stopPropagation(),class:ie.item,style:"bottom"==e.type?{display:t===l.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===l.step?"":"none",left:`${e.eleRect?.left}px`,top:`${l.box?.height}`}},[h("img",{class:ie.img,style:e.imgStyle,src:e.img},null),h("div",{class:ie.btns,style:e.btnsStyle},[l.step+1==l.steps.length?h(z,null,[h("div",{class:[ie.endBtn],onClick:()=>p()},[_("完成")]),h("div",{class:ie.nextBtn,onClick:()=>{l.step=0,n()}},[_("再看一遍")])]):h("div",{class:ie.btn,onClick:()=>u()},[_("下一步 ("),l.step+1,_("/"),l.steps.length,_(")")])])])))])])]),[[U,a.value,"show"]]):null])}}),Ne=n({name:"school-info",emits:["changeTab"],setup(e,{emit:t}){const l=d(),a=s({areaList:[]}),o=s({name:l.info.schoolInfos?.[0]?.name,schoolId:l.info.schoolInfos?.[0]?.id,userId:l.info.id,logo:l.info.schoolInfos?.[0]?.logo||l.info.avatar,provinceCode:l.info.schoolInfos?.[0]?.provinceCode||"",cityCode:l.info.schoolInfos?.[0]?.cityCode||"",regionCode:l.info.schoolInfos?.[0]?.regionCode||""}),n=s({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}),p=r(!1),f=(e,t)=>!("ADMIN"!==l.info.teacherJobType||!["ADMIN","HEADMASTER"].includes(e.jobType)),y=async()=>{n.loading=!0;const e=await G({schoolId:l.info.schoolInfos?.[0]?.id,page:1,rows:1e3});n.loading=!1,200===e?.code&&Array.isArray(e?.data?.rows)&&(n.dataList=e.data.rows),setTimeout((()=>{p.value=!0}),500)},w=async()=>{n.messageLoading=!0;try{await J({school:o.schoolId,newAdminId:n.activeRow.id,oldAdminId:o.userId}),I.success("转交成功"),t("changeTab","person"),await l.getInfo()}catch{}n.messageLoading=!1};c((()=>{(async()=>{const e=await O();200===e?.code&&(a.areaList=e.data)})(),y()}));const I=i(),x=e=>{const t="LOCKED"===e.status?"解冻":"冻结";n.resetMessageType="locked",n.resetVisiable=!0,n.resetMessage=`是否${t}"${e.nickname}"?`,n.activeRow=e},S=async()=>{n.resetLoading=!0;try{if("locked"===n.resetMessageType){const e="LOCKED"===n.activeRow.status?"解冻":"冻结";await K({ids:[n.activeRow.id],status:"LOCKED"===n.activeRow.status?"ACTIVATION":"LOCKED"}),y(),I.success(e+"成功")}else await X({userId:n.activeRow.id,clientType:"TEACHER"}),I.success("重置成功");n.resetVisiable=!1}catch{}n.resetLoading=!1},L=r(),W=e=>{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("Copy"),document.body.removeChild(t),I.success("复制成功")};return()=>h("div",{class:ye},[h(g,{ref:L,class:fe,model:o,style:{padding:"30px 0"},disabled:n.disabled},{default:()=>[h(b,{size:[30,20]},{default:()=>[h("div",{class:_e},[h(u,{previewDisabled:!1,src:o.logo,objectFit:"contain"},null),h("div",{class:pe},[_("修改头像"),n.schoolLoading&&h(N,{class:[ge],cropper:!0,"onUpdate:fileList":e=>{o.logo=e,L.value?.validate((async e=>{e||(n.schoolLoading=!1,await Z({...l.info.schoolInfos?.[0],...o}),n.schoolLoading=!0,I.success("修改成功"),await l.getInfo(),n.disabled=!0)}))}},null)])]),h(m,{label:"学校名称",path:"name",showRequireMark:!1,rule:[{required:!0,message:"请填写学校名称",trigger:"blur"}]},{default:()=>[h(v,{bordered:!n.disabled,maxlength:20,value:o.name,"onUpdate:value":e=>o.name=e},null)]}),h(m,{label:"城区"},{default:()=>[!n.oldLoading&&h(Q,{placeholder:"请选择城区",bordered:!n.disabled,options:a.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:l.info.schoolInfos?.[0]?.regionCode||l.info.schoolInfos?.[0]?.cityCode||l.info.schoolInfos?.[0]?.provinceCode,"onUpdate:value":(e,t,l)=>{o.provinceCode=l[0]?.code,o.cityCode=l[1]?.code,o.regionCode=l[2]?.code}},null)]}),h(m,null,null)]})]}),h(b,{style:{padding:"0 0 32px"}},{default:()=>[h(C,V({focusable:!1},{id:"teacher-0"},{type:"primary",renderIcon:()=>h(F,{component:h(qe,null,null)},null),onClick:()=>n.modal=!0}),{default:()=>[_("添加老师")]}),h(C,V({focusable:!1},{id:"teacher-1"},{type:"primary",onClick:()=>n.qrModal=!0}),{default:()=>[_("老师注册二维码")]})]}),h(q,{loading:n.loading,columns:[{title:"老师姓名",key:"nickname",width:"15%",render:e=>h("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>W(e.nickname)},[e.nickname])},{title:"角色",key:"jobType",width:"15%",render:e=>Y[e.jobType]},{title:"手机号码",key:"phone",width:"15%",render:e=>h("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>W(e.phone)},[e.phone])},{title:"性别",key:"questionTypeCode",width:"15%",render:e=>h("div",null,[e.gender?"男":"女"])},{title:"状态",key:"statusName",width:"15%",render:e=>h("div",null,["ACTIVATION"===e.status?h(C,{text:!0},{default:()=>[_("启用")]}):h(C,{class:me,text:!0},{default:()=>[_("冻结")]})])},{title:"操作",key:"titleImg",width:"25%",render:e=>h(b,null,{default:()=>[h(C,{type:"primary",text:!0,disabled:e.id!==l.info.id&&f(e),onClick:()=>{n.resetMessage=`重置"${e.nickname}"的密码,是否继续?`,n.resetVisiable=!0,n.resetMessageType="reset",n.activeRow=e}},{default:()=>[_("重置密码")]}),"ACTIVATION"===e.status?h(z,null,[h(C,{disabled:e.id===l.info.id||f(e),type:"primary",text:!0,onClick:()=>x(e)},{default:()=>[_("冻结")]}),l.info.isSuperAdmin&&!e.manageAdmin&&h(C,{type:"primary",text:!0,onClick:()=>{n.changeVisiable=!0,n.activeRow=e}},{default:()=>[_("转交管理")]})]):h(C,{class:me,text:!0,onClick:()=>x(e)},{default:()=>[_("解冻")]})]})}],data:n.dataList},{empty:()=>h(se,null,null)}),h(k,{maskClosable:T,class:["modalTitle background",we],show:n.modal,"onUpdate:show":e=>n.modal=e,title:"添加老师",preset:"card",showIcon:!1},{default:()=>[h(Fe,{areaList:a.areaList,onClose:()=>{n.modal=!1,y()}},null)]}),n.qrModal?M(h("div",{"onUpdate:show":e=>n.qrModal=e,class:"n-modal-mask"},[h($e,{onClose:()=>{n.qrModal=!1}},null)]),[[U,n.qrModal,"show"]]):null,p.value?h(Pe,null,null):null,h(k,{maskClosable:T,show:n.changeVisiable,"onUpdate:show":e=>n.changeVisiable=e,preset:"card",class:["modalTitle",ve],title:"转交管理员"},{default:()=>[h(re,{content:`<p style="text-align: left;">转交管理员后,您当前账号将无法查看和更改学校信息,请确认是否转交给<span style="color: #198CFE">【${n.activeRow.nickname}】</span></p>`,cancelButtonText:"取消",confirmButtonText:"确认",loading:n.messageLoading,onClose:()=>n.changeVisiable=!1,onConfirm:w},null)]}),h(k,{maskClosable:T,show:n.resetVisiable,"onUpdate:show":e=>n.resetVisiable=e,preset:"card",class:["modalTitle",ve],title:"reset"===n.resetMessageType?"重置密码":"温馨提示"},{default:()=>[h(re,{content:n.resetMessage,cancelButtonText:"取消",confirmButtonText:"确认",loading:n.resetLoading,onClose:()=>n.resetVisiable=!1,onConfirm:S},null)]})])}});e("default",n({name:"base-setting",setup(e,{emit:t,attrs:a}){const o=r("person"),n=d(),i=D();i.query.activeTab&&(o.value=i.query.activeTab,j.emit("base-setting-emit",o.value)),E((()=>i.query.activeTab),(e=>{o.value=e,j.emit("base-setting-emit",e)}));const s=e=>{e&&(o.value=e)};return()=>h("div",{class:l.listWrap},[h($,{class:l.customTabs,value:o.value,"onUpdate:value":[e=>o.value=e,e=>{j.emit("base-setting-emit",e)}],size:"large","pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[h(P,{name:"person",tab:"个人信息"},{default:()=>[h(ue,null,null)]}),(n.info.isSuperAdmin||"HEADMASTER"===n.info.teacherJobType)&&h(P,{name:"school",tab:"学校设置"},{default:()=>[h(Ne,{onChangeTab:s},null)]})]})])}}))}}}));