import{d as $,U as p,a2 as v,a3 as _,a4 as y,a5 as C,G as T,k as n,ac as I,V as w,a6 as D,f as a,w as k,af as d}from"./vue-vendor-CxLCUzY4.js";import E from"./ChartGroupCard-BPK2NpIU.js";import L from"./SaleTabCard-DmuZ-dGq.js";import{L as M}from"./LineMulti-CL9jwZAx.js";import{_ as S,h as B,B as N}from"./index-Cy4uayzW.js";import"./antd-vue-vendor-CahNzUUa.js";import"./SingleLine-DspEHiQb.js";import"./useECharts-C5PCME_B.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./echarts-3CSrakfu.js";import"./Bar-C2dAaQCo.js";import"./data-BpJ37qIE.js";import"./RankList-Di8JZFh_.js";const R=$({name:"HeadInfo",props:{title:{type:String,default:""},content:{type:String,default:""},bordered:{type:Boolean,default:!1},center:{type:Boolean,default:!0},icon:{type:String,default:!1},iconColor:{type:String,default:"#2b99ff"}}}),z={key:0};function H(o,l,c,s,r,g){const i=p("a-icon");return v(),_("div",{class:D(["head-info",o.center&&"center"])},[y("span",null,C(o.title),1),y("p",{style:I({color:`${o.$props.iconColor}`})},[T(C(o.content)+" ",1),n(i,{type:o.icon,style:I({fontSize:"24px",color:`${o.$props.iconColor}`})},null,8,["type","style"])],4),o.bordered?(v(),_("em",z)):w("",!0)],2)}const m=S(R,[["render",H],["__scopeId","data-v-f198c7d6"]]);const x=o=>B.get({url:"/sys/loginfo",params:o},{isTransformResponse:!1}),j=o=>B.get({url:"/sys/visitInfo",params:o},{isTransformResponse:!1}),A={class:"p-4"},F={class:"infoArea"},G=$({__name:"IndexChart",setup(o){const l=a(!0),{getThemeColor:c}=N();setTimeout(()=>{l.value=!1},500);const s=a({}),r=a([]);function g(){x(null).then(e=>{e.success&&(Object.keys(e.result).forEach(t=>{e.result[t]=e.result[t]+""}),s.value=e.result)}),j(null).then(e=>{e.success&&(r.value=[],e.result.forEach(t=>{r.value.push({name:t.type,type:"ip",value:t.ip,color:i.value}),r.value.push({name:t.type,type:"visit",value:t.visit,color:f.value})}))})}const i=a(),f=a(),h=a();k(()=>c.value,()=>{h.value=c.value,f.value="#67B962",i.value=c.value,g()},{immediate:!0});function O(){for(var e="0123456789ABCDEF",t="#",u=0;u<6;u++)t+=e[Math.floor(Math.random()*16)];return t}return(e,t)=>{const u=p("a-card"),V=p("a-col"),b=p("a-row");return v(),_("div",A,[n(E,{class:"enter-y",loading:l.value,type:"chart"},null,8,["loading"]),n(L,{class:"!my-4 enter-y",loading:l.value},null,8,["loading"]),n(b,null,{default:d(()=>[n(V,{span:24},{default:d(()=>[n(u,{loading:l.value,bordered:!1,title:"最近一周访问量统计"},{default:d(()=>[y("div",F,[n(m,{title:"今日IP",iconColor:i.value,content:s.value.todayIp,icon:"environment"},null,8,["iconColor","content"]),n(m,{title:"今日访问",iconColor:f.value,content:s.value.todayVisitCount,icon:"team"},null,8,["iconColor","content"]),n(m,{title:"总访问量",iconColor:h.value,content:s.value.totalVisitCount,icon:"rise"},null,8,["iconColor","content"])]),n(M,{chartData:r.value,height:"33vh",type:"line",option:{legend:{top:"bottom"}}},null,8,["chartData"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}}),ao=S(G,[["__scopeId","data-v-6fe18120"]]);export{ao as default};
