index-legacy-b905bdc6-1720699367816.js 29 KB

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