1 |
- !function(){var e=document.createElement("style");e.innerHTML="._detailCellGroup_x1k9o_1{margin:.32rem .34667rem;overflow:hidden;border-radius:.26667rem}._manageTeacher_x1k9o_6{--van-dialog-message-font-size: .42667rem !important}._sectionCellGroup_x1k9o_9 .van-cell{padding:.48rem .4rem;font-size:.42667rem}._detailCell_x1k9o_1{padding:.4rem .34667rem}._detailCell_x1k9o_1 ._img_x1k9o_16{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.26667rem}._detailCell_x1k9o_1 ._name_x1k9o_23{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:5.86667rem}._detailCell_x1k9o_1 ._phone_x1k9o_30{padding-top:.05333rem;font-size:.37333rem;color:#777;line-height:.53333rem}._sectionTitle_x1k9o_36{padding:.21333rem .34667rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._sectionTitle_x1k9o_36 i{display:inline-block;margin-right:.16rem;width:.10667rem;height:.32rem;background:#ff8057;border-radius:.05333rem}._functionGrid_x1k9o_51{margin:.32rem .34667rem;padding:.26667rem 0;background:#ffffff;border-radius:.32rem;overflow:hidden}._functionGrid_x1k9o_51 ._functionImg_x1k9o_58{width:1.17333rem;height:1.17333rem}._functionGrid_x1k9o_51 ._functionText_x1k9o_62{max-width:1.33333rem;padding-top:.13333rem;font-size:.32rem;color:#333;line-height:.45333rem}._functionGrid_x1k9o_51 .van-grid-item__content{padding-top:.26667rem;padding-bottom:.26667rem}._dialogTitle_x1k9o_73{padding-left:.66667rem;text-align:left;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;padding-bottom:.32rem}._dialogTitle_x1k9o_73 i{display:inline-block;width:.10667rem;height:.37333rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._menuFunction_1ghfh_1{min-height:100vh;background-color:#f8f8f8}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5{margin:.32rem .34667rem;padding-bottom:.32rem;background-color:#fff;border-radius:.26667rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 h2{padding:.32rem .32rem .21333rem;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 ._functionImg_1ghfh_18{width:1.25333rem;height:1.25333rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 ._gray_1ghfh_22{transition:all .3s ease;filter:grayscale(100%);opacity:.76}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 ._functionText_1ghfh_27{max-width:1.33333rem;padding-top:.13333rem;font-size:.32rem;color:#333;line-height:.45333rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 .van-grid-item__content{padding-top:.26667rem;padding-bottom:.26667rem}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.b1009ea0.js","./index-legacy.761bf286.js","./index-legacy.fecc738b.js","./index-legacy.10d8486a.js","./icon_teacher-legacy.07765f44.js","./index-legacy.ad813f4d.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js"],(function(e){"use strict";var t,n,i,o,a,l,s,u,r,c,d,m,_,g,h,f,p,x,v,k,y,C,b,T;return{setters:[function(e){t=e.d,n=e.r,i=e.$,o=e.c,a=e.aj,l=e.q,s=e.B,u=e.m,r=e.ah,c=e.R,d=e.F,m=e.g,_=e.b3,g=e.al,h=e.o},function(e){f=e.O},function(e){p=e.G,x=e.a},function(e){v=e.I},function(e){k=e.S},function(e){y=e.i},function(e){C=e.O},function(e){b=e.C},function(e){T=e.C}],execute:function(){var I={detailCellGroup:"_detailCellGroup_x1k9o_1",manageTeacher:"_manageTeacher_x1k9o_6",sectionCellGroup:"_sectionCellGroup_x1k9o_9",detailCell:"_detailCell_x1k9o_1",img:"_img_x1k9o_16",name:"_name_x1k9o_23",phone:"_phone_x1k9o_30",sectionTitle:"_sectionTitle_x1k9o_36",functionGrid:"_functionGrid_x1k9o_51",functionImg:"_functionImg_x1k9o_58",functionText:"_functionText_x1k9o_62",dialogTitle:"_dialogTitle_x1k9o_73"};var w={menuFunction:"_menuFunction_1ghfh_1",menuContent:"_menuContent_1ghfh_5",functionImg:"_functionImg_1ghfh_18",gray:"_gray_1ghfh_22",functionText:"_functionText_1ghfh_27"},G=t({name:"menu-function",props:{teacherId:{type:String,default:""},menus:{type:Array||String,default:[]}},emits:["close","success"],setup(e,{slots:t,attrs:r,emit:c}){const d=n({list:[],selectMenus:[]}),m=e=>d.selectMenus.includes(e),_=async()=>{try{const t=[];d.list&&d.list.forEach((e=>{m(e.id)&&t.push({buttonImage:e.buttonImage,sortOrder:e.order,id:e.id,title:e.title,homePage:e.homePage})})),await u.post("/api-school/schoolStaff/updateButton",{hideLoading:!1,data:{teacherId:e.teacherId,menuButtons:[...t]}}),c("close"),c("success")}catch{}};return i((()=>{(async()=>{try{const{data:e}=await u.post("/api-school/sysMenuButton/page",{data:{auditFlag:!1,status:!0,clientType:"SCHOOL",page:1,rows:100}});d.list=e.rows||[]}catch{}})();const t=(e.menus?e.menus:[]).map((e=>e.id));d.selectMenus=[...t]})),()=>o("div",{class:w.menuFunction},[o(a,{desotry:!1},null),o("div",{class:w.menuContent},[o("h2",null,[l("全部功能")]),o(p,{border:!1,class:w.functionGrid},{default:()=>[d.list&&d.list.map((e=>o(x,{onClick:()=>(e=>{if(m(e.id)){const t=d.selectMenus.findIndex((t=>t===e.id));d.selectMenus.splice(t,1)}else d.selectMenus.push(e.id)})(e),class:m(e.id)?"":w.gray},{icon:()=>o(v,{class:[w.functionImg],src:e.buttonImage},null),text:()=>o("div",{class:[w.functionText,"van-ellipsis"]},[e.title])})))]})]),o(k,{position:"bottom"},{default:()=>[o("div",{class:"btnGroup"},[o(s,{block:!0,round:!0,type:"primary",onClick:_},{default:()=>[l("确认修改")]})])]})])}});e("default",t({name:"manage-detail",setup(){const e=r(),t=c({}),k=n({menuStatus:!1,status:!1}),w=async()=>{try{const n=e.query,{data:i}=await u.get("/api-school/schoolStaff/detail/"+n.id);t.value={...i}}catch{}},S=async()=>{try{const n=e.query;await u.post("/api-school/schoolStaff/freeze/"+n.id,{hideLoading:!1}),setTimeout((()=>{"ACTIVATION"===t.value.status?(t.value.status="LOCKED",h("冻结成功")):(t.value.status="ACTIVATION",h("解冻成功"))}),100)}catch{}};return i((()=>{w()})),()=>{let e;return o("div",{class:I.manageTeacher},[o(a,null,null),o(b,{inset:!0,class:I.detailCellGroup},{default:()=>[o(T,{center:!0,class:I.detailCell},{icon:()=>o(v,{class:I.img,src:t.value.avatar?t.value.avatar:y},null),title:()=>o("div",{class:I.content},[o("p",{class:[I.name,"van-ellipsis"]},[t.value.nickname]),o("p",{class:I.phone},[t.value.phone])])})]}),o("div",{class:I.sectionTitle},[o("i",null,null),l("基本信息")]),o(b,{inset:!0,class:[I.detailCellGroup,I.sectionCellGroup]},{default:()=>[o(T,{title:"手机号码",value:t.value.phone},null),o(T,{title:"性别",value:1==t.value.gender?"男":0==t.value.gender?"女":""},null)]}),t.value.menuButtons&&t.value.menuButtons.length>0&&o(d,null,[o("div",{class:I.sectionTitle},[o("i",null,null),l("功能权限")]),o(p,{border:!1,class:I.functionGrid},(n=e=t.value.menuButtons.map((e=>o(x,null,{icon:()=>o(v,{class:I.functionImg,src:e.buttonImage},null),text:()=>o("div",{class:[I.functionText,"van-ellipsis"]},[e.title])}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!g(n)?e:{default:()=>[e]}))]),o(C,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup","btnMore"],style:{paddingLeft:"13px",paddingRight:"13px"}},[m.user.data.manageAdmin&&o(s,{type:"primary",round:!0,onClick:()=>k.menuStatus=!0},{default:()=>[l("修改权限")]}),o(s,{type:"primary",round:!0,color:"#64A9FF",onClick:()=>k.status=!0},{default:()=>["ACTIVATION"===t.value.status&&"冻结账号","LOCKED"===t.value.status&&"解冻账号"]})])]}),o(f,{modelValue:k.menuStatus,"onUpdate:modelValue":e=>k.menuStatus=e,destroy:!0},{default:()=>[o(G,{onClose:()=>k.menuStatus=!1,onSuccess:()=>w(),teacherId:t.value.id,menus:t.value.menuButtons},null)]}),o(_,{show:k.status,"onUpdate:show":e=>k.status=e,message:""+("ACTIVATION"===t.value.status?"冻结后该管理老师将无法登录\n确认需要冻结吗?":"确认需要解冻吗?"),messageAlign:"left",showCancelButton:!0,onConfirm:S},{title:()=>o("div",{class:I.dialogTitle},[o("i",null,null),"ACTIVATION"===t.value.status?"冻结":"解冻",l("管理老师")])})]);var n}}}))}}}))}();
|