index-legacy-8892f588-1714390128119.js 28 KB

1
  1. System.register(["./forgotPassword-legacy-6711e983-1714390128119.js","./teacherIcon-legacy-3eeb62c3-1714390128119.js","./maleIcon-legacy-f2aee668-1714390128119.js","./index-legacy-593f0982-1714390128119.js","./index-legacy-e1759957-1714390128119.js","./api-legacy-b537de98-1714390128119.js","./Cascader-legacy-5b8bfdea-1714390128119.js","./html2canvas.esm-legacy-646e7b08-1714390128119.js","./index-legacy-a2747e9a-1714390128119.js","./api-legacy-65c06072-1714390128119.js","./index-legacy-79a52246-1714390128119.js","./api-legacy-0acba0d9-1714390128119.js","./sendSms-legacy-74306ab4-1714390128119.js"],(function(e,t){"use strict";var n,l,a,o,d,i,s,r,c,g,u,_,p,h,f,v,m,b,w,y,C,I,k,x,S,T,L,W,j,z,B,F,R,U,A,q,$,D,P,E,O,N,M,H,V,G,J,K,Q,X,Y,Z,ee,te,ne,le,ae,oe,de,ie,se,re;return{setters:[e=>{n=e.s,l=e.F},e=>{a=e.d},e=>{o=e.m,d=e.f},e=>{i=e.d,s=e.b,r=e.c,c=e.e,g=e.r,u=e.p,_=e.f,p=e.v,h=e.k,f=e.N,v=e.ay,m=e.az,b=e.g,w=e.h,y=e.G,C=e.w,I=e.j,k=e.Q,x=e.l,S=e.aQ,T=e.aR,L=e.aS,W=e.aT,j=e.Z,z=e.aU,B=e.$,F=e.A,R=e.R,U=e.W,A=e.X,q=e.F,$=e.n,D=e.x,P=e.aE,E=e.V,O=e.a,N=e.y,M=e.q,H=e.t},e=>{V=e.U},e=>{G=e.b,J=e.c,K=e.a,Q=e.d,X=e.e,Y=e.f},e=>{Z=e.N},e=>{ee=e.s,te=e.a,ne=e.T,le=e.b,ae=e.h},e=>{oe=e.g,de=e.s},e=>{ie=e.g,se=e.s},e=>{re=e.T},null,null],execute:function(){var ce=document.createElement("style");ce.textContent="._logo_1gn1l_1{position:relative;width:5.20833333vw;height:5.20833333vw;border-radius:50%;overflow:hidden}._logo_1gn1l_1 .n-image{width:100%;height:100%}._logo_1gn1l_1 ._changeHead_1gn1l_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_1gn1l_1 ._changeHead_1gn1l_12:hover{opacity:1}._logo_1gn1l_1 ._uploadFile_1gn1l_33{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}._formWrap_1gn1l_41 .n-input{width:14.79166667vw;border-radius:.41666667vw}._formWrap_1gn1l_41 .n-input .n-input__input-el{height:2.60416667vw;font-size:.83333333rem}._formWrap_1gn1l_41 .n-input.n-input--disabled{background-color:#f5f6fa}._formWrap_1gn1l_41 .n-input.n-input--disabled .n-input__input-el{color:rgba(0,0,0,.4)}._formWrap_1gn1l_41 .n-base-selection{height:2.60416667vw;width:14.79166667vw;border-radius:.41666667vw}._formWrap_1gn1l_41 .n-base-selection .n-base-selection-label{height:2.60416667vw;font-size:.83333333rem}._formWrap_1gn1l_41 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:rgba(0,0,0,.4)}._formWrap_1gn1l_41 .n-base-selection.n-base-selection--disabled .n-base-selection-label .n-base-selection-input{color:rgba(0,0,0,.4)!important}._schoolInfo_1gn1l_71 .n-form-item .n-form-item-label{color:#777}._schoolInfo_1gn1l_71 .n-button{border-radius:.41666667vw}._schoolInfo_1gn1l_71 .n-data-table .n-data-table-th{background:#F7F7F8;color:#717172!important;border:none;min-height:2.8125vw;font-size:.78125rem}._schoolInfo_1gn1l_71 .n-data-table.n-data-table--bordered .n-data-table-wrapper{border:none}._schoolInfo_1gn1l_71 .n-data-table-tr .n-data-table-td .n-button__content,._schoolInfo_1gn1l_71 .n-data-table .n-data-table-td{font-weight:700;font-size:.78125rem}._schoolInfo_1gn1l_71 ._errorBtn_1gn1l_92 .n-button__content{color:#ff4d4f}._addTeacher_1gn1l_95{padding:0;border-radius:.83333333vw;overflow:hidden;min-width:23.75vw}._addTeacher_1gn1l_95 .n-dialog__close{transform:translateY(.15625vw)}._addTeacher_1gn1l_95 .n-dialog__title{min-height:3.64583333vw;justify-content:center;background:#F5F6FA}._addTeacher_1gn1l_95 .n-form{padding:1.04166667vw 0}._addTeacher_1gn1l_95 .n-input{border-radius:.41666667vw}._addTeacher_1gn1l_95 .n-input .n-input__input-el{height:2.60416667vw;font-size:.83333333rem}._addTeacher_1gn1l_95 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._addTeacher_1gn1l_95 .n-base-selection{border-radius:.41666667vw}._addTeacher_1gn1l_95 .n-base-selection .n-base-selection-label{height:2.60416667vw;font-size:.83333333rem}._addTeacher_1gn1l_95 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._addTeacher_1gn1l_95 .n-form-item-blank{padding-right:1.5625vw}._addTeacher_1gn1l_95 .genderBtn{min-width:4.375vw;min-height:1.92708333vw;border-radius:.41666667vw}._addTeacher_1gn1l_95 .n-form-item-label{color:#777;padding:0;font-size:.9375rem}._addTeacher_1gn1l_95 .n-form-item-label__text{height:2.60416667vw;display:flex;align-items:center;justify-content:center}._addTeacher_1gn1l_95 .nalert{padding:0 1.5625vw}._addTeacher_1gn1l_95 .nalert .n-alert{background:#FFE8E8;text-align:center}._addTeacher_1gn1l_95 .nalert .n-alert-body .n-alert-body__content{color:#ea4132;font-size:.72916667rem}._addTeacher_1gn1l_95 .actionBtn{width:8.125vw;height:2.44791667vw;font-size:.9375rem}._btnList_1gn1l_169{width:100%}._btnList_1gn1l_169 ._btn_1gn1l_169{width:7.5vw;height:2.34375vw;border-radius:.41666667vw;font-size:.9375rem;font-weight:600!important;margin-right:1.25vw}._addStudentWrap_1gn1l_180{position:relative;width:19.6875vw;height:32.86458333vw;margin:6.25vw auto 0}._addStudentWrap_1gn1l_180 ._studentCLose_1gn1l_186{cursor:pointer;position:absolute;right:-3.48958333vw;top:-2.8125vw;width:2.1875vw;height:2.1875vw;z-index:100}._addStudentWrap_1gn1l_180 ._stunentStart_1gn1l_195{position:absolute;width:28.95833333vw;height:12.8125vw;left:-3.64583333vw;top:-5.10416667vw}._addStudentWrap_1gn1l_180 ._stunentStart_1gn1l_195 img{width:28.95833333vw;height:12.8125vw}._addStudentWrap_1gn1l_180 ._addTitle_1gn1l_206{width:11.04166667vw;height:2.08333333vw;top:-.46875vw;position:absolute;margin:0 auto;left:50%;margin-left:-5.52083333vw;z-index:100}._addStudentWrap_1gn1l_180 ._addTitle_1gn1l_206 img{width:11.04166667vw;height:2.08333333vw}._addStudentWrap_1gn1l_180 ._addTitle_1gn1l_206._addTeacherTitle_1gn1l_220{top:-.625vw;height:2.08333333vw}._addStudentWrap_1gn1l_180 ._addTitle_1gn1l_206._addTeacherTitle_1gn1l_220 img{height:2.08333333vw}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227{width:19.6875vw;height:32.86458333vw;position:relative;display:flex;flex-direction:column;align-items:center}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentInfoBg_1gn1l_235{position:absolute;width:19.6875vw;height:32.86458333vw}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentInfoBg_1gn1l_235 img{left:0;top:0;width:19.6875vw;height:32.86458333vw}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246{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_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._schoolLogo_1gn1l_260{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_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271{margin-top:.3125vw;width:16.35416667vw;height:16.82291667vw;background:#ffffff;border-radius:.72916667vw;display:flex;flex-direction:column;align-items:center}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 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_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._studentCoreInfoSubtitle_1gn1l_293{font-size:.72916667rem;font-weight:400;color:#000}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._studentCoreInfoSubtitle_1gn1l_293 span{color:#198cfe;font-weight:600}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._codewrap_1gn1l_302{width:7.65625vw;height:7.55208333vw;position:relative;margin:.83333333vw 0 .9375vw;display:flex;flex-direction:column;align-items:center;justify-content:center}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._codewrap_1gn1l_302 ._codewrapBg_1gn1l_312{width:7.65625vw!important;height:7.55208333vw!important;top:0;left:0;position:absolute}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._codewrapSubmit_1gn1l_319{width:11.09375vw;height:1.82291667vw;border-radius:.9375vw;text-align:center;line-height:1.82291667vw;font-size:.72916667rem;color:#117de9;position:relative}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._codewrapSubmit_1gn1l_319 img{position:absolute;left:0;top:0;width:11.09375vw;height:1.82291667vw}._addStudentWrap_1gn1l_180 ._addStudentInfo_1gn1l_227 ._studentCore_1gn1l_246 ._studentCoreInfo_1gn1l_271 ._codewrapSubmit_1gn1l_319 span{font-weight:600}._addStudentWrap_1gn1l_180 ._studentBottom_1gn1l_339{width:21.875vw;position:absolute;left:-1.09375vw;bottom:-6.25vw;display:flex;flex-direction:column;align-items:center}._addStudentWrap_1gn1l_180 ._studentBottom_1gn1l_339 p{text-align:center;font-size:.83333333rem;color:#fff;margin-bottom:1.5625vw}._addStudentWrap_1gn1l_180 ._studentBottom_1gn1l_339 ._downBtn_1gn1l_354{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 ge=""+new URL("headerD-220e6507.png",t.meta.url).href,ue=i({name:"setting-personInfo",setup(){const e=s(),t=r(),i=c({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),T=g(),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 u((()=>{(async()=>{const e=await G();200===e?.code&&(i.areaList=e.data)})()})),()=>_("div",{class:n.infoWrap},[_("div",{class:n.teacherInfoWrap},[_("div",{class:n.teacherHeadWrap},[_(p,{previewDisabled:!0,class:n.headerD,src:ge},null),_(p,{previewDisabled:!0,class:n.defultHeade,src:L.avatar||a},null),_("div",{class:[n.defultHeade,n.changeHead,W.disabled?n.disalbedNone:n.hoverNone]},[h("修改头像"),W.uploadShow&&_(V,{class:[n.uploadFile],cropper:!0,"onUpdate:fileList":e=>{L.avatar=e,W.uploadShow=!1,setTimeout((()=>{W.uploadShow=!0}),100)}},null)])]),_("div",{class:n.headerInfo},[_("p",{class:n.headerTitle},[t.info.nickname,null!==t.info.gender&&_(p,{previewDisabled:!0,class:n.sexIcon,src:t.info.gender?o:d},null)]),_("p",{class:n.headerSubTitle},[t.info.schoolInfos?.[0]?.name])])]),_("div",{class:n.setInfo},[_(f,{ref:T,model:L,disabled:W.disabled},{default:()=>[_(v,{cols:3,"x-gap":"100"},{default:()=>[_(m,null,{default:()=>[_(b,{label:"姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[_(w,{maxlength:14,bordered:!W.disabled,placeholder:"请填写老师姓名",value:L.nickname,"onUpdate:value":e=>L.nickname=e},null)]})]}),_(m,null,{default:()=>[_(b,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写老师手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[_(w,{bordered:!W.disabled,placeholder:"请填写老师手机号",value:L.phone,"onUpdate:value":e=>L.phone=e},null)]})]}),_(m,null,{default:()=>[_(b,{label:"性别",path:"gender",rule:[{required:!0,type:"number",message:"请选择性别",trigger:"blur"}]},{default:()=>[_(y,{bordered:!W.disabled,class:n.select,showArrow:!W.disabled,placeholder:"请选择性别",options:i.sexs,value:L.gender,"onUpdate:value":e=>L.gender=e},null)]})]}),_(m,null,{default:()=>[_(b,{label:"城区",path:"provinceCode",rule:{required:!0,type:"number",message:"请选择城区",trigger:"change"}},{default:()=>[!W.loading&&_(Z,{bordered:!W.disabled,options:i.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,n)=>{L.provinceCode=n[0]?.code,L.cityCode=n[1]?.code,L.regionCode=n[2]?.code}},null)]})]})]})]})]),W.disabled?_(C,{class:n.btnList,align:"center",justify:"end"},{default:()=>[_(I,{class:n.btn,color:"#198cfe",onClick:()=>W.openChangePwd=!0},{default:()=>[h("修改密码")]}),_(I,{class:n.btn,color:"#f24433",onClick:()=>{W.oldTecherform=Object.assign({},L),W.disabled=!1}},{default:()=>[h("修改信息")]})]}):_(C,{class:n.btnList,align:"center",justify:"end"},{default:()=>[_(I,{class:n.btn,onClick:()=>{W.loading=!0,t.getInfo(),T.value?.restoreValidation(),W.disabled=!0,Object.assign(L,W.oldTecherform),k((()=>{W.loading=!1}))}},{default:()=>[h("取消")]}),_(I,{class:n.btn,type:"primary",onClick:()=>{T.value.validate((async n=>{n||(L.provinceCode&&L.cityCode?(await S(L),console.log(L),t.getInfo(),W.disabled=!0,e.success("修改成功")):e.error("请选择城区"))}))}},{default:()=>[h("完成")]})]}),_(x,{class:n.changePwdModal,show:W.openChangePwd,"onUpdate:show":e=>W.openChangePwd=e,preset:"dialog",showIcon:!1,title:"修改密码"},{default:()=>[_(l,{phone:t.info.phone,onClose:()=>{W.openChangePwd=!1}},null)]})])}}),_e="_logo_1gn1l_1",pe="_changeHead_1gn1l_12",he="_uploadFile_1gn1l_33",fe="_formWrap_1gn1l_41",ve="_schoolInfo_1gn1l_71",me="_errorBtn_1gn1l_92",be="_addTeacher_1gn1l_95",we="_btnList_1gn1l_169",ye="_btn_1gn1l_169",Ce="_addStudentWrap_1gn1l_180",Ie="_studentCLose_1gn1l_186",ke="_stunentStart_1gn1l_195",xe="_addTitle_1gn1l_206",Se="_addTeacherTitle_1gn1l_220",Te="_addStudentInfo_1gn1l_227",Le="_studentInfoBg_1gn1l_235",We="_studentCore_1gn1l_246",je="_schoolLogo_1gn1l_260",ze="_studentCoreInfo_1gn1l_271",Be="_studentCoreInfoSubtitle_1gn1l_293",Fe="_codewrap_1gn1l_302",Re="_codewrapSubmit_1gn1l_319",Ue="_studentBottom_1gn1l_339",Ae="_downBtn_1gn1l_354",qe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},$e=[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)],De=i({name:"Add",render:function(e,t){return T(),L("svg",qe,$e)}}),Pe=i({name:"teacher-operation",emits:["close"],props:{areaList:{type:Array,default:()=>[]}},setup(e,{emit:t}){const n=r(),l=c({provinceCode:"",cityCode:"",regionCode:"",tenantId:n.info.schoolInfos?.[0]?.tenantId,phone:null,schoolId:n.info.schoolInfos?.[0]?.id,nickname:null,gender:1}),a=g(!1),o=g(),d=s();return()=>_("div",null,[_(f,{model:l,ref:o,showRequireMark:!1,"label-placement":"left","label-width":"126"},{default:()=>[_(b,{label:"老师姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[_(w,{value:l.nickname,"onUpdate:value":e=>l.nickname=e,placeholder:"请输入老师姓名",clearable:!0,maxlength:14},null)]}),_(b,{label:"老师性别",path:"gender",rule:[{required:!0,message:"请选择老师性别"}]},{default:()=>[_(C,null,{default:()=>[_(j("n-button"),{class:"genderBtn",type:l.gender?"info":void 0,tertiary:!l.gender,onClick:()=>{l.gender=1}},{default:()=>[h("男")]}),_(j("n-button"),{class:"genderBtn",type:l.gender?void 0:"info",tertiary:!!l.gender,onClick:()=>{l.gender=0}},{default:()=>[h("女")]})]})]}),_(b,{label:"城区",path:"provinceCode",rule:[{required:!0,message:"请选择城区",trigger:"change"}]},{default:()=>[_(Z,{to:"body",placeholder:"请选择城区",options:e.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover","onUpdate:value":(e,t,n)=>{l.provinceCode=n[0]?.code+"",l.cityCode=n[1]?.code,l.regionCode=n[2]?.code}},null)]}),_(b,{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:()=>[_(w,{maxlength:11,value:l.phone,"onUpdate:value":e=>l.phone=e,placeholder:"请输入手机号",clearable:!0},null)]}),_("div",{class:"nalert"},[_(z,{type:"error",showIcon:!1,bordered:!1},{default:()=>[h("默认密码为yyszkt+手机号后四位")]})])]}),_(C,{style:{padding:"20px 0 32px 0"},justify:"center"},{default:()=>[_(I,{class:"actionBtn",round:!0,type:"default",onClick:()=>t("close")},{default:()=>[h("取消")]}),_(I,{class:"actionBtn",round:!0,type:"primary",onClick:()=>(async()=>{o.value.validate((async e=>{if(!e){try{a.value=!0,await J({...l}),d.success("添加成功")}catch(n){console.log(n)}setTimeout((()=>{a.value=!1,t("close")}),100)}}))})(),loading:a.value},{default:()=>[h("确定")]})]})])}}),Ee=""+new URL("studentTitle-beff5468.png",t.meta.url).href,Oe=""+new URL("teacherCore-bd5dba6c.png",t.meta.url).href,Ne=i({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}),s();const n=r();g();const l=`tenantId=${n.info.schoolInfos?.[0]?.tenantId}&schoolId=${n.info.schoolInfos?.[0]?.id}&schoolName=${n.info.schoolInfos?.[0]?.name}`,a=`${location.origin}/classroom-app/#/teaher-register?`+l,o=c({saveLoading:!1,image:null,shareLoading:!1}),d=()=>{if(!o.saveLoading)if(o.saveLoading=!0,o.image)i();else{const e=document.getElementById("preview-container");ae(e,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then((async e=>{const t=e.toDataURL("image/png");console.log(t,"url===>"),o.image=t,i()})).catch((()=>{console.log("生成图片失败url===>"),o.saveLoading=!1}))}},i=async()=>{setTimeout((()=>{o.saveLoading=!1}),100);const e=document.createElement("a");e.setAttribute("download","新增老师.png"),e.href=o.image,e.click()};return()=>_("div",{class:[Ce]},[_("div",{onClick:()=>{console.log("点击"),t("close")}},[_(p,{src:ee,previewDisabled:!0,class:Ie},null)]),_(p,{previewDisabled:!0,class:ke,src:te},null),_(p,{class:[xe,Se],previewDisabled:!0,src:Ee},null),_("div",{class:Te,id:"preview-container"},[_(p,{class:Le,previewDisabled:!0,src:Oe},null),_("div",{class:We},[_("img",{alt:"img",crossorigin:"anonymous",class:je,src:n.getUserInfo.schoolInfos[0].logo+`?some=${(new Date).getTime()}`},null),_("div",{class:ze},[_("h2",null,[n.getUserInfo.schoolInfos[0].name]),_("p",{class:Be},[h("邀请您成为"),_("span",null,[h("音乐数字课堂老师")])]),_("div",{class:Fe},[_(ne,{margin:0,text:a,size:119},null)]),_("div",{class:Re},[_(p,{previewDisabled:!0,src:le},null),h("请扫描上方二维码 "),_("span",null,[h("完成注册")])," "])])])]),_("div",{class:Ue},[_("p",null,[h("请将二维码图片发送给老师,扫码完成注册")]),_("div",{class:Ae,onClick:d},[h("下载图片")])])])}}),Me=i({name:"teacher-guide",emits:["close"],setup(e,{emit:t}){const n=c({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:oe("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:oe("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}),l=g(!1),a=g({});(async()=>{try{const e=await ie({guideTag:"teacher-guideInfo"});e.data?a.value=JSON.parse(e.data?.guideValue)||null:a.value={},a.value&&a.value.teacherGuide?l.value=!1:l.value=!0}catch(e){console.log(e)}})();const o=()=>{const e=document.getElementById(`teacher-${n.step}`);if(e){const t=e.getBoundingClientRect(),l=n.steps[n.step].eleRectPadding?.left||0,a=n.steps[n.step].eleRectPadding?.top||0,o=n.steps[n.step].eleRectPadding?.width||0,d=n.steps[n.step].eleRectPadding?.height||0;n.box={left:t.x-l+"px",top:t.y-a+"px",width:t.width+o+"px",height:t.height+d+"px"}}else s()},d=async e=>{try{if("base-setting"!==e)return;a.value?a.value.teacherGuide=!1:a.value={teacherGuide:!1};try{await se({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(a.value)})}catch(t){console.log(t)}n.step=0,o(),l.value=!0}catch{}};u((()=>{o(),window.addEventListener("resize",i),F.on("teacher-guideInfo",(e=>d(e)))}));const i=()=>{o()};R((()=>{window.removeEventListener("resize",i),F.off("teacher-guideInfo",d)}));const s=()=>{n.step>=4?r():(n.step=n.step+1,o())},r=async()=>{a.value?a.value.teacherGuide=!0:a.value={teacherGuide:!0};try{await se({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(a.value)})}catch(e){console.log(e)}l.value=!1};return()=>_(q,null,[l.value?U(_("div",{"onUpdate:show":e=>l.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[_("div",{class:de.content,onClick:()=>s()},[_("div",{class:de.backBtn,onClick:e=>{e.stopPropagation(),r()}},[h("跳过")]),_("div",{class:de.box,style:{...n.box,...n.steps[n.step].boxStyle},id:`modeType-${n.step}`},[n.steps.map(((e,t)=>_("div",{onClick:e=>e.stopPropagation(),class:de.item,style:"bottom"==e.type?{display:t===n.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===n.step?"":"none",left:`${e.eleRect?.left}px`,top:`${n.box?.height}`}},[_("img",{class:de.img,style:e.imgStyle,src:e.img},null),_("div",{class:de.btns,style:e.btnsStyle},[n.step+1==n.steps.length?_(q,null,[_("div",{class:[de.endBtn],onClick:()=>r()},[h("完成")]),_("div",{class:de.nextBtn,onClick:()=>{n.step=0,o()}},[h("再看一遍")])]):_("div",{class:de.btn,onClick:()=>s()},[h("下一步 ("),n.step+1,h("/"),n.steps.length,h(")")])])])))])])]),[[A,l.value,"show"]]):null])}}),He=i({name:"school-info",setup(){const e=r(),t=c({areaList:[]}),n=c({name:e.info.schoolInfos?.[0]?.name,logo:e.info.schoolInfos?.[0]?.logo||e.info.avatar,provinceCode:e.info.schoolInfos?.[0]?.provinceCode||"",cityCode:e.info.schoolInfos?.[0]?.cityCode||"",regionCode:e.info.schoolInfos?.[0]?.regionCode||""}),l=c({loading:!1,schoolLoading:!0,dataList:[],disabled:!0,modal:!1,qrModal:!1,oldTecherform:{},oldLoading:!1}),a=g(!1),o=async()=>{l.loading=!0;const t=await K({schoolId:e.info.schoolInfos?.[0]?.id,page:1,rows:1e3});l.loading=!1,200===t?.code&&Array.isArray(t?.data?.rows)&&(l.dataList=t.data.rows),setTimeout((()=>{a.value=!0}),500)};u((()=>{(async()=>{const e=await G();200===e?.code&&(t.areaList=e.data)})(),o()}));const d=$(),i=s(),v=e=>{const t="LOCKED"===e.status?"解冻":"冻结";d.warning({title:"温馨提示",content:`是否${t}"${e.nickname}"?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Q({ids:[e.id],status:"LOCKED"===e.status?"ACTIVATION":"LOCKED"}),o(),i.success(t+"成功")}})},m=e=>{d.warning({title:"警告",content:`重置"${e.nickname}"的密码,是否继续?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await X({userId:e.id,clientType:"TEACHER"}),i.success("重置成功")}})},y=g(),S=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()=>_("div",{class:ve},[_(f,{ref:y,class:fe,model:n,style:{padding:"30px 0"},disabled:l.disabled},{default:()=>[_(C,{size:[30,20]},{default:()=>[_("div",{class:_e},[_(p,{previewDisabled:!1,src:n.logo,objectFit:"contain"},null),_("div",{style:{display:l.disabled?"none":""},class:pe},[h("修改头像"),l.schoolLoading&&_(V,{class:[he],cropper:!0,"onUpdate:fileList":e=>{n.logo=e}},null)])]),_(b,{label:"学校名称",path:"name",showRequireMark:!1,rule:[{required:!0,message:"请填写学校名称",trigger:"blur"}]},{default:()=>[_(w,{bordered:!l.disabled,maxlength:20,value:n.name,"onUpdate:value":e=>n.name=e},null)]}),_(b,{label:"城区"},{default:()=>[!l.oldLoading&&_(Z,{placeholder:"请选择城区",bordered:!l.disabled,options:t.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:e.info.schoolInfos?.[0]?.regionCode||e.info.schoolInfos?.[0]?.cityCode||e.info.schoolInfos?.[0]?.provinceCode,"onUpdate:value":(e,t,l)=>{n.provinceCode=l[0]?.code,n.cityCode=l[1]?.code,n.regionCode=l[2]?.code}},null)]}),_(b,null,{default:()=>[l.disabled?_(C,{class:we,align:"center",justify:"end"},{default:()=>[_(I,{class:ye,color:"#f24433",onClick:()=>{l.oldTecherform=Object.assign({},n),l.disabled=!1}},{default:()=>[h("修改信息")]})]}):_(C,{class:we,align:"center",justify:"end"},{default:()=>[_(I,{class:ye,onClick:()=>{Object.assign(n,l.oldTecherform),l.disabled=!0,l.oldLoading=!0,k((()=>{l.oldLoading=!1}))}},{default:()=>[h("取消")]}),_(I,{class:ye,loading:!l.schoolLoading,type:"primary",onClick:()=>{y.value?.validate((async t=>{t||(l.schoolLoading=!1,await Y({...e.info.schoolInfos?.[0],...n}),l.schoolLoading=!0,i.success("修改成功"),l.disabled=!0)}))}},{default:()=>[h("完成")]})]})]})]})]}),_(C,{style:{padding:"32px 0"}},{default:()=>[_(I,D({focusable:!1},{id:"teacher-0"},{type:"primary",renderIcon:()=>_(E,{component:_(De,null,null)},null),onClick:()=>l.modal=!0}),{default:()=>[h("添加老师")]}),_(I,D({focusable:!1},{id:"teacher-1"},{type:"primary",onClick:()=>l.qrModal=!0}),{default:()=>[h("老师注册二维码")]})]}),_(P,{loading:l.loading,columns:[{title:"老师姓名",key:"nickname",render:e=>_("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>S(e.nickname)},[e.nickname])},{title:"手机号码",key:"phone",render:e=>_("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>S(e.phone)},[e.phone])},{title:"性别",key:"questionTypeCode",render:e=>_("div",null,[e.gender?"男":"女"])},{title:"状态",key:"statusName",render:e=>_("div",null,["ACTIVATION"===e.status?_(I,{text:!0},{default:()=>[h("启用")]}):_(I,{class:me,text:!0},{default:()=>[h("冻结")]})])},{title:"操作",key:"titleImg",render:e=>_(C,null,{default:()=>[_(I,{type:"primary",text:!0,onClick:()=>m(e)},{default:()=>[h("重置密码")]}),"ACTIVATION"===e.status?_(I,{disabled:"ADMIN"===e.jobType,type:"primary",text:!0,onClick:()=>v(e)},{default:()=>[h("冻结")]}):_(I,{class:me,text:!0,onClick:()=>v(e)},{default:()=>[h("解冻")]})]})}],data:l.dataList},{empty:()=>_(re,null,null)}),_(x,{class:be,show:l.modal,"onUpdate:show":e=>l.modal=e,title:"添加老师",preset:"dialog",showIcon:!1},{default:()=>[_(Pe,{areaList:t.areaList,onClose:()=>{l.modal=!1,o()}},null)]}),l.qrModal?U(_("div",{"onUpdate:show":e=>l.qrModal=e,class:"n-modal-mask"},[_(Ne,{onClose:()=>{l.qrModal=!1}},null)]),[[A,l.qrModal,"show"]]):null,a.value?_(Me,null,null):null])}});e("default",i({name:"base-setting",setup(e,{emit:t,attrs:l}){const a=g("person"),o=r(),d=O();return d.query.activeTab&&(a.value=d.query.activeTab,F.emit("base-setting-emit",a.value)),N((()=>d.query.activeTab),(e=>{a.value=e,F.emit("base-setting-emit",e)})),()=>_("div",{class:n.listWrap},[_(M,{class:n.customTabs,value:a.value,"onUpdate:value":[e=>a.value=e,e=>{F.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,{name:"person",tab:"个人信息"},{default:()=>[_(ue,null,null)]}),o.info.isSuperAdmin&&_(H,{name:"school",tab:"学校设置"},{default:()=>[_(He,null,null)]})]})])}}))}}}));