test_lgq/niucloud/public/admin/assets/user-info-3f94cc97.js
2024-01-24 17:36:08 +08:00

2 lines
3.2 KiB
JavaScript

import{d as B,r as h,n as I,q as R,h as r,I as d,w as a,a as l,e as n,i as u,t as o,u as e,N as s,y as C,R as T,B as f,aJ as j,X as A,ak as L,aw as O,Y as S,E as q,aa as J,a0 as U}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{_ as X}from"./member_head-a897263d.js";const Y={class:"flex items-center"},$=l("img",{src:X},null,-1),z={class:"input-width"},G={class:"input-width"},H={class:"input-width"},K={class:"flex"},M={class:"max-w-[260px]"},P={class:"input-width"},Q={class:"input-width"},W={class:"input-width"},Z={class:"input-width"},ee={class:"input-width"},te={class:"dialog-footer"},fe=B({__name:"user-info",setup(ae,{expose:w}){const c=h(!1),p=h(!0),b={username:"",create_time:"",head_img:"",last_ip:"",last_time:"",login_count:"",real_name:"",status:"",uid:"",update_time:"",roles:[]},t=I({...b}),k=h(),x=R(()=>({}));return w({showDialog:c,setFormData:async(m=null)=>{p.value=!0,Object.assign(t,b),m&&Object.keys(t).forEach(_=>{m[_]!=null&&(t[_]=m[_])}),p.value=!1}}),(m,_)=>{const v=j,i=A,D=L,g=O,E=S,N=q,F=J,V=U;return r(),d(F,{modelValue:c.value,"onUpdate:modelValue":_[1]||(_[1]=y=>c.value=y),title:e(s)("userInfo"),width:"550px","destroy-on-close":!0},{footer:a(()=>[l("span",te,[n(N,{type:"primary",onClick:_[0]||(_[0]=y=>c.value=!1)},{default:a(()=>[u(o(e(s)("confirm")),1)]),_:1})])]),default:a(()=>[C((r(),d(E,{model:t,"label-width":"110px",ref_key:"formRef",ref:k,rules:e(x),class:"page-form"},{default:a(()=>[n(i,{label:e(s)("headimg")},{default:a(()=>[l("div",Y,[t.head_img?(r(),d(v,{key:0,src:e(T)(t.head_img)},null,8,["src"])):(r(),d(v,{key:1},{default:a(()=>[$]),_:1}))])]),_:1},8,["label"]),n(i,{label:e(s)("userRealName")},{default:a(()=>[l("div",z,o(t.real_name),1)]),_:1},8,["label"]),n(i,{label:e(s)("accountNumber")},{default:a(()=>[l("div",G,o(t.username),1)]),_:1},8,["label"]),n(i,{label:e(s)("siteId")},{default:a(()=>[l("div",H,o(t.roles[0].site_id),1)]),_:1},8,["label"]),n(i,{label:e(s)("siteName")},{default:a(()=>[l("div",K,[l("div",M,o(t.roles[0].site_name),1),n(D,{class:"ml-10 text-blue-700",href:"/site/login",target:"_blank",underline:!1},{default:a(()=>[u(o(e(s)("enterSite")),1)]),_:1})])]),_:1},8,["label"]),n(i,{label:e(s)("isAdmin")},{default:a(()=>[l("div",P,o(t.roles[0].is_admin?e(s)("yes"):e(s)("no")),1)]),_:1},8,["label"]),n(i,{label:e(s)("status")},{default:a(()=>[l("div",Q,[t.status==1?(r(),d(g,{key:0,class:"ml-2",type:"success"},{default:a(()=>[u(o(e(s)("statusNormal")),1)]),_:1})):f("",!0),t.status==0?(r(),d(g,{key:1,class:"ml-2",type:"error"},{default:a(()=>[u(o(e(s)("statusDeactivate")),1)]),_:1})):f("",!0)])]),_:1},8,["label"]),n(i,{label:e(s)("lastIp")},{default:a(()=>[l("div",W,o(t.last_ip),1)]),_:1},8,["label"]),parseFloat(t.last_time)?(r(),d(i,{key:0,label:e(s)("lastTime")},{default:a(()=>[l("div",Z,o(t.last_time),1)]),_:1},8,["label"])):f("",!0),parseFloat(t.create_time)?(r(),d(i,{key:1,label:e(s)("createTime")},{default:a(()=>[l("div",ee,o(t.create_time),1)]),_:1},8,["label"])):f("",!0)]),_:1},8,["model","rules"])),[[V,p.value]])]),_:1},8,["modelValue","title"])}}});export{fe as default};