import{$ as e,H as t,L as n,P as r,Ut as i,V as a,Wt as o,d as s,et as c,i as l,lt as u,p as d,u as f,v as p,z as m}from"./runtime-core.esm-bundler-DbRZbT7v.js";import{t as h}from"./index-Mgun2LFs.js";import"./request-DG5cMCYw.js";import{t as g}from"./report-B0fHHL3b.js";var _={class:`p-6 space-y-4`},v={class:`bg-white rounded-2xl border border-gray-100 shadow-sm p-5 mb-4 flex items-center gap-4`},y={class:`flex-1 min-w-0`},b={class:`text-sm text-gray-500 mb-1`},x={class:`flex items-baseline gap-1`},S={class:`text-sm text-gray-400`},C=h({__name:`index`,setup(h){let C=u(!1),w=u([{key:`customer_count`,title:`客户数`,value:`--`,unit:`位`,color:`#E8A87C`,bg:`#FBE8D5`},{key:`contract_amount`,title:`合同金额`,value:`--`,unit:`元`,color:`#67C23A`,bg:`#E8F5E1`},{key:`total_rooms`,title:`总房间数`,value:`--`,unit:`间`,color:`#409EFF`,bg:`#E0EFFF`},{key:`occupied_rooms`,title:`入住房间数`,value:`--`,unit:`间`,color:`#E6A23C`,bg:`#FDF0D6`},{key:`today_revenue`,title:`今日营收`,value:`--`,unit:`元`,color:`#F56C6C`,bg:`#FDE2E2`},{key:`month_revenue`,title:`月度营收`,value:`--`,unit:`元`,color:`#C97B5E`,bg:`#F9E8E0`}]);async function T(){C.value=!0;try{let e=(await g.overview()).data||{};w.value.forEach(t=>{e[t.key]!==void 0&&e[t.key]!==null&&(t.value=e[t.key])})}finally{C.value=!1}}return r(T),(r,u)=>{let h=a(`el-col`),g=a(`el-row`),T=t(`loading`);return c((n(),d(`div`,_,[u[0]||=f(`div`,{class:`flex items-center gap-2 mb-2`},[f(`span`,{class:`w-1 h-5 rounded bg-primary inline-block`,style:{background:`var(--color-primary)`}}),f(`span`,{class:`font-semibold text-base text-gray-800`},`经营概览`)],-1),p(g,{gutter:16},{default:e(()=>[(n(!0),d(l,null,m(w.value,t=>(n(),s(h,{key:t.key,xs:24,sm:12,md:8,lg:8,xl:4},{default:e(()=>[f(`div`,v,[f(`div`,{class:`w-14 h-14 rounded-xl flex items-center justify-center flex-shrink-0`,style:i({background:t.bg})},[f(`span`,{class:`text-2xl font-bold`,style:i({color:t.color})},o(t.title.charAt(0)),5)],4),f(`div`,y,[f(`div`,b,o(t.title),1),f(`div`,x,[f(`span`,{class:`text-3xl font-bold leading-none`,style:i({color:t.color})},o(t.value),5),f(`span`,S,o(t.unit),1)])])])]),_:2},1024))),128))]),_:1})])),[[T,C.value]])}}},[[`__scopeId`,`data-v-5c43fcd0`]]);export{C as default};