2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{g as A,y as K,r as v,_ as z,W as J,k as p,m as b,n as t,p as e,l as s,t as o,J as y,F as n,E as r,D as _,G,H as S,aj as M,ak as F}from"./vendor/index.CRpmXtWV.js";import{g as H}from"./profile.Bczm-zFn.js";import{c as O,d as W,R as q,a as Q,p as X,_ as Y}from"../index.D-NvtsOM.js";const Z={class:"info-top"},$={class:"info-top-no"},ee=["title"],te={key:0},oe={key:0},ae={key:0},se={key:1},ne=A({__name:"profile",setup(ie){const x=O(),D=K(),{t:i}=W();let g=v(!0),m=v("list"),a=z({user:{},postGroup:[],roleGroup:[]}),N=v([{id:"Vue",title:"Vue.js - 渐进式 JavaScript 框架 | Vue.js",description:"基于标准 HTML、CSS 和 JavaScript 构建,提供容易上手的 API 和一流的文档。 性能出色 经过编译器优化、完全响应式的渲染系统,几乎不需要手动优化。"},{id:"Vue Router",title:"Vue Router | Vue.js 的官方路由",description:"为Vue.js 提供富有表现力、可配置的、方便的路由,用直观且强大的语法来定义静态或动态路由。"},{id:"Pinia",title:"Pinia | The intuitive store for Vue.js",description:"Pinia hooks into Vue devtools to give you an enhanced development experience in both Vue 2 and Vue 3. "},{id:"Vite",title:"Vite | 下一代的前端工具链",description:'Vite(法语意为 "快速的",发音 /vit/,发音同 "veet")是一种新型前端构建工具,能够显著提升前端开发体验'}]);function T(){H().then(u=>{if(u.code===q&&u.data){const{user:d,roleGroup:f,postGroup:c}=u.data;a.user=d,a.roleGroup=f,a.postGroup=c,a.user.avatar=Q().fnAvatar(d.avatar),g.value=!1}else s.message.error(u.msg,3)})}function I(){let u=D.meta.title;u.indexOf("router.")!==-1&&(u=i(u)),x.setTitle(u)}return J(()=>{I(),T()}),(u,d)=>{const f=s.Avatar,c=s.DescriptionsItem,k=s.Tag,C=s.Descriptions,h=s.Card,V=s.Col,L=s.ListItemMeta,P=s.ListItem,R=s.List,w=s.TabPane,j=s.Button,E=s.Empty,B=s.Tabs,U=s.Row;return p(),b(e(F),{loading:e(g)},{default:t(()=>[o(U,{gutter:16},{default:t(()=>[o(V,{lg:6,md:6,xs:24},{default:t(()=>[o(h,{"body-style":{padding:"0px"},style:{"margin-bottom":"16px"}},{title:t(()=>[y("div",Z,[y("div",$,"No:"+n(e(a).user.userId),1),o(f,{shape:"circle",size:96,src:e(a).user.avatar,alt:e(a).user.userName},null,8,["src","alt"]),y("div",{class:"info-top-nickname",title:e(a).user.nickName},n(e(a).user.nickName),9,ee)])]),default:t(()=>[o(C,{size:"small",layout:"vertical",bordered:!0,column:1},{default:t(()=>[o(c,{label:e(i)("views.account.profile.phonenumber")},{default:t(()=>[r(n(e(a).user.phonenumber||"-"),1)]),_:1},8,["label"]),o(c,{label:e(i)("views.account.profile.email")},{default:t(()=>[r(n(e(a).user.email||"-"),1)]),_:1},8,["label"]),o(c,{label:e(i)("views.account.profile.deptName")},{default:t(()=>[r(n(e(a).user.dept?.deptName||"-"),1)]),_:1},8,["label"]),o(c,{label:e(i)("views.account.profile.postGroup")},{default:t(()=>[e(a).postGroup.length===0?(p(),_("span",te,"-")):(p(!0),_(S,{key:1},G(e(a).postGroup,l=>(p(),b(k,{key:l},{default:t(()=>[r(n(l),1)]),_:2},1024))),128))]),_:1},8,["label"]),o(c,{label:e(i)("views.account.profile.roleGroup")},{default:t(()=>[e(a).roleGroup.length===0?(p(),_("span",oe,"-")):(p(!0),_(S,{key:1},G(e(a).roleGroup,l=>(p(),b(k,{key:l},{default:t(()=>[r(n(l),1)]),_:2},1024))),128))]),_:1},8,["label"]),o(c,{label:e(i)("views.account.profile.loginIp")},{default:t(()=>[r(n(e(a).user.loginIp||"-"),1)]),_:1},8,["label"]),o(c,{label:e(i)("views.account.profile.loginDate")},{default:t(()=>[+e(a).user.loginDate>0?(p(),_("span",ae,n(e(X)(+e(a).user.loginDate)),1)):(p(),_("span",se,"-"))]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),o(V,{lg:18,md:18,xs:24},{default:t(()=>[o(h,null,{default:t(()=>[o(B,{"tab-position":"top","destroy-inactive-tab-pane":!0,activeKey:e(m),"onUpdate:activeKey":d[0]||(d[0]=l=>M(m)?m.value=l:m=l)},{default:t(()=>[o(w,{key:"list",tab:e(i)("views.account.profile.list")},{default:t(()=>[o(R,{"item-layout":"horizontal","data-source":e(N),"row-key":"id"},{renderItem:t(({item:l})=>[o(P,null,{default:t(()=>[o(L,null,{title:t(()=>[r(n(l.title),1)]),description:t(()=>[r(n(l.description),1)]),avatar:t(()=>[o(f,null,{default:t(()=>[r(n(l.id),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])]),_:1},8,["tab"]),o(w,{key:"empty",tab:e(i)("views.account.profile.empty")},{default:t(()=>[o(E,null,{description:t(()=>[r(n(e(i)("views.account.profile.description")),1)]),default:t(()=>[o(j,{type:"primary"},{default:t(()=>[r(n(e(i)("commom.reloadText")),1)]),_:1})]),_:1})]),_:1},8,["tab"])]),_:1},8,["activeKey"])]),_:1})]),_:1})]),_:1})]),_:1},8,["loading"])}}}),ce=Y(ne,[["__scopeId","data-v-2964e600"]]);export{ce as default};
|