import{D as x}from"./download-hBwFRgUo.js";import{d as u,a as l,b as e,f as m,u as g,j as v,F as n,r as d,o as r,n as c,t as o,s as y}from"./index-C5t0nGiQ.js";const f={class:"p-6"},h={class:"mb-6 flex items-center justify-between"},_={class:"px-4 py-2 rounded text-white flex items-center gap-2 text-sm",style:{"background-color":"#4a7c59"}},w={class:"bg-white p-4 rounded-lg mb-6",style:{"box-shadow":"0 1px 2px rgba(0,0,0,0.05)"}},k={class:"flex items-center gap-4"},D={class:"flex items-center gap-1"},C=["onClick"],F={class:"mb-6"},A={class:"grid grid-cols-4 gap-4"},j={class:"text-sm",style:{color:"rgba(0,0,0,0.45)"}},B={class:"grid grid-cols-2 gap-6 mb-6"},N={class:"bg-white p-6 rounded-lg",style:{"box-shadow":"0 1px 2px rgba(0,0,0,0.05)"}},S={class:"space-y-4"},T={class:"text-sm w-16 flex-shrink-0",style:{color:"rgba(0,0,0,0.65)"}},V={class:"flex-1 h-5 rounded",style:{"background-color":"#F5F5F5",overflow:"hidden"}},z={class:"text-sm w-14 text-right",style:{color:"rgba(0,0,0,0.85)"}},G=u({__name:"RepairStats",setup(E){const a=y("本月"),i=["本月","上月","本季度","本年度","自定义"],b=[{value:"156",label:"总工单数",color:"rgba(0,0,0,0.85)"},{value:"8",label:"处理中",color:"#4a7c59"},{value:"145",label:"已完成",color:"#52C41A"},{value:"3",label:"待处理",color:"#FF4D4F"}],p=[{name:"板卡故障",percent:65.5,color:"#4a7c59"},{name:"固件异常",percent:22.3,color:"#52C41A"},{name:"通信故障",percent:6.3,color:"#FAAD14"},{name:"其他",percent:5.9,color:"#8C8C8C"}];return(L,s)=>(r(),l("div",f,[e("div",h,[s[1]||(s[1]=e("h2",{class:"text-2xl font-semibold"},"维修统计",-1)),e("button",_,[m(g(x),{size:16}),s[0]||(s[0]=v(" 导出报告 ",-1))])]),e("div",w,[e("div",k,[s[2]||(s[2]=e("span",{class:"text-sm",style:{color:"rgba(0,0,0,0.65)"}},"时间范围:",-1)),s[3]||(s[3]=e("select",{class:"px-3 py-1.5 border rounded text-sm",style:{"border-color":"#D9D9D9","background-color":"#fff"}},[e("option",null,"本月")],-1)),e("div",D,[(r(),l(n,null,d(i,t=>e("button",{key:t,class:"px-4 py-1.5 rounded text-sm transition-colors",style:c({backgroundColor:a.value===t?"#4a7c59":"transparent",color:a.value===t?"#fff":"rgba(0,0,0,0.65)"}),onClick:R=>a.value=t},o(t),13,C)),64))])])]),e("div",F,[s[4]||(s[4]=e("h3",{class:"text-base font-medium mb-3",style:{color:"rgba(0,0,0,0.85)"}},"维修统计",-1)),e("div",A,[(r(),l(n,null,d(b,t=>e("div",{key:t.label,class:"bg-white p-5 rounded-lg",style:{"box-shadow":"0 1px 2px rgba(0,0,0,0.05)"}},[e("div",{class:"text-3xl font-semibold mb-1",style:c({color:t.color})},o(t.value),5),e("div",j,o(t.label),1)])),64))])]),e("div",B,[e("div",N,[s[5]||(s[5]=e("h3",{class:"text-base font-semibold mb-5"},"故障类型分布",-1)),e("div",S,[(r(),l(n,null,d(p,t=>e("div",{key:t.name,class:"flex items-center gap-3"},[e("span",T,o(t.name),1),e("div",V,[e("div",{class:"h-full rounded",style:c({width:t.percent+"%",backgroundColor:t.color})},null,4)]),e("span",z,o(t.percent)+"%",1)])),64))])]),s[6]||(s[6]=e("div",{class:"bg-white p-6 rounded-lg",style:{"box-shadow":"0 1px 2px rgba(0,0,0,0.05)"}},[e("h3",{class:"text-base font-semibold mb-5"},"维修趋势"),e("div",{class:"flex items-center justify-center h-40",style:{color:"rgba(0,0,0,0.25)"}},[e("div",{class:"text-center text-sm"},[e("div",null,"📊 维修趋势图表"),e("div",null,"1月-6月趋势")])])],-1))]),s[7]||(s[7]=e("div",{class:"bg-white p-4 rounded-lg flex items-center gap-3",style:{"box-shadow":"0 1px 2px rgba(0,0,0,0.05)"}},[e("button",{class:"px-4 py-2 rounded text-white text-sm",style:{"background-color":"#4a7c59"}},"导出报表"),e("button",{class:"px-4 py-2 rounded text-sm",style:{border:"1px solid #D9D9D9",color:"rgba(0,0,0,0.85)"}},"打印")],-1))]))}});export{G as default};
