import{a as f,r as o,q as m,aC as u,$ as y,w as l,t as _,aj as p,c as b,o as k,S as t,K as a}from"./vue.YrNK8sx4.js";import{b as x,u as R}from"./index.BKEMpsLA.js";import{d as B,e as L}from"./api.DNygNRg8.js";import z from"./StatusCards.BPJOGj2h.js";import D from"./InfoCards.r8bpblDO.js";import E from"./BorrowTrendsChart.jREgxaaO.js";import V from"./BorrowRankingList.C0hHkRRz.js";import{_ as S}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./index.A714wFO1.js";import"./echarts.BvtxGb1Q.js";import"./api.CAL9rITU.js";const A={class:"home-container"},F=f({name:"screenconsole"}),G=f({...F,setup(I){const i=o({pending_approval:0,pending_return:0,pending_overdue:0,pending_maintenance:0,pending_restock:0,pending_warehousing:0,pending_inventory_check:0}),c=o({total_devices:0,borrowed_devices:0,available_devices:0,today_borrowed:0,today_returned:0,total_borrows:0,total_borrowers:0});m(async()=>{try{const e=await B();e.code===2e3&&(i.value=e.data.pending_items);const n=await L();n.code===2e3&&(c.value=n.data)}catch(e){console.error("获取数据失败:",e)}}),o(),o(),o();const h=x(),w=R(),{themeConfig:g}=u(w),{isTagsViewCurrenFull:v}=u(h),r=()=>{_(()=>{for(let e=0;e<state.myCharts.length;e++)setTimeout(()=>{state.myCharts[e].resize()},e*1e3)})},C=()=>{window.addEventListener("resize",r)};m(()=>{T(),C()}),y(()=>{r()}),l(()=>v.value,()=>{r()}),l(()=>g.value.isIsDark,e=>{_(()=>{state.charts.theme=e?"dark":"",state.charts.bgColor=e?"transparent":"",state.charts.color=e?"#dadada":"#303133",setTimeout(()=>{initLineChart()},500),setTimeout(()=>{initPieChart()},700),setTimeout(()=>{initBarChart()},1e3)})},{deep:!0,immediate:!0});const T=async()=>{};return(e,n)=>{const s=p("el-col"),d=p("el-row");return k(),b("div",A,[t(d,{gutter:15,class:"home-row"},{default:a(()=>[t(s,{span:8},{default:a(()=>[t(z,{statusData:i.value},null,8,["statusData"])]),_:1}),t(s,{span:16},{default:a(()=>[t(D,{summaryData:c.value},null,8,["summaryData"])]),_:1})]),_:1}),t(d,{gutter:15,class:"home-row"},{default:a(()=>[t(s,{span:12},{default:a(()=>[t(V)]),_:1}),t(s,{span:12},{default:a(()=>[t(E)]),_:1})]),_:1})])}}}),U=S(G,[["__scopeId","data-v-2e2b7f67"]]);export{U as default};
