2 lines
5.6 KiB
JavaScript
Raw Permalink Normal View History

2025-06-02 21:34:56 +08:00
var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,n=(t,a,s)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;import{l as o}from"./notice-pET5Uik7.js";import{C as c,r,b as u,D as d,c as p,e as m,w as v,j as g,F as f,f as h,k as y,G as _,B as w,H as b,h as P,I as x,J as M,i as k,m as j,K as D,L as O,a as T,o as S,M as C,N as H,_ as I}from"./index-C-c3zR6K.js";function V(e){if(null==e||""==e)return"";var t=new Date(e);return t.getFullYear()+"-"+(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-"+(t.getDate()<10?"0"+t.getDate():t.getDate())+" "+(t.getHours()<10?"0"+t.getHours():t.getHours())+":"+(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":"+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())}const N={class:"app-container home"},z={class:"user-profile"},E={class:"welcome-text"},L={class:"user-role"},R={class:"user-stats"},F={class:"stat-item"},U=["title"],A={class:"stat-item"},B=["title"],G={class:"card-header"},J={class:"header-title"},K={key:0,class:"notice-list"},Y=["onClick"],q={class:"notice-title"},Q={class:"notice-time"},W={class:"feature-item"},X={class:"feature-icon"},Z=["innerHTML"],$=c({name:"Index"}),ee=c((te=((e,t)=>{for(var a in t||(t={}))l.call(t,a)&&n(e,a,t[a]);if(s)for(var a of s(t))i.call(t,a)&&n(e,a,t[a]);return e})({},$),t(te,a({setup(e){const t=T(),a=r([{icon:"Monitor",title:"技术先进",description:"采用Vue3、TypeScript等最新技术栈保持与时俱进"},{icon:"SetUp",title:"简单易用",description:"开箱即用的后台解决方案,内置完整的权限验证系统"},{icon:"Document",title:"规范开发",description:"遵循最佳实践,统一的编码规范,让项目更易维护"}]);r([{name:"Auth 权限验证",description:"提供了权限验证相关方法包括hasPermi、hasRole等功能用于控制按钮和功能的访问权限"},{name:"Cache 缓存",description:"提供了浏览器缓存操作方法支持session和local存储的设置与获取"},{name:"Modal 弹窗",description:"封装了Element Plus的弹窗组件提供了更便捷的调用方式"}]),r([{name:"hasPermi",description:"用于控制按钮级别的权限",usage:"v-hasPermi=\"['system:user:add']\""},{name:"hasRole",description:"用于控制角色级别的权限",usage:"v-hasRole=\"['admin']\""},{name:"auth",description:"通用权限验证指令",usage:"v-auth=\"'system:user:edit'\""}]);const s=r([]),l=r(!1),i=r(!1),n=r({}),c=u(),I=()=>{return e=null,t=null,a=function*(){l.value=!0;try{const e=yield o({pageNum:1,pageSize:5});s.value=e.rows}catch(e){}finally{l.value=!1}},new Promise(((s,l)=>{var i=e=>{try{o(a.next(e))}catch(t){l(t)}},n=e=>{try{o(a.throw(e))}catch(t){l(t)}},o=e=>e.done?s(e.value):Promise.resolve(e.value).then(i,n);o((a=a.apply(e,t)).next())}));var e,t,a},$=()=>{t.push({path:"/system/notice"})};return d((()=>{c.getInfo(),I()})),(e,t)=>{const o=g("el-avatar"),r=g("el-card"),u=g("el-icon"),d=g("el-button"),T=g("el-tag"),I=g("el-empty"),ee=g("el-col"),te=g("el-row"),ae=g("el-dialog"),se=b("loading");return S(),p("div",N,[m(te,{gutter:20},{default:v((()=>[m(ee,{lg:6,md:8,sm:24,xs:24},{default:v((()=>[m(r,{class:"user-info-card"},{default:v((()=>[h("div",z,[m(o,{size:80,src:y(c).avatar||y(_)},null,8,["src"]),h("h2",E,"欢迎回来,"+w(y(c).name),1),h("p",L,w(y(c).roleName),1)]),h("div",R,[h("div",F,[h("div",{class:"stat-value text-ellipsis",title:y(V)(y(c).loginDate)||"暂无"},w(y(V)(y(c).loginDate)||"暂无"),9,U),t[1]||(t[1]=h("p",{class:"stat-label"},"上次登录",-1))]),h("div",A,[h("div",{class:"stat-value text-ellipsis",title:y(c).deptName||"暂无"},w(y(c).deptName||"暂无"),9,B),t[2]||(t[2]=h("p",{class:"stat-label"},"所属部门",-1))])])])),_:1}),f((S(),P(r,{class:"notice-card hide-on-small"},{header:v((()=>[h("div",G,[h("span",J,[m(u,null,{default:v((()=>[m(y(D))])),_:1}),t[3]||(t[3]=j(" 系统公告 "))]),s.value.length?(S(),P(d,{key:0,link:"",onClick:$},{default:v((()=>[t[4]||(t[4]=j(" 查看<EFBFBD>