3 lines
7.5 KiB
JavaScript
3 lines
7.5 KiB
JavaScript
module.exports=[16201,a=>{"use strict";let b=(0,a.i(70106).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);a.s(["CheckCircle",()=>b],16201)},73320,a=>{"use strict";let b=(0,a.i(70106).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);a.s(["Upload",()=>b],73320)},40777,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(70106);let e=(0,d.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),f=(0,d.default)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),g=(0,d.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),h=(0,d.default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var i=a.i(16201);let j=(0,d.default)("package-check",[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]);var k=a.i(79808);let l=(0,d.default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),m=(0,d.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);var n=a.i(73320),o=a.i(72131);let p=[{label:"设备总数",value:"5,234",trend:"up",trendValue:"+5.2%",color:"#4a7c59",icon:g,link:"/devices"},{label:"装配中",value:"4,856",trend:"up",trendValue:"+2.8%",color:"#52C41A",icon:h,link:"/devices"},{label:"已激活",value:"4,912",trend:"up",trendValue:"+1.5%",color:"#4a7c59",icon:i.CheckCircle,link:"/devices"},{label:"有新版本",value:"156",color:"#722ED1",icon:j,link:"/firmware"},{label:"维修中",value:"23",trend:"down",trendValue:"-12.3%",color:"#FF4D4F",icon:k.Wrench,link:"/repair"},{label:"报废",value:"56",color:"#FA8C16",icon:l,link:"/scrap"},{label:"授权即将到期",value:"45",color:"#FAAD14",icon:m,link:"/licenses"},{label:"可升级",value:"8",color:"#13C2C2",icon:n.Upload,link:"/firmware"}],q=[{name:"已装配",value:45,color:"#52C41A"},{name:"已出厂",value:378,color:"#FF4D4F"},{name:"已激活",value:286,color:"#FAAD14"},{name:"报废",value:7,color:"#8C8C8C"}],r=[{title:"校准即将到期",count:23,link:"/calibration",tasks:[{deviceSN:"AC20240308005",description:"采集板校准即将到期",time:"3天后到期",link:"/calibration"},{deviceSN:"AC20240308006",description:"采集板校准即将到期",time:"今天到期",link:"/calibration"}]},{title:"维修工单",count:5,link:"/repair",tasks:[{deviceSN:"GD30-2024-000056",description:"板卡故障,待处理",time:"4小时前",link:"/repair/WO-2024-0001"},{deviceSN:"GD30-2024-000078",description:"固件异常",time:"6小时前",link:"/repair/WO-2024-0002"}]},{title:"固件升级通知",count:8,link:"/firmware",tasks:[{deviceSN:"GD-30 Supreme",description:"固件版本v2.3.5可用",time:"1天前",link:"/firmware"},{deviceSN:"GD-10 Supreme",description:"固件版本v2.3.5可用",time:"1天前",link:"/firmware"}]},{title:"授权即将到期",count:45,link:"/licenses",tasks:[{deviceSN:"GD30-2025-000001",description:"授权将于30天后到期",time:"30天",link:"/licenses"},{deviceSN:"GT20-2025-000045",description:"授权将于15天后到期",time:"15天",link:"/licenses"}]}];function s(){let a=(0,o.useMemo)(()=>Math.max(...q.map(a=>a.value)),[]);return(0,b.jsxs)("div",{className:"p-6",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsx)("h2",{className:"text-2xl font-semibold mb-1",children:"首页"}),(0,b.jsx)("p",{className:"text-sm",style:{color:"rgba(0,0,0,0.45)"},children:"生产管理数据总览"})]}),(0,b.jsx)("div",{className:"grid grid-cols-4 gap-6 mb-6",children:p.map((a,d)=>{let g=a.icon;return(0,b.jsx)(c.default,{href:a.link,className:"bg-white p-6 rounded-lg block hover:shadow-md transition-shadow",style:{boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:(0,b.jsxs)("div",{className:"flex items-start justify-between",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("div",{className:"text-sm mb-2",style:{color:"rgba(0,0,0,0.65)"},children:a.label}),(0,b.jsx)("div",{className:"text-3xl font-semibold mb-2",children:a.value}),a.trend&&a.trendValue&&(0,b.jsxs)("div",{className:"flex items-center gap-1",style:{color:"up"===a.trend?"#52C41A":"#FF4D4F"},children:["up"===a.trend?(0,b.jsx)(e,{size:14}):(0,b.jsx)(f,{size:14}),(0,b.jsx)("span",{className:"text-sm",children:a.trendValue})]})]}),(0,b.jsx)("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center",style:{backgroundColor:a.color+"15"},children:(0,b.jsx)(g,{size:24,style:{color:a.color}})})]})},d)})}),(0,b.jsxs)("div",{className:"bg-white p-6 rounded-lg mb-6",style:{boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:[(0,b.jsx)("h3",{className:"text-lg font-semibold mb-6",children:"设备状态分布"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:q.map(c=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,b.jsx)("div",{style:{width:60,textAlign:"right",fontSize:14,color:"rgba(0,0,0,0.65)",flexShrink:0},children:c.name}),(0,b.jsx)("div",{style:{flex:1,backgroundColor:"#F5F5F5",borderRadius:4,height:24,overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${c.value/a*100}%`,height:"100%",backgroundColor:c.color,borderRadius:"0 4px 4px 0",transition:"width 0.3s ease",minWidth:2*(c.value>0)}})}),(0,b.jsx)("div",{style:{width:40,fontSize:14,color:"rgba(0,0,0,0.85)"},children:c.value})]},c.name))})]}),(0,b.jsxs)("div",{className:"bg-white p-6 rounded-lg",style:{boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:[(0,b.jsx)("h3",{className:"text-lg font-semibold mb-6",children:"待处理任务"}),(0,b.jsx)("div",{className:"grid grid-cols-2 gap-6",children:r.map((a,d)=>(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsx)("h4",{className:"text-base font-medium",children:a.title}),(0,b.jsx)("span",{className:"px-2 py-1 rounded text-xs",style:{backgroundColor:"#F0F2F5",color:"rgba(0,0,0,0.65)"},children:a.count})]}),a.tasks.map((a,d)=>(0,b.jsxs)("div",{className:"flex items-start justify-between py-3",style:{borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("div",{className:"text-sm mb-1",children:a.deviceSN}),(0,b.jsx)("div",{className:"text-sm",style:{color:"rgba(0,0,0,0.45)"},children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[a.time&&(0,b.jsx)("span",{className:"text-xs",style:{color:"rgba(0,0,0,0.45)"},children:a.time}),(0,b.jsx)(c.default,{href:a.link,className:"text-sm",style:{color:"#4a7c59"},children:"处理"})]})]},d)),a.tasks.length<a.count&&(0,b.jsxs)(c.default,{href:a.link,className:"block w-full mt-3 text-center text-sm",style:{color:"#4a7c59"},children:["查看全部 ",a.count," 项"]})]},d))})]})]})}a.s(["default",()=>s],40777)}];
|
|
|
|
//# sourceMappingURL=_481f2a6b._.js.map
|