1 |
- import{s as p,F as he}from"./forgotPassword-da5e890b-1714304141006.js";import{d as me}from"./teacherIcon-b8e3946d-1714304141006.js";import{m as ve,f as be}from"./maleIcon-3fe0e51e-1714304141006.js";import{d as R,b as O,c as $,e as F,r as L,p as W,f as e,v as S,k as d,N as H,ay as Ce,az as M,g as k,h as q,G as ye,w as x,j as C,Q as de,l as re,aQ as we,aR as Ie,aS as _e,aT as ie,Z as ae,aU as Be,$ as E,A as P,R as Ee,W as ce,X as pe,F as oe,n as ke,x as ne,aE as Fe,V as Te,a as Se,y as xe,q as Le,t as se}from"./index-3c72d77b-1714304141006.js";import{U as ge}from"./index-141a5ee7-1714304141006.js";import{b as fe,c as Ae,a as De,d as Ne,e as Re,f as Ue}from"./api-43fd2c84-1714304141006.js";import{N as z}from"./Cascader-fa149f66-1714304141006.js";import{s as Pe,a as qe,T as $e,b as Ge,h as Me}from"./html2canvas.esm-71ed8747-1714304141006.js";import{g as le,s as T,a as Oe,b as ue}from"./api-cd38221f-1714304141006.js";import{T as je}from"./index-9c933a15-1714304141006.js";import"./api-9abc9926-1714304141006.js";import"./sendSms-49c8c8ac-1714304141006.js";const We=""+new URL("headerD-220e6507.png",import.meta.url).href,He=R({name:"setting-personInfo",setup(){var w,m,y,u;const g=O(),r=$(),a=F({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),t=L(),n=F({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:(m=(w=r.info.schoolInfos)==null?void 0:w[0])==null?void 0:m.id,tenantId:(u=(y=r.info.schoolInfos)==null?void 0:y[0])==null?void 0:u.tenantId,id:r.info.id,avatar:r.info.avatar}),s=F({disabled:!0,openChangePwd:!1,uploadShow:!0,loading:!1,oldTecherform:{}}),f=async()=>{const l=await fe();(l==null?void 0:l.code)===200&&(a.areaList=l.data)};W(()=>{f()});const _=()=>{t.value.validate(async l=>{if(!l){if(!n.provinceCode||!n.cityCode){g.error("请选择城区");return}await we(n),console.log(n),r.getInfo(),s.disabled=!0,g.success("修改成功")}})};return()=>{var l,b;return e("div",{class:p.infoWrap},[e("div",{class:p.teacherInfoWrap},[e("div",{class:p.teacherHeadWrap},[e(S,{previewDisabled:!0,class:p.headerD,src:We},null),e(S,{previewDisabled:!0,class:p.defultHeade,src:n.avatar||me},null),e("div",{class:[p.defultHeade,p.changeHead,s.disabled?p.disalbedNone:p.hoverNone]},[d("修改头像"),s.uploadShow&&e(ge,{class:[p.uploadFile],cropper:!0,"onUpdate:fileList":i=>{n.avatar=i,s.uploadShow=!1,setTimeout(()=>{s.uploadShow=!0},100)}},null)])]),e("div",{class:p.headerInfo},[e("p",{class:p.headerTitle},[r.info.nickname,r.info.gender!==null&&e(S,{previewDisabled:!0,class:p.sexIcon,src:r.info.gender?ve:be},null)]),e("p",{class:p.headerSubTitle},[(b=(l=r.info.schoolInfos)==null?void 0:l[0])==null?void 0:b.name])])]),e("div",{class:p.setInfo},[e(H,{ref:t,model:n,disabled:s.disabled},{default:()=>[e(Ce,{cols:3,"x-gap":"100"},{default:()=>[e(M,null,{default:()=>[e(k,{label:"姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[e(q,{maxlength:14,bordered:!s.disabled,placeholder:"请填写老师姓名",value:n.nickname,"onUpdate:value":i=>n.nickname=i},null)]})]}),e(M,null,{default:()=>[e(k,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写老师手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[e(q,{bordered:!s.disabled,placeholder:"请填写老师手机号",value:n.phone,"onUpdate:value":i=>n.phone=i},null)]})]}),e(M,null,{default:()=>[e(k,{label:"性别",path:"gender",rule:[{required:!0,type:"number",message:"请选择性别",trigger:"blur"}]},{default:()=>[e(ye,{bordered:!s.disabled,class:p.select,showArrow:!s.disabled,placeholder:"请选择性别",options:a.sexs,value:n.gender,"onUpdate:value":i=>n.gender=i},null)]})]}),e(M,null,{default:()=>[e(k,{label:"城区",path:"provinceCode",rule:{required:!0,type:"number",message:"请选择城区",trigger:"change"}},{default:()=>[!s.loading&&e(z,{bordered:!s.disabled,options:a.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:r.info.regionCode||r.info.cityCode||r.info.provinceCode,"onUpdate:value":(i,I,h)=>{var B,D,N;n.provinceCode=(B=h[0])==null?void 0:B.code,n.cityCode=(D=h[1])==null?void 0:D.code,n.regionCode=(N=h[2])==null?void 0:N.code}},null)]})]})]})]})]),s.disabled?e(x,{class:p.btnList,align:"center",justify:"end"},{default:()=>[e(C,{class:p.btn,color:"#198cfe",onClick:()=>s.openChangePwd=!0},{default:()=>[d("修改密码")]}),e(C,{class:p.btn,color:"#f24433",onClick:()=>{s.oldTecherform=Object.assign({},n),s.disabled=!1}},{default:()=>[d("修改信息")]})]}):e(x,{class:p.btnList,align:"center",justify:"end"},{default:()=>[e(C,{class:p.btn,onClick:()=>{var i;s.loading=!0,r.getInfo(),(i=t.value)==null||i.restoreValidation(),s.disabled=!0,Object.assign(n,s.oldTecherform),de(()=>{s.loading=!1})}},{default:()=>[d("取消")]}),e(C,{class:p.btn,type:"primary",onClick:()=>_()},{default:()=>[d("完成")]})]}),e(re,{class:p.changePwdModal,show:s.openChangePwd,"onUpdate:show":i=>s.openChangePwd=i,preset:"dialog",showIcon:!1,title:"修改密码"},{default:()=>[e(he,{phone:r.info.phone,onClose:()=>{s.openChangePwd=!1}},null)]})])}}}),ze="_logo_1gn1l_1",Ve="_changeHead_1gn1l_12",Qe="_uploadFile_1gn1l_33",Je="_formWrap_1gn1l_41",Ke="_schoolInfo_1gn1l_71",Xe="_errorBtn_1gn1l_92",Ze="_addTeacher_1gn1l_95",Ye="_btnList_1gn1l_169",et="_btn_1gn1l_169",tt="_addStudentWrap_1gn1l_180",at="_studentCLose_1gn1l_186",ot="_stunentStart_1gn1l_195",nt="_addTitle_1gn1l_206",st="_addTeacherTitle_1gn1l_220",lt="_addStudentInfo_1gn1l_227",ut="_studentInfoBg_1gn1l_235",dt="_studentCore_1gn1l_246",rt="_schoolLogo_1gn1l_260",it="_studentCoreInfo_1gn1l_271",ct="_studentCoreInfoSubtitle_1gn1l_293",pt="_codewrap_1gn1l_302",gt="_codewrapBg_1gn1l_312",ft="_codewrapSubmit_1gn1l_319",ht="_studentBottom_1gn1l_339",mt="_downBtn_1gn1l_354",c={logo:ze,changeHead:Ve,uploadFile:Qe,formWrap:Je,schoolInfo:Ke,errorBtn:Xe,addTeacher:Ze,btnList:Ye,btn:et,addStudentWrap:tt,studentCLose:at,stunentStart:ot,addTitle:nt,addTeacherTitle:st,addStudentInfo:lt,studentInfoBg:ut,studentCore:dt,schoolLogo:rt,studentCoreInfo:it,studentCoreInfoSubtitle:ct,codewrap:pt,codewrapBg:gt,codewrapSubmit:ft,studentBottom:ht,downBtn:mt},vt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},bt=ie("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null,-1),Ct=ie("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null,-1),yt=[bt,Ct],wt=R({name:"Add",render:function(r,a){return Ie(),_e("svg",vt,yt)}}),It=R({name:"teacher-operation",emits:["close"],props:{areaList:{type:Array,default:()=>[]}},setup(g,{emit:r}){var w,m,y,u;const a=$(),t=F({provinceCode:"",cityCode:"",regionCode:"",tenantId:(m=(w=a.info.schoolInfos)==null?void 0:w[0])==null?void 0:m.tenantId,phone:null,schoolId:(u=(y=a.info.schoolInfos)==null?void 0:y[0])==null?void 0:u.id,nickname:null,gender:1}),n=L(!1),s=L(),f=O(),_=async()=>{s.value.validate(async l=>{if(!l){try{n.value=!0,await Ae({...t}),f.success("添加成功")}catch(b){console.log(b)}setTimeout(()=>{n.value=!1,r("close")},100)}})};return()=>e("div",null,[e(H,{model:t,ref:s,showRequireMark:!1,"label-placement":"left","label-width":"126"},{default:()=>[e(k,{label:"老师姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[e(q,{value:t.nickname,"onUpdate:value":l=>t.nickname=l,placeholder:"请输入老师姓名",clearable:!0,maxlength:14},null)]}),e(k,{label:"老师性别",path:"gender",rule:[{required:!0,message:"请选择老师性别"}]},{default:()=>[e(x,null,{default:()=>[e(ae("n-button"),{class:"genderBtn",type:t.gender?"info":void 0,tertiary:!t.gender,onClick:()=>{t.gender=1}},{default:()=>[d("男")]}),e(ae("n-button"),{class:"genderBtn",type:t.gender?void 0:"info",tertiary:!!t.gender,onClick:()=>{t.gender=0}},{default:()=>[d("女")]})]})]}),e(k,{label:"城区",path:"provinceCode",rule:[{required:!0,message:"请选择城区",trigger:"change"}]},{default:()=>[e(z,{to:"body",placeholder:"请选择城区",options:g.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover","onUpdate:value":(l,b,i)=>{var I,h,B;t.provinceCode=((I=i[0])==null?void 0:I.code)+"",t.cityCode=(h=i[1])==null?void 0:h.code,t.regionCode=(B=i[2])==null?void 0:B.code}},null)]}),e(k,{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(q,{maxlength:11,value:t.phone,"onUpdate:value":l=>t.phone=l,placeholder:"请输入手机号",clearable:!0},null)]}),e("div",{class:"nalert"},[e(Be,{type:"error",showIcon:!1,bordered:!1},{default:()=>[d("默认密码为yyszkt+手机号后四位")]})])]}),e(x,{style:{padding:"20px 0 32px 0"},justify:"center"},{default:()=>[e(C,{class:"actionBtn",round:!0,type:"default",onClick:()=>r("close")},{default:()=>[d("取消")]}),e(C,{class:"actionBtn",round:!0,type:"primary",onClick:()=>_(),loading:n.value},{default:()=>[d("确定")]})]})])}}),_t=""+new URL("studentTitle-beff5468.png",import.meta.url).href,Bt=""+new URL("teacherCore-bd5dba6c.png",import.meta.url).href,Et=R({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(g,{emit:r}){var w,m,y,u,l,b;F({uploading:!1}),O();const a=$();L();const t="tenantId=".concat((m=(w=a.info.schoolInfos)==null?void 0:w[0])==null?void 0:m.tenantId,"&schoolId=").concat((u=(y=a.info.schoolInfos)==null?void 0:y[0])==null?void 0:u.id,"&schoolName=").concat((b=(l=a.info.schoolInfos)==null?void 0:l[0])==null?void 0:b.name),n="".concat(location.origin,"/classroom-app/#/teaher-register?")+t,s=F({saveLoading:!1,image:null,shareLoading:!1}),f=()=>{if(!s.saveLoading)if(s.saveLoading=!0,s.image)_();else{const i=document.getElementById("preview-container");Me(i,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async I=>{const h=I.toDataURL("image/png");console.log(h,"url===>"),s.image=h,_()}).catch(()=>{console.log("生成图片失败url===>"),s.saveLoading=!1})}},_=async()=>{setTimeout(()=>{s.saveLoading=!1},100);const i=document.createElement("a");i.setAttribute("download","新增老师.png"),i.href=s.image,i.click()};return()=>e("div",{class:[c.addStudentWrap]},[e("div",{onClick:()=>{console.log("点击"),r("close")}},[e(S,{src:Pe,previewDisabled:!0,class:c.studentCLose},null)]),e(S,{previewDisabled:!0,class:c.stunentStart,src:qe},null),e(S,{class:[c.addTitle,c.addTeacherTitle],previewDisabled:!0,src:_t},null),e("div",{class:c.addStudentInfo,id:"preview-container"},[e(S,{class:c.studentInfoBg,previewDisabled:!0,src:Bt},null),e("div",{class:c.studentCore},[e("img",{alt:"img",crossorigin:"anonymous",class:c.schoolLogo,src:a.getUserInfo.schoolInfos[0].logo+"?some=".concat(new Date().getTime())},null),e("div",{class:c.studentCoreInfo},[e("h2",null,[a.getUserInfo.schoolInfos[0].name]),e("p",{class:c.studentCoreInfoSubtitle},[d("邀请您成为"),e("span",null,[d("音乐数字课堂老师")])]),e("div",{class:c.codewrap},[e($e,{margin:0,text:n,size:119},null)]),e("div",{class:c.codewrapSubmit},[e(S,{previewDisabled:!0,src:Ge},null),d("请扫描上方二维码 "),e("span",null,[d("完成注册")])," "])])])]),e("div",{class:c.studentBottom},[e("p",null,[d("请将二维码图片发送给老师,扫码完成注册")]),e("div",{class:c.downBtn,onClick:f},[d("下载图片")])])])}}),kt=R({name:"teacher-guide",emits:["close"],setup(g,{emit:r}){const a=F({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:le("teacher1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:E(-4),left:E(-75),width:E(472),height:E(230)},btnsStyle:{bottom:E(30),left:E(-84)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}},{ele:"",img:le("teacher2.png"),imgStyle:{top:E(-4),left:E(-142),width:E(559),height:E(230)},btnsStyle:{bottom:E(30),left:E(-154)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}}],step:0}),t=L(!1),n=L({});(async()=>{var u;try{const l=await Oe({guideTag:"teacher-guideInfo"});l.data?n.value=JSON.parse((u=l.data)==null?void 0:u.guideValue)||null:n.value={},n.value&&n.value.teacherGuide?t.value=!1:t.value=!0}catch(l){console.log(l)}})();const f=()=>{var l,b,i,I;const u=document.getElementById("teacher-".concat(a.step));if(u){const h=u.getBoundingClientRect(),B=((l=a.steps[a.step].eleRectPadding)==null?void 0:l.left)||0,D=((b=a.steps[a.step].eleRectPadding)==null?void 0:b.top)||0,N=((i=a.steps[a.step].eleRectPadding)==null?void 0:i.width)||0,G=((I=a.steps[a.step].eleRectPadding)==null?void 0:I.height)||0;a.box={left:h.x-B+"px",top:h.y-D+"px",width:h.width+N+"px",height:h.height+G+"px"}}else m()},_=async u=>{try{if(u!=="base-setting")return;n.value?n.value.teacherGuide=!1:n.value={teacherGuide:!1};try{await ue({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(l){console.log(l)}a.step=0,f(),t.value=!0}catch(l){}};W(()=>{f(),window.addEventListener("resize",w),P.on("teacher-guideInfo",u=>_(u))});const w=()=>{f()};Ee(()=>{window.removeEventListener("resize",w),P.off("teacher-guideInfo",_)});const m=()=>{if(a.step>=4){y();return}a.step=a.step+1,f()},y=async()=>{n.value?n.value.teacherGuide=!0:n.value={teacherGuide:!0};try{const u=await ue({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(u){console.log(u)}t.value=!1};return()=>e(oe,null,[t.value?ce(e("div",{"onUpdate:show":u=>t.value=u,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:T.content,onClick:()=>m()},[e("div",{class:T.backBtn,onClick:u=>{u.stopPropagation(),y()}},[d("跳过")]),e("div",{class:T.box,style:{...a.box,...a.steps[a.step].boxStyle},id:"modeType-".concat(a.step)},[a.steps.map((u,l)=>{var b,i,I,h;return e("div",{onClick:B=>B.stopPropagation(),class:T.item,style:u.type=="bottom"?{display:l===a.step?"":"none",left:"".concat((b=u.eleRect)==null?void 0:b.left,"px"),top:"-".concat((i=u.imgStyle)==null?void 0:i.height)}:{display:l===a.step?"":"none",left:"".concat((I=u.eleRect)==null?void 0:I.left,"px"),top:"".concat((h=a.box)==null?void 0:h.height)}},[e("img",{class:T.img,style:u.imgStyle,src:u.img},null),e("div",{class:T.btns,style:u.btnsStyle},[a.step+1==a.steps.length?e(oe,null,[e("div",{class:[T.endBtn],onClick:()=>y()},[d("完成")]),e("div",{class:T.nextBtn,onClick:()=>{a.step=0,f()}},[d("再看一遍")])]):e("div",{class:T.btn,onClick:()=>m()},[d("下一步 ("),a.step+1,d("/"),a.steps.length,d(")")])])])})])])]),[[pe,t.value,"show"]]):null])}}),Ft=R({name:"school-info",setup(){var I,h,B,D,N,G,V,Q,J,K;const g=$(),r=F({areaList:[]}),a=F({name:(h=(I=g.info.schoolInfos)==null?void 0:I[0])==null?void 0:h.name,logo:((D=(B=g.info.schoolInfos)==null?void 0:B[0])==null?void 0:D.logo)||g.info.avatar,provinceCode:((G=(N=g.info.schoolInfos)==null?void 0:N[0])==null?void 0:G.provinceCode)||"",cityCode:((Q=(V=g.info.schoolInfos)==null?void 0:V[0])==null?void 0:Q.cityCode)||"",regionCode:((K=(J=g.info.schoolInfos)==null?void 0:J[0])==null?void 0:K.regionCode)||""}),t=F({loading:!1,schoolLoading:!0,dataList:[],disabled:!0,modal:!1,qrModal:!1,oldTecherform:{},oldLoading:!1}),n=L(!1),s=()=>[{title:"老师姓名",key:"nickname",render:o=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>i(o.nickname)},[o.nickname])},{title:"手机号码",key:"phone",render:o=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>i(o.phone)},[o.phone])},{title:"性别",key:"questionTypeCode",render:o=>e("div",null,[o.gender?"男":"女"])},{title:"状态",key:"statusName",render:o=>e("div",null,[o.status==="ACTIVATION"?e(C,{text:!0},{default:()=>[d("启用")]}):e(C,{class:c.errorBtn,text:!0},{default:()=>[d("冻结")]})])},{title:"操作",key:"titleImg",render:o=>e(x,null,{default:()=>[e(C,{type:"primary",text:!0,onClick:()=>u(o)},{default:()=>[d("重置密码")]}),o.status==="ACTIVATION"?e(C,{disabled:o.jobType==="ADMIN",type:"primary",text:!0,onClick:()=>y(o)},{default:()=>[d("冻结")]}):e(C,{class:c.errorBtn,text:!0,onClick:()=>y(o)},{default:()=>[d("解冻")]})]})}],f=async()=>{const o=await fe();(o==null?void 0:o.code)===200&&(r.areaList=o.data)},_=async()=>{var v,A,U;t.loading=!0;const o=await De({schoolId:(A=(v=g.info.schoolInfos)==null?void 0:v[0])==null?void 0:A.id,page:1,rows:1e3});t.loading=!1,(o==null?void 0:o.code)===200&&Array.isArray((U=o==null?void 0:o.data)==null?void 0:U.rows)&&(t.dataList=o.data.rows),setTimeout(()=>{n.value=!0},500)};W(()=>{f(),_()});const w=ke(),m=O(),y=o=>{const v=o.status==="LOCKED"?"解冻":"冻结";w.warning({title:"温馨提示",content:"是否".concat(v,'"').concat(o.nickname,'"?'),positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Ne({ids:[o.id],status:o.status==="LOCKED"?"ACTIVATION":"LOCKED"}),_(),m.success(v+"成功")}})},u=o=>{w.warning({title:"警告",content:'重置"'.concat(o.nickname,'"的密码,是否继续?'),positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Re({userId:o.id,clientType:"TEACHER"}),m.success("重置成功")}})},l=L(),b=()=>{var o;(o=l.value)==null||o.validate(async v=>{var A;v||(t.schoolLoading=!1,await Ue({...(A=g.info.schoolInfos)==null?void 0:A[0],...a}),t.schoolLoading=!0,m.success("修改成功"),t.disabled=!0)})},i=o=>{const v=document.createElement("input");v.value=o,document.body.appendChild(v),v.select(),v.setSelectionRange(0,v.value.length),document.execCommand("Copy"),document.body.removeChild(v),m.success("复制成功")};return()=>e("div",{class:c.schoolInfo},[e(H,{ref:l,class:c.formWrap,model:a,style:{padding:"30px 0"},disabled:t.disabled},{default:()=>[e(x,{size:[30,20]},{default:()=>[e("div",{class:c.logo},[e(S,{previewDisabled:!1,src:a.logo,objectFit:"contain"},null),e("div",{style:{display:t.disabled?"none":""},class:c.changeHead},[d("修改头像"),t.schoolLoading&&e(ge,{class:[c.uploadFile],cropper:!0,"onUpdate:fileList":o=>{a.logo=o}},null)])]),e(k,{label:"学校名称",path:"name",showRequireMark:!1,rule:[{required:!0,message:"请填写学校名称",trigger:"blur"}]},{default:()=>[e(q,{bordered:!t.disabled,maxlength:20,value:a.name,"onUpdate:value":o=>a.name=o},null)]}),e(k,{label:"城区"},{default:()=>{var o,v,A,U,X,Z;return[!t.oldLoading&&e(z,{placeholder:"请选择城区",bordered:!t.disabled,options:r.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:((v=(o=g.info.schoolInfos)==null?void 0:o[0])==null?void 0:v.regionCode)||((U=(A=g.info.schoolInfos)==null?void 0:A[0])==null?void 0:U.cityCode)||((Z=(X=g.info.schoolInfos)==null?void 0:X[0])==null?void 0:Z.provinceCode),"onUpdate:value":(Tt,St,j)=>{var Y,ee,te;a.provinceCode=(Y=j[0])==null?void 0:Y.code,a.cityCode=(ee=j[1])==null?void 0:ee.code,a.regionCode=(te=j[2])==null?void 0:te.code}},null)]}}),e(k,null,{default:()=>[t.disabled?e(x,{class:c.btnList,align:"center",justify:"end"},{default:()=>[e(C,{class:c.btn,color:"#f24433",onClick:()=>{t.oldTecherform=Object.assign({},a),t.disabled=!1}},{default:()=>[d("修改信息")]})]}):e(x,{class:c.btnList,align:"center",justify:"end"},{default:()=>[e(C,{class:c.btn,onClick:()=>{Object.assign(a,t.oldTecherform),t.disabled=!0,t.oldLoading=!0,de(()=>{t.oldLoading=!1})}},{default:()=>[d("取消")]}),e(C,{class:c.btn,loading:!t.schoolLoading,type:"primary",onClick:()=>b()},{default:()=>[d("完成")]})]})]})]})]}),e(x,{style:{padding:"32px 0"}},{default:()=>[e(C,ne({focusable:!1},{id:"teacher-0"},{type:"primary",renderIcon:()=>e(Te,{component:e(wt,null,null)},null),onClick:()=>t.modal=!0}),{default:()=>[d("添加老师")]}),e(C,ne({focusable:!1},{id:"teacher-1"},{type:"primary",onClick:()=>t.qrModal=!0}),{default:()=>[d("老师注册二维码")]})]}),e(Fe,{loading:t.loading,columns:s(),data:t.dataList},{empty:()=>e(je,null,null)}),e(re,{class:c.addTeacher,show:t.modal,"onUpdate:show":o=>t.modal=o,title:"添加老师",preset:"dialog",showIcon:!1},{default:()=>[e(It,{areaList:r.areaList,onClose:()=>{t.modal=!1,_()}},null)]}),t.qrModal?ce(e("div",{"onUpdate:show":o=>t.qrModal=o,class:"n-modal-mask"},[e(Et,{onClose:()=>{t.qrModal=!1}},null)]),[[pe,t.qrModal,"show"]]):null,n.value?e(kt,null,null):null])}}),Ot=R({name:"base-setting",setup(g,{emit:r,attrs:a}){const t=L("person"),n=$(),s=Se();return s.query.activeTab&&(t.value=s.query.activeTab,P.emit("base-setting-emit",t.value)),xe(()=>s.query.activeTab,f=>{t.value=f,P.emit("base-setting-emit",f)}),()=>e("div",{class:p.listWrap},[e(Le,{class:p.customTabs,value:t.value,"onUpdate:value":[f=>t.value=f,f=>{P.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(se,{name:"person",tab:"个人信息"},{default:()=>[e(He,null,null)]}),n.info.isSuperAdmin&&e(se,{name:"school",tab:"学校设置"},{default:()=>[e(Ft,null,null)]})]})])}});export{Ot as default};
|