Files
----/后端源码/yifan.action-ai.cn/index/js/index.BnM7e2bk.js

2 lines
13 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{T as t,U as e,i as a,t as l,s,V as o,W as i,q as n,X as r,Y as d,P as c,Z as u,F as m,_ as f,$ as h,r as v}from"./element-plus.BfMFfVUv.js";import{_ as p}from"./index.vue_vue_type_script_setup_true_lang.DVkqBjwy.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{S as g,_,a1 as y,J as w,r as b,aD as C,eh as F,m as M,t as k,$ as A,a0 as Y,o as G,aa as R,a9 as V,T as j,a3 as U,a8 as D,z as P,H as T,ay as L,aO as H,j as S}from"./.pnpm.BudmgPu7.js";import{f as z}from"./index.CCGY9CCJ.js";import{f as q}from"./index.Dj2UJJ26.js";import{g as I}from"./common.BWIReEgr.js";import"./echarts.CmH5SDQe.js";import"./codemirror.BdleaLZh.js";const Z={href:"https://github.com/1014TaoTao/FastapiAdmin",target:"_blank",class:"github-corner","aria-label":"View source on Github"},B={width:"80",height:"80",viewBox:"0 0 250 250",style:{color:"#fff",fill:"#40c9c6"},"aria-hidden":"true"};const E=x({},[["render",function(t,e){return g(),_("a",Z,[(g(),_("svg",B,[...e[0]||(e[0]=[y("path",{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"},null,-1),y("path",{d:"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",fill:"currentColor",style:{"transform-origin":"130px 106px"},class:"octo-arm"},null,-1),y("path",{d:"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",fill:"currentColor",class:"octo-body"},null,-1)])]))])}],["__scopeId","data-v-701f789e"]]),$={class:"dashboard-container"},J={class:"flex flex-wrap"},O={class:"flex-1 flex items-start"},W=["src"],X={class:"ml-5"},K={class:"text-20px font-bold mb-5px"},N={class:"hidden sm:block"},Q={class:"flex items-end space-x-6"},tt={class:"flex flex-col items-center"},et={class:"font-bold color-#4080ff text-sm flex items-center"},at={class:"mt-3 whitespace-nowrap"},lt={class:"flex flex-col items-center"},st={class:"font-bold color-#ff9a2e text-sm flex items-center"},ot={class:"mt-3 whitespace-nowrap"},it={class:"w-full sm:hidden mt-3"},nt={class:"flex justify-end space-x-4 overflow-x-auto"},rt={class:"flex-x-between"},dt={class:"flex-x-between mt-2 flex-1"},ct={class:"flex-y-center"},ut={key:0,class:"ml-2 text-xs text-[#67c23a]"},mt={class:"flex-x-between"},ft={class:"mt-5 flex-x-between"},ht={class:"flex-x-between"},vt={class:"flex-x-between mt-2 flex-1"},pt={class:"flex-y-center"},xt={class:"text-lg"},gt={class:"flex-x-between mt-2 text-sm text-gray"},_t={class:"flex-x-between"},yt={class:"mt-5 flex-x-between"},wt={class:"flex-x-between"},bt={class:"flex-x-between mt-2 flex-1"},Ct={class:"flex-y-center"},Ft={class:"text-lg"},Mt={class:"flex-x-between mt-2 text-sm text-gray"},kt={class:"flex-x-between"},At={class:"flex-x-between"},Yt={key:0},Gt=x(w({name:"Home",inheritAttrs:!1,__name:"index",setup(x){const w=I(),Z=z(),B=b([{id:"1",title:"v3.2.1",date:C().format("YYYY-MM-DD HH:mm:ss"),content:"优化性能修复若干小bug。",link:"https://gitee.com/tao__tao/FastapiAdmin/releases",tag:"更新"},{id:"2",title:"v3.2.0",date:C().subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),content:"新增用户行为分析功能。",link:"https://gitee.com/tao__tao/FastapiAdmin/releases",tag:"新功能"},{id:"3",title:"v3.1.0",date:C().subtract(3,"day").format("YYYY-MM-DD HH:mm:ss"),content:"优化权限管理系统。",link:"https://gitee.com/tao__tao/FastapiAdmin/releases",tag:"优化"}]),Gt=b(!0),Rt=b({todayUvCount:0,uvGrowthRate:0,totalUvCount:0,todayPvCount:0,pvGrowthRate:0,totalPvCount:0}),Vt=F(S(()=>Rt.value.todayUvCount),{duration:1e3,transition:[.25,.1,.25,1]}),jt=F(S(()=>Rt.value.totalUvCount),{duration:1200,transition:[.25,.1,.25,1]}),Ut=F(S(()=>Rt.value.todayPvCount),{duration:1e3,transition:[.25,.1,.25,1]}),Dt=F(S(()=>Rt.value.totalPvCount),{duration:1200,transition:[.25,.1,.25,1]}),Pt=b(7),Tt=b(),Lt=()=>{Tt.value={tooltip:{trigger:"axis"},legend:{data:["浏览量(PV)","访客数(UV)"],bottom:0},grid:{left:"1%",right:"5%",bottom:"10%",containLabel:!0},xAxis:{type:"category",data:Array.from({length:Pt.value},(t,e)=>C().subtract(Pt.value-e-1,"day").format("YYYY-MM-DD"))},yAxis:{type:"value",splitLine:{show:!0,lineStyle:{type:"dashed"}}},series:[{name:"浏览量(PV)",type:"line",data:Array.from({length:Pt.value},()=>Math.floor(500*Math.random())+100),areaStyle:{color:"rgba(64, 158, 255, 0.1)"},smooth:!0,itemStyle:{color:"#4080FF"},lineStyle:{color:"#4080FF"}},{name:"访客数(UV)",type:"line",data:Array.from({length:Pt.value},()=>Math.floor(200*Math.random())+50),areaStyle:{color:"rgba(103, 194, 58, 0.1)"},smooth:!0,itemStyle:{color:"#67C23A"},lineStyle:{color:"#67C23A"}}]}},Ht=t=>t?t>0?"text-[--el-color-danger]":t<0?"text-[--el-color-success]":"text-[--el-color-info]":"text-[--el-color-info]";return M(()=>Pt.value,()=>{Lt()},{immediate:!0}),k(()=>{Gt.value=!1,Rt.value={todayUvCount:Math.floor(200*Math.random())+50,uvGrowthRate:parseFloat((20*Math.random()-10).toFixed(2)),totalUvCount:Math.floor(5e3*Math.random())+1e3,todayPvCount:Math.floor(500*Math.random())+100,pvGrowthRate:parseFloat((20*Math.random()-10).toFixed(2)),totalPvCount:Math.floor(2e4*Math.random())+5e3},Lt()}),(x,b)=>{const C=E,F=H("Document"),M=a,k=l,S=H("Folder"),z=s,I=t,Lt=n,St=o,zt=d,qt=H("Top"),It=H("Bottom"),Zt=r,Bt=e,Et=u,$t=c,Jt=p,Ot=H("TopRight"),Wt=v,Xt=h,Kt=f,Nt=m;return g(),_("div",$,[A(C,{class:"github-corner"}),A(I,{shadow:"hover"},{default:Y(()=>[y("div",J,[y("div",O,[y("img",{class:"w80px h80px rounded-full",src:G(Z).basicInfo.avatar+"?imageView2/1/w/80/h/80"},null,8,W),y("div",X,[y("div",K,R(G(w))+R(G(Z).basicInfo.name)+""+R("祝你开心每一天!"),1),b[1]||(b[1]=y("p",{class:"text-sm text-gray"},"今日天气晴朗气温在15℃至25℃之间东南风。",-1))])]),y("div",N,[y("div",Q,[y("div",tt,[y("div",et,[A(M,{class:"mr-2px"},{default:Y(()=>[A(F)]),_:1}),b[2]||(b[2]=V(" 文档 ",-1))]),y("div",at,[A(k,{href:"https://blog.csdn.net/weixin_46768253/article/details/149569141?spm=1001.2014.3001.5502",target:"_blank"},{default:Y(()=>[...b[3]||(b[3]=[y("div",{class:"i-svg:csdn text-lg"},null,-1)])]),_:1})])]),y("div",lt,[y("div",st,[A(M,{class:"mr-2px"},{default:Y(()=>[A(S)]),_:1}),b[4]||(b[4]=V(" 仓库 ",-1))]),y("div",ot,[A(k,{href:"https://gitee.com/tao__tao/FastapiAdmin",target:"_blank"},{default:Y(()=>[...b[5]||(b[5]=[y("div",{class:"i-svg:gitee text-lg color-#F76560"},null,-1)])]),_:1}),A(z,{direction:"vertical"}),A(k,{href:"https://github.com/1014TaoTao/FastapiAdmin",target:"_blank"},{default:Y(()=>[...b[6]||(b[6]=[y("div",{class:"i-svg:github text-lg color-#4080FF"},null,-1)])]),_:1}),A(z,{direction:"vertical"}),A(k,{href:"https://gitcode.com/qq_36002987/FastapiAdmin",target:"_blank"},{default:Y(()=>[...b[7]||(b[7]=[y("div",{class:"i-svg:gitcode text-lg color-#FF9A2E"},null,-1)])]),_:1})])])])]),y("div",it,[y("div",nt,[A(k,{href:"https://gitee.com/tao__tao/FastapiAdmin",target:"_blank"},{default:Y(()=>[...b[8]||(b[8]=[y("div",{class:"i-svg:gitee text-lg color-#F76560"},null,-1)])]),_:1}),A(z,{direction:"vertical"}),A(k,{href:"https://github.com/1014TaoTao/FastapiAdmin",target:"_blank"},{default:Y(()=>[...b[9]||(b[9]=[y("div",{class:"i-svg:github text-lg color-#4080FF"},null,-1)])]),_:1}),A(z,{direction:"vertical"}),A(k,{href:"https://gitcode.com/qq_36002987/FastapiAdmin",target:"_blank"},{default:Y(()=>[...b[10]||(b[10]=[y("div",{class:"i-svg:gitcode text-lg color-#FF9A2E"},null,-1)])]),_:1})])])])]),_:1}),A(Bt,{gutter:10,class:"mt-4"},{default:Y(()=>[A(St,{span:8,xs:24,class:"mb-xs-3"},{default:Y(()=>[A(I,{shadow:"hover",class:"h-full flex flex-col"},{header:Y(()=>[y("div",rt,[b[12]||(b[12]=y("span",{class:"text-gray"},"在线用户",-1)),A(Lt,{type:"danger",size:"small"},{default:Y(()=>[...b[11]||(b[11]=[V("实时",-1)])]),_:1})])]),default:Y(()=>[y("div",dt,[y("div",ct,[b[15]||(b[15]=y("span",{class:"text-lg transition-all duration-300 hover:scale-110"},"9999",-1)),(g(),_("span",ut,[A(M,null,{default:Y(()=>[A(G(i))]),_:1}),b[13]||(b[13]=V(" 已连接 ",-1))]))]),b[16]||(b[16]=y("div",{class:"i-svg:people w-8 h-8 animate-[pulse_2s_infinite]"},null,-1))]),b[17]||(b[17]=y("div",{class:"flex-x-between mt-2 text-sm text-gray"},[y("span",null,"更新时间"),y("span",null,"2025-07-12 00:00:00")],-1))]),_:1})]),_:1}),A(St,{span:8,xs:24,class:"mb-xs-3"},{default:Y(()=>[A(Zt,{loading:G(Gt),rows:5,animated:""},{template:Y(()=>[A(I,null,{header:Y(()=>[y("div",null,[A(zt,{variant:"h3",style:{width:"40%"}}),A(zt,{variant:"rect",style:{float:"right",width:"1em",height:"1em"}})])]),default:Y(()=>[y("div",mt,[A(zt,{variant:"text",style:{width:"30%"}}),A(zt,{variant:"circle",style:{width:"2em",height:"2em"}})]),y("div",ft,[A(zt,{variant:"text",style:{width:"50%"}}),A(zt,{variant:"text",style:{width:"1em"}})])]),_:1})]),default:Y(()=>[G(Gt)?D("",!0):(g(),j(I,{key:0,shadow:"hover",class:"h-full flex flex-col"},{header:Y(()=>[y("div",ht,[b[19]||(b[19]=y("span",{class:"text-gray"},"访客数(UV)",-1)),A(Lt,{type:"success",size:"small"},{default:Y(()=>[...b[18]||(b[18]=[V("日",-1)])]),_:1})])]),default:Y(()=>[y("div",vt,[y("div",pt,[y("span",xt,R(Math.round(G(Vt))),1),y("span",{class:U(["text-xs","ml-2",Ht(G(Rt).uvGrowthRate)])},[A(M,null,{default:Y(()=>[G(Rt).uvGrowthRate>0?(g(),j(qt,{key:0})):G(Rt).uvGrowthRate<0?(g(),j(It,{key:1})):D("",!0)]),_:1}),V(" "+R(G(q)(G(Rt).uvGrowthRate)),1)],2)]),b[20]||(b[20]=y("div",{class:"i-svg:visitor w-8 h-8"},null,-1))]),y("div",gt,[b[21]||(b[21]=y("span",null,"总访客数",-1)),y("span",null,R(Math.round(G(jt))),1)])]),_:1}))]),_:1},8,["loading"])]),_:1}),A(St,{span:8,xs:24},{default:Y(()=>[A(Zt,{loading:G(Gt),rows:5,animated:""},{template:Y(()=>[A(I,null,{header:Y(()=>[y("div",null,[A(zt,{variant:"h3",style:{width:"40%"}}),A(zt,{variant:"rect",style:{float:"right",width:"1em",height:"1em"}})])]),default:Y(()=>[y("div",_t,[A(zt,{variant:"text",style:{width:"30%"}}),A(zt,{variant:"circle",style:{width:"2em",height:"2em"}})]),y("div",yt,[A(zt,{variant:"text",style:{width:"50%"}}),A(zt,{variant:"text",style:{width:"1em"}})])]),_:1})]),default:Y(()=>[G(Gt)?D("",!0):(g(),j(I,{key:0,shadow:"hover",class:"h-full flex flex-col"},{header:Y(()=>[y("div",wt,[b[23]||(b[23]=y("span",{class:"text-gray"},"浏览量(PV)",-1)),A(Lt,{type:"primary",size:"small"},{default:Y(()=>[...b[22]||(b[22]=[V("日",-1)])]),_:1})])]),default:Y(()=>[y("div",bt,[y("div",Ct,[y("span",Ft,R(Math.round(G(Ut))),1),y("span",{class:U(["text-xs","ml-2",Ht(G(Rt).pvGrowthRate)])},[A(M,null,{default:Y(()=>[G(Rt).pvGrowthRate>0?(g(),j(qt,{key:0})):G(Rt).pvGrowthRate<0?(g(),j(It,{key:1})):D("",!0)]),_:1}),V(" "+R(G(q)(G(Rt).pvGrowthRate)),1)],2)]),b[24]||(b[24]=y("div",{class:"i-svg:browser w-8 h-8"},null,-1))]),y("div",Mt,[b[25]||(b[25]=y("span",null,"总浏览量",-1)),y("span",null,R(Math.round(G(Dt))),1)])]),_:1}))]),_:1},8,["loading"])]),_:1})]),_:1}),A(Bt,{gutter:10,class:"mt-4"},{default:Y(()=>[A(St,{xs:24,span:16},{default:Y(()=>[A(I,null,{header:Y(()=>[y("div",kt,[b[28]||(b[28]=y("span",null,"访问趋势",-1)),A($t,{modelValue:G(Pt),"onUpdate:modelValue":b[0]||(b[0]=t=>P(Pt)?Pt.value=t:null),size:"small"},{default:Y(()=>[A(Et,{value:7},{default:Y(()=>[...b[26]||(b[26]=[V("近7天",-1)])]),_:1}),A(Et,{value:30},{default:Y(()=>[...b[27]||(b[27]=[V("近30天",-1)])]),_:1})]),_:1},8,["modelValue"])])]),default:Y(()=>[A(Jt,{options:G(Tt),height:"400px"},null,8,["options"])]),_:1})]),_:1}),A(St,{xs:24,span:8},{default:Y(()=>[A(I,null,{header:Y(()=>[y("div",At,[b[30]||(b[30]=y("span",{class:"header-title"},"最新动态",-1)),A(k,{type:"primary",underline:"never",href:"https://gitee.com/tao__tao/FastapiAdmin/releases",target:"_blank"},{default:Y(()=>[b[29]||(b[29]=V(" 完整记录 ",-1)),A(M,{class:"link-icon"},{default:Y(()=>[A(Ot)]),_:1})]),_:1})])]),default:Y(()=>[A(Nt,{height:"400px"},{default:Y(()=>[A(Kt,{class:"p-3"},{default:Y(()=>[(g(!0),_(T,null,L(G(B),(t,e)=>(g(),j(Xt,{key:e,timestamp:t.date,placement:"top",color:0===e?"#67C23A":"#909399",hollow:0!==e,size:"large"},{default:Y(()=>[y("div",{class:U(["version-item",{"latest-item":0===e}])},[y("div",null,[A(Wt,{tag:"strong"},{default:Y(()=>[V(R(t.title),1)]),_:2},1024),t.tag?(g(),j(Lt,{key:0,type:0===e?"success":"info",size:"small"},{default:Y(()=>[V(R(t.tag),1)]),_:2},1032,["type"])):D("",!0)]),A(Wt,{class:"version-content"},{default:Y(()=>[V(R(t.content),1)]),_:2},1024),t.link?(g(),_("div",Yt,[A(k,{type:0===e?"primary":"info",href:t.link,target:"_blank",underline:"never"},{default:Y(()=>[b[31]||(b[31]=V(" 详情 ",-1)),A(M,{class:"link-icon"},{default:Y(()=>[A(Ot)]),_:1})]),_:1},8,["type","href"])])):D("",!0)],2)]),_:2},1032,["timestamp","color","hollow"]))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-f38347e4"]]);export{Gt as default};