1 |
- import{a as h,r,q as m,aE as u,$ as b,w as p,t as _,ao as f,c as B,o as L,T as e,L as a,b as c}from"./vue.fY72QXCX.js";import{b as E,u as V}from"./index.Ck1HWQ_Q.js";import{d as z,e as D}from"./api.Bydc9mYY.js";import A from"./StatusCards.Bu51ubup.js";import I from"./InfoCards.ykqjc-Rh.js";import P from"./InboundOrders.BQivKF9d.js";import S from"./StockAlerts.DNbzn66G.js";import F from"./BorrowTrendsChart.DJqtp3Pp.js";import G from"./BorrowRankingList.CUzBJDYN.js";import{_ as N}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./index.B2yoEwj8.js";import"./echarts.Bog-kzRU.js";const O={class:"home-container"},q=h({name:"screenconsole"}),M=h({...q,setup($){const d=r({pending_approval:0,pending_return:0,pending_overdue:0,pending_maintenance:0,pending_restock:0,pending_warehousing:0,pending_inventory_check:0}),l=r({total_devices:0,borrowed_devices:0,available_devices:0,today_borrowed:0,today_returned:0,total_borrows:0});m(async()=>{try{const t=await z();t.code===2e3&&(d.value=t.data.pending_items);const i=await D();i.code===2e3&&(l.value=i.data)}catch(t){console.error("获取数据失败:",t)}});const g=r(),w=r(),v=r(),y=E(),C=V(),{themeConfig:x}=u(C),{isTagsViewCurrenFull:T}=u(y),n=()=>{_(()=>{for(let t=0;t<state.myCharts.length;t++)setTimeout(()=>{state.myCharts[t].resize()},t*1e3)})},R=()=>{window.addEventListener("resize",n)};m(()=>{k(),R()}),b(()=>{n()}),p(()=>T.value,()=>{n()}),p(()=>x.value.isIsDark,t=>{_(()=>{state.charts.theme=t?"dark":"",state.charts.bgColor=t?"transparent":"",state.charts.color=t?"#dadada":"#303133",setTimeout(()=>{initLineChart()},500),setTimeout(()=>{initPieChart()},700),setTimeout(()=>{initBarChart()},1e3)})},{deep:!0,immediate:!0});const k=async()=>{};return(t,i)=>{const o=f("el-col"),s=f("el-row");return L(),B("div",O,[e(s,{gutter:15,class:"home-row"},{default:a(()=>[e(o,{span:8},{default:a(()=>[e(A,{statusData:d.value},null,8,["statusData"])]),_:1}),e(o,{span:16},{default:a(()=>[e(I,{summaryData:l.value},null,8,["summaryData"])]),_:1})]),_:1}),e(s,{gutter:15,class:"home-row"},{default:a(()=>[e(o,{span:12},{default:a(()=>[e(G)]),_:1}),e(o,{span:12},{default:a(()=>[e(F)]),_:1})]),_:1}),e(s,{gutter:15,class:"home-row",style:{"margin-top":"20px"}}),e(s,{gutter:15,class:"home-row",style:{"margin-top":"20px"}},{default:a(()=>[e(o,{span:8},{default:a(()=>[e(P)]),_:1}),e(o,{span:16},{default:a(()=>[e(S)]),_:1})]),_:1}),e(s,{gutter:15,class:"home-row",style:{"margin-top":"20px"}},{default:a(()=>[e(o,{span:24,class:"home-col-table"},{default:a(()=>[c("div",{ref_key:"homeLineRef",ref:g,style:{width:"600px",height:"400px"}},null,512),c("div",{ref_key:"homePieRef",ref:w,style:{width:"600px",height:"400px"}},null,512),c("div",{ref_key:"homeBarRef",ref:v,style:{width:"600px",height:"400px"}},null,512)]),_:1})]),_:1})])}}}),ae=N(M,[["__scopeId","data-v-2221760d"]]);export{ae as default};
|