import{d as p,c as m,h as c,i as o,v as z,C as t,e as u,o as A,D as M,b as r,w as a,j as _,t as s,f as i,k as j,F as I,E as N,G,H as P,I as R,J as T,_ as V}from"./index-CkzfmDGw.js";import{d as U}from"./system-CZIyXjgT.js";import{R as H,C as J,P as E,M as Y}from"./RocketOutline-Bo50T8OA.js";import{C as q}from"./CodeSlashOutline-BLVV1n2e.js";import{P as D}from"./PersonOutline-2Mg0SjDF.js";import{G as K,I as Q}from"./IdCardOutline-taFppdFn.js";import{L as W}from"./ListOutline-Bpen_e7M.js";const X={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Z=o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 176L225.2 304L176 255.8"},null,-1),oo=o("path",{d:"M463.1 112.37C373.68 96.33 336.71 84.45 256 48c-80.71 36.45-117.68 48.33-207.1 64.37C32.7 369.13 240.58 457.79 256 464c15.42-6.21 223.3-94.87 207.1-351.63z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),eo=[Z,oo],to=p({name:"ShieldCheckmarkOutline",render:function(h,l){return c(),m("svg",X,eo)}}),no={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ro=o("path",{d:"M259.92 262.91L216.4 149.77a9 9 0 0 0-16.8 0l-43.52 113.14a9 9 0 0 1-5.17 5.17L37.77 311.6a9 9 0 0 0 0 16.8l113.14 43.52a9 9 0 0 1 5.17 5.17l43.52 113.14a9 9 0 0 0 16.8 0l43.52-113.14a9 9 0 0 1 5.17-5.17l113.14-43.52a9 9 0 0 0 0-16.8l-113.14-43.52a9 9 0 0 1-5.17-5.17z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),so=o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M108 68L88 16L68 68L16 88l52 20l20 52l20-52l52-20l-52-20z"},null,-1),lo=o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"},null,-1),ao=[ro,so,lo],io=p({name:"SparklesOutline",render:function(h,l){return c(),m("svg",no,ao)}}),co={class:"page-container"},uo={class:"welcome-section"},_o={class:"welcome-info"},mo={class:"welcome-header"},ho={class:"welcome-text"},po={class:"welcome-title"},go={class:"welcome-time"},fo={class:"time-display"},Co={class:"date-display"},vo={class:"shortcuts-grid"},ko=["onClick"],wo={class:"shortcut-name"},bo=p({__name:"index",setup(g){const h=T(),l=z(),f=u(""),C=u(""),v=u(!0);function F(){const e=new Date().getHours();return e<6?"夜深了":e<9?"早上好":e<12?"上午好":e<14?"中午好":e<18?"下午好":e<22?"晚上好":"夜深了"}t(H),t(q),t(io),t(J);const d=u([{title:"客户信息",value:0,icon:t(D),color:"#111827",bgColor:"#D1FAE5"},{title:"待验资客户",value:0,icon:t(E),color:"#059669",bgColor:"#F3F4F6"},{title:"产品数量",value:0,icon:t(Y),color:"#2563EB",bgColor:"#DBEAFE"},{title:"待核准订单",value:0,icon:t(to),color:"#D97706",bgColor:"#FEF3C7"}]),L=[{name:"用户管理",path:"/system/user",icon:t(D),color:"#111827",bgColor:"#F3F4F6"},{name:"角色管理",path:"/system/role",icon:t(E),color:"#059669",bgColor:"#D1FAE5"},{name:"部门管理",path:"/org/dept",icon:t(K),color:"#2563EB",bgColor:"#DBEAFE"},{name:"岗位管理",path:"/org/post",icon:t(Q),color:"#7C3AED",bgColor:"#EDE9FE"},{name:"操作日志",path:"/log/operlog",icon:t(W),color:"#DC2626",bgColor:"#FEE2E2"}];async function y(){try{v.value=!0;const e=await U.getStats();d.value[0].value=e.userCount,d.value[1].value=e.roleCount,d.value[2].value=e.menuCount,d.value[3].value=e.permissionCount}catch(e){console.error("加载统计数据失败",e)}finally{v.value=!1}}function k(){const e=new Date;f.value=e.toLocaleTimeString("zh-CN",{hour12:!1}),C.value=e.toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric",weekday:"long"})}let w;return A(()=>{k(),w=window.setInterval(k,1e3),y()}),M(()=>{clearInterval(w)}),(e,b)=>{const S=i("n-avatar"),O=i("n-icon"),B=i("n-card"),$=i("n-gi"),x=i("n-grid");return c(),m("div",co,[o("div",uo,[o("div",_o,[o("div",mo,[r(S,{round:"",size:56,src:_(l).avatar||void 0},{default:a(()=>{var n;return[j(s(((n=_(l).nickname)==null?void 0:n.charAt(0))||"U"),1)]}),_:1},8,["src"]),o("div",ho,[o("h1",po,s(F())+"，"+s(_(l).nickname)+" 👋 ",1),b[0]||(b[0]=o("p",{class:"welcome-desc"}," 这是您的管理控制台，您可以在这里管理系统的各项功能 ",-1))])]),o("div",go,[o("div",fo,s(f.value),1),o("div",Co,s(C.value),1)])])]),r(x,{"x-gap":20,cols:1,class:"middle-section"},{default:a(()=>[r($,null,{default:a(()=>[r(B,{title:"快捷入口",class:"shortcuts-card"},{default:a(()=>[o("div",vo,[(c(),m(I,null,N(L,n=>o("div",{key:n.path,class:"shortcut-item",onClick:xo=>_(h).push(n.path)},[o("div",{class:"shortcut-icon",style:G({background:n.bgColor})},[r(O,{size:"24",color:n.color},{default:a(()=>[(c(),P(R(n.icon)))]),_:2},1032,["color"])],4),o("div",wo,s(n.name),1)],8,ko)),64))])]),_:1})]),_:1})]),_:1}),r(x,{"x-gap":20,cols:2,class:"bottom-section"})])}}}),Bo=V(bo,[["__scopeId","data-v-47692fc1"]]);export{Bo as default};
