enterprise-saa-s-dashboard-.../.next/static/chunks/f877d056821b23ac.js

1 line
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40160,e=>{"use strict";let r=(0,e.i(75254).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",()=>r],40160)},52571,e=>{"use strict";let r=(0,e.i(75254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",()=>r],52571)},37727,e=>{"use strict";let r=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>r],37727)},86536,e=>{"use strict";let r=(0,e.i(75254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>r],86536)},55436,73375,63059,e=>{"use strict";var r=e.i(75254);let t=(0,r.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],55436);let i=(0,r.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>i],73375);let o=(0,r.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>o],63059)},39309,e=>{"use strict";var r=e.i(43476),t=e.i(71645),i=e.i(52571),o=e.i(55436),d=e.i(40160),l=e.i(73375),s=e.i(63059),n=e.i(37727),a=e.i(86536);let c=(0,e.i(75254).default)("file-down",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]),p=[{id:1,sn:"RX20240308001",boardModel:"ACB-6000",calibDate:"2024-03-01",expiryDate:"2025-03-01",operator:"王工程师",status:"合格",channel:6,deviation:"±0.05%"},{id:2,sn:"RX20240308002",boardModel:"ACB-6000",calibDate:"2024-02-15",expiryDate:"2025-02-15",operator:"张工程师",status:"合格",channel:6,deviation:"±0.03%"},{id:3,sn:"RX20240115003",boardModel:"ACB-5000",calibDate:"2024-01-15",expiryDate:"2025-01-15",operator:"王工程师",status:"合格",channel:4,deviation:"±0.08%"},{id:4,sn:"RX20240420004",boardModel:"ACB-6000",calibDate:"2024-04-20",expiryDate:"2025-04-20",operator:"李工程师",status:"待校准",channel:6,deviation:"-"},{id:5,sn:"RX20231205005",boardModel:"ACB-5000",calibDate:"2023-12-05",expiryDate:"2024-12-05",operator:"王工程师",status:"不合格",channel:4,deviation:"±0.25%"},{id:6,sn:"RX20240610006",boardModel:"ACB-6000",calibDate:"2024-06-10",expiryDate:"2025-06-10",operator:"张工程师",status:"合格",channel:6,deviation:"±0.04%"},{id:7,sn:"RX20240801007",boardModel:"ACB-6000",calibDate:"2024-08-01",expiryDate:"2025-08-01",operator:"李工程师",status:"待校准",channel:6,deviation:"-"},{id:8,sn:"RX20240305008",boardModel:"ACB-5000",calibDate:"2024-03-05",expiryDate:"2025-03-05",operator:"王工程师",status:"合格",channel:4,deviation:"±0.06%"},{id:9,sn:"RX20240922009",boardModel:"ACB-6000",calibDate:"2024-09-22",expiryDate:"2025-09-22",operator:"张工程师",status:"合格",channel:6,deviation:"±0.02%"},{id:10,sn:"RX20231110010",boardModel:"ACB-5000",calibDate:"2023-11-10",expiryDate:"2024-11-10",operator:"李工程师",status:"不合格",channel:4,deviation:"±0.30%"}],x=["全部","王工程师","张工程师","李工程师"],h=["全部","合格","不合格","待校准"],b=[{channel:"CH1",reference:"1000.00Ω",measured:"999.95Ω",deviation:"+0.005%",result:"合格"},{channel:"CH2",reference:"1000.00Ω",measured:"1000.03Ω",deviation:"-0.003%",result:"合格"},{channel:"CH3",reference:"1000.00Ω",measured:"999.98Ω",deviation:"+0.002%",result:"合格"},{channel:"CH4",reference:"1000.00Ω",measured:"1000.08Ω",deviation:"-0.008%",result:"合格"},{channel:"CH5",reference:"1000.00Ω",measured:"999.92Ω",deviation:"+0.008%",result:"合格"},{channel:"CH6",reference:"1000.00Ω",measured:"1000.05Ω",deviation:"-0.005%",result:"合格"}];function g(e){switch(e){case"合格":return{backgroundColor:"#F6FFED",color:"#52C41A",border:"1px solid #B7EB8F"};case"不合格":return{backgroundColor:"#FFF1F0",color:"#FF4D4F",border:"1px solid #FFCCC7"};case"待校准":return{backgroundColor:"#FFFBE6",color:"#FAAD14",border:"1px solid #FFE58F"};default:return{backgroundColor:"#FAFAFA",color:"rgba(0,0,0,0.45)",border:"1px solid #D9D9D9"}}}function u(){let[e,u]=(0,t.useState)(""),[f,y]=(0,t.useState)("全部"),[j,v]=(0,t.useState)("全部"),[m,C]=(0,t.useState)(1),[D,F]=(0,t.useState)(null),k=p.filter(r=>(!e||!!r.sn.toLowerCase().includes(e.toLowerCase()))&&("全部"===f||r.status===f)&&("全部"===j||r.operator===j)),S=Math.ceil(k.length/6),z=k.slice((m-1)*6,6*m);return(0,r.jsxs)("div",{style:{padding:24},children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{style:{fontSize:20,fontWeight:600,margin:0},children:"校准管理"}),(0,r.jsx)("p",{style:{fontSize:14,color:"rgba(0,0,0,0.45)",margin:"4px 0 0"},children:"管理采集板校准数据与记录"})]}),(0,r.jsxs)("button",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:[(0,r.jsx)(d.Download,{size:16}),"导入"]})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:12,padding:16,backgroundColor:"#F9F0FF",borderRadius:8,marginBottom:24,border:"1px solid #D3ADF7"},children:[(0,r.jsx)(i.Info,{size:18,style:{color:"#722ED1",flexShrink:0,marginTop:2}}),(0,r.jsx)("div",{style:{fontSize:14,color:"#722ED1",lineHeight:1.6},children:"校准管理仅针对采集板ACB系列其他类型板卡无需校准。校准到期前30天系统会自动提醒。"})]}),(0,r.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:8,padding:20,marginBottom:24,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-end",gap:16},children:[(0,r.jsxs)("div",{style:{flex:1},children:[(0,r.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"采集板SN号"}),(0,r.jsx)("input",{type:"text",value:e,onChange:e=>{u(e.target.value),C(1)},placeholder:"输入SN号搜索",style:{width:"100%",padding:"6px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]}),(0,r.jsxs)("div",{style:{flex:1},children:[(0,r.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"校准状态"}),(0,r.jsx)("select",{value:f,onChange:e=>{y(e.target.value),C(1)},style:{width:"100%",padding:"6px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:h.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})]}),(0,r.jsxs)("div",{style:{flex:1},children:[(0,r.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"校准人员"}),(0,r.jsx)("select",{value:j,onChange:e=>{v(e.target.value),C(1)},style:{width:"100%",padding:"6px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:x.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})]}),(0,r.jsxs)("button",{onClick:()=>C(1),style:{display:"flex",alignItems:"center",gap:4,padding:"6px 16px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14,flexShrink:0},children:[(0,r.jsx)(o.Search,{size:14}),"查询"]})]})}),(0,r.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:8,boxShadow:"0 1px 2px rgba(0,0,0,0.05)",overflow:"hidden"},children:[(0,r.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{style:{backgroundColor:"#FAFAFA"},children:["采集板SN号","板卡型号","校准日期","到期日期","校准人员","状态","操作"].map(e=>(0,r.jsx)("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:14,fontWeight:600,color:"rgba(0,0,0,0.85)",borderBottom:"1px solid #F0F0F0"},children:e},e))})}),(0,r.jsx)("tbody",{children:z.map(e=>(0,r.jsxs)("tr",{style:{borderBottom:"1px solid #F0F0F0"},children:[(0,r.jsx)("td",{style:{padding:"12px 16px",fontSize:14,fontWeight:500},children:e.sn}),(0,r.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:e.boardModel}),(0,r.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:e.calibDate}),(0,r.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:e.expiryDate}),(0,r.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:e.operator}),(0,r.jsx)("td",{style:{padding:"12px 16px"},children:(0,r.jsx)("span",{style:{...g(e.status),padding:"2px 8px",borderRadius:4,fontSize:12},children:e.status})}),(0,r.jsx)("td",{style:{padding:"12px 16px"},children:(0,r.jsxs)("div",{style:{display:"flex",gap:12},children:[(0,r.jsxs)("button",{onClick:()=>F(e),style:{color:"#4a7c59",cursor:"pointer",border:"none",background:"none",fontSize:14,display:"flex",alignItems:"center",gap:4},children:[(0,r.jsx)(a.Eye,{size:14}),"详情"]}),(0,r.jsxs)("button",{style:{color:"#4a7c59",cursor:"pointer",border:"none",background:"none",fontSize:14,display:"flex",alignItems:"center",gap:4},children:[(0,r.jsx)(c,{size:14}),"校准文件"]})]})})]},e.id))})]}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderTop:"1px solid #F0F0F0"},children:[(0,r.jsxs)("span",{style:{fontSize:14,color:"rgba(0,0,0,0.45)"},children:["显示 ",(m-1)*6+1,"-",Math.min(6*m,k.length)," / 共 ",k.length," 条"]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,r.jsx)("button",{onClick:()=>C(e=>Math.max(1,e-1)),disabled:1===m,style:{padding:"4px 8px",border:"1px solid #D9D9D9",borderRadius:4,backgroundColor:"#fff",cursor:1===m?"not-allowed":"pointer",opacity:1===m?.4:1},children:(0,r.jsx)(l.ChevronLeft,{size:16})}),Array.from({length:S},(e,t)=>(0,r.jsx)("button",{onClick:()=>C(t+1),style:{width:32,height:32,borderRadius:4,fontSize:14,border:m===t+1?"1px solid #4a7c59":"1px solid #D9D9D9",color:m===t+1?"#4a7c59":"rgba(0,0,0,0.65)",backgroundColor:m===t+1?"#eef5f0":"#fff",cursor:"pointer"},children:t+1},t)),(0,r.jsx)("button",{onClick:()=>C(e=>Math.min(S,e+1)),disabled:m===S,style:{padding:"4px 8px",border:"1px solid #D9D9D9",borderRadius:4,backgroundColor:"#fff",cursor:m===S?"not-allowed":"pointer",opacity:m===S?.4:1},children:(0,r.jsx)(s.ChevronRight,{size:16})})]})]})]}),D&&(0,r.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:50},children:[(0,r.jsx)("div",{onClick:()=>F(null),style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.45)"}}),(0,r.jsxs)("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:560,backgroundColor:"#fff",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column"},children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"1px solid #F0F0F0"},children:[(0,r.jsxs)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:["校准详情 - ",D.sn]}),(0,r.jsx)("button",{onClick:()=>F(null),style:{border:"none",background:"none",cursor:"pointer",padding:4},children:(0,r.jsx)(n.X,{size:20})})]}),(0,r.jsxs)("div",{style:{flex:1,overflow:"auto",padding:24},children:[(0,r.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,marginBottom:16,border:"1px solid #F0F0F0"},children:[(0,r.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"基本信息"}),(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,fontSize:13},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"采集板SN"}),D.sn]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"板卡型号:"}),D.boardModel]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"通道数:"}),D.channel]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"综合偏差:"}),D.deviation]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"校准日期:"}),D.calibDate]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"到期日期:"}),D.expiryDate]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"校准人员:"}),D.operator]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"状态:"}),(0,r.jsx)("span",{style:{...g(D.status),padding:"1px 6px",borderRadius:4,fontSize:12},children:D.status})]})]})]}),(0,r.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,marginBottom:16,border:"1px solid #F0F0F0"},children:[(0,r.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"通道校准结果"}),(0,r.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:["通道","参考值","测量值","偏差","结果"].map(e=>(0,r.jsx)("th",{style:{padding:"8px 10px",textAlign:"left",fontSize:12,fontWeight:600,color:"rgba(0,0,0,0.65)",borderBottom:"1px solid #F0F0F0"},children:e},e))})}),(0,r.jsx)("tbody",{children:b.map((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{style:{padding:"8px 10px",fontSize:13},children:e.channel}),(0,r.jsx)("td",{style:{padding:"8px 10px",fontSize:13,color:"rgba(0,0,0,0.65)"},children:e.reference}),(0,r.jsx)("td",{style:{padding:"8px 10px",fontSize:13},children:e.measured}),(0,r.jsx)("td",{style:{padding:"8px 10px",fontSize:13,color:"rgba(0,0,0,0.65)"},children:e.deviation}),(0,r.jsx)("td",{style:{padding:"8px 10px"},children:(0,r.jsx)("span",{style:{...g(e.result),padding:"1px 6px",borderRadius:4,fontSize:11},children:e.result})})]},t))})]})]})]}),(0,r.jsxs)("div",{style:{padding:"16px 24px",borderTop:"1px solid #F0F0F0",display:"flex",justifyContent:"flex-end",gap:12},children:[(0,r.jsxs)("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:[(0,r.jsx)(c,{size:14}),"下载校准文件"]}),(0,r.jsx)("button",{onClick:()=>F(null),style:{padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:"关闭"})]})]})]})]})}e.s(["default",()=>u],39309)}]);