import{_ as a,r as e,V as s,p as t,ag as l,a6 as u,u as n,v as i,a as r,C as c,d as o,w as m,F as f,ah as d,P as g,i as _,y as p,a3 as w,a4 as v,j as b,L as y,e as h,H as k,D as x,f as j,c as A}from"./index-BlslIQWi.js";const C=a({__name:"my",setup(a){const C=e({}),$=JSON.parse(s("loginUser")),z=t((()=>0===(C.value.depts||[]).length?"未设置部门":C.value.depts.join("、"))),D=t((()=>{const a=C.value.userAgent;return a?`（${a.user.name}）${a.effective?"代理中":"代理未生效"}`:"未设置"}));function I(){d(),g({url:"/pages/login/login"})}function N(){g({url:"/pages/my/UserAgent"})}return l((()=>{u($.userId).then((a=>{C.value=a.data})).catch((a=>{}))})),(a,e)=>{const s=_,t=n(i("uni-tag"),p),l=j,u=n(i("uni-list-item"),w),d=n(i("uni-list"),v),g=b;return r(),c(f,null,[o(s,{class:"w-user-info"},{default:m((()=>[o(y,{name:C.value.username,src:C.value.avatar,size:70,showName:!1},null,8,["name","src"]),o(s,{class:"w-user-name"},{default:m((()=>[h(k(C.value.username),1)])),_:1}),(r(!0),c(f,null,x(C.value.roles||[],((a,e)=>(r(),A(t,{class:"w-user-role",type:"warning",size:"mini",text:a,inverted:"",key:`r${e}`},null,8,["text"])))),128))])),_:1}),o(d,{class:"w-user-items"},{default:m((()=>[o(u,{thumb:"/static/image/dept.png",clickable:""},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[h("所属部门")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[h(k(z.value),1)])),_:1})])),_:1}),o(u,{thumb:"/static/image/entry.png",clickable:""},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[h("入职时间")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[h(k(C.value.entryDate),1)])),_:1})])),_:1}),o(u,{thumb:"/static/image/agent.png",clickable:"",showArrow:"",onClick:N},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[h("设置代理人")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[h(k(D.value),1)])),_:1})])),_:1})])),_:1}),o(g,{class:"w-user-logout",onClick:I,plain:"true",type:"warn"},{default:m((()=>[h("退出/切换 账号")])),_:1})],64)}}},[["__scopeId","data-v-f9eb6b66"]]);export{C as default};
