1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37727,e=>{"use strict";let o=(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",()=>o],37727)},7233,e=>{"use strict";let o=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>o],7233)},86536,e=>{"use strict";let o=(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",()=>o],86536)},55436,73375,63059,e=>{"use strict";var o=e.i(75254);let i=(0,o.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>i],55436);let r=(0,o.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>r],73375);let t=(0,o.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],63059)},72137,e=>{"use strict";var o=e.i(43476),i=e.i(71645),r=e.i(22016),t=e.i(18566),s=e.i(7233),l=e.i(17923),d=e.i(55436),n=e.i(75254);let a=(0,n.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var c=e.i(37727),p=e.i(86536);let x=(0,n.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var g=e.i(73375),h=e.i(63059);let u=(0,n.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),b=["全部","待处理","处理中","已处理"],f=["全部","高","中","低"],y=["全部","张工","李工","王工","赵工"],m=["板卡故障","固件异常","通信故障","电源故障","传感器故障","其他"],j=[{id:"WO-2024-0001",sn:"GD30-2024-000056",faultType:"板卡故障",status:"处理中",priority:"高",assignee:"张工",createDate:"2024-03-15",description:"主协板通信异常,无法正常采集数据"},{id:"WO-2024-0002",sn:"GD30-2024-000078",faultType:"固件异常",status:"待处理",priority:"中",assignee:"李工",createDate:"2024-03-14",description:"固件升级后设备无法启动"},{id:"WO-2024-0003",sn:"GT20-2025-000045",faultType:"通信故障",status:"已处理",priority:"低",assignee:"王工",createDate:"2024-03-13",description:"WiFi模块连接不稳定"},{id:"WO-2024-0004",sn:"GD30-2024-000102",faultType:"电源故障",status:"处理中",priority:"高",assignee:"赵工",createDate:"2024-03-12",description:"升压板输出电压不稳定"},{id:"WO-2024-0005",sn:"GD10-2024-000033",faultType:"传感器故障",status:"待处理",priority:"中",assignee:"张工",createDate:"2024-03-11",description:"温度传感器读数异常"},{id:"WO-2024-0006",sn:"GD30-2024-000089",faultType:"板卡故障",status:"已处理",priority:"低",assignee:"李工",createDate:"2024-03-10",description:"采集板通道3数据丢失"},{id:"WO-2024-0007",sn:"GT20-2025-000012",faultType:"其他",status:"待处理",priority:"高",assignee:"王工",createDate:"2024-03-09",description:"设备外壳损坏,需更换"},{id:"WO-2024-0008",sn:"GD30-2024-000145",faultType:"固件异常",status:"处理中",priority:"中",assignee:"赵工",createDate:"2024-03-08",description:"配置文件丢失,参数重置"}],v={"GD30-2024-000056":{model:"GD-30 Supreme",type:"高密度电法仪",firmware:"v2.3.4",location:"生产车间A"},"GD30-2024-000078":{model:"GD-30 Supreme",type:"高密度电法仪",firmware:"v2.3.5",location:"测试实验室"},"GT20-2025-000045":{model:"GT-20",type:"接地电阻测试仪",firmware:"v1.2.0",location:"仓库B"},"GD30-2024-000102":{model:"GD-30 Supreme",type:"高密度电法仪",firmware:"v2.3.4",location:"生产车间B"},"GD10-2024-000033":{model:"GD-10",type:"电法仪",firmware:"v1.5.2",location:"测试实验室"},"GD30-2024-000089":{model:"GD-30 Supreme",type:"高密度电法仪",firmware:"v2.3.3",location:"仓库A"},"GT20-2025-000012":{model:"GT-20",type:"接地电阻测试仪",firmware:"v1.1.8",location:"客户现场"},"GD30-2024-000145":{model:"GD-30 Supreme",type:"高密度电法仪",firmware:"v2.3.4",location:"生产车间A"}},S=[{date:"2024-03-15 10:30",operator:"张工",action:"创建工单",note:"客户反馈设备异常"},{date:"2024-03-15 14:00",operator:"张工",action:"开始处理",note:"初步检测为主协板故障"},{date:"2024-03-16 09:00",operator:"张工",action:"更换板卡",note:"更换主协板MCB-3000,新SN: MCB-2024-0056"}],D=[{oldBoard:"MCB-2024-0034",newBoard:"MCB-2024-0056",type:"主协板",model:"MCB-3000",date:"2024-03-16",operator:"张工"}],F=Object.keys(v);function C(e){switch(e){case"处理中":return{backgroundColor:"#eef5f0",color:"#4a7c59",border:"1px solid #a3c4ad"};case"已处理":return{backgroundColor:"#F6FFED",color:"#52C41A",border:"1px solid #B7EB8F"};default:return{backgroundColor:"#FAFAFA",color:"rgba(0,0,0,0.65)",border:"1px solid #D9D9D9"}}}function z(e){switch(e){case"高":return{backgroundColor:"#FFF1F0",color:"#FF4D4F",border:"1px solid #FFCCC7"};case"中":return{backgroundColor:"#FFF7E6",color:"#FA8C16",border:"1px solid #FFD591"};case"低":return{backgroundColor:"#F0F5FF",color:"#597EF7",border:"1px solid #ADC6FF"};default:return{backgroundColor:"#FAFAFA",color:"rgba(0,0,0,0.65)",border:"1px solid #D9D9D9"}}}function k(){let e=(0,t.useRouter)(),[n,k]=(0,i.useState)("全部"),[B,w]=(0,i.useState)("全部"),[R,A]=(0,i.useState)("全部"),[W,T]=(0,i.useState)(""),[G,I]=(0,i.useState)(""),[M,O]=(0,i.useState)(""),[N,L]=(0,i.useState)(1),[E,P]=(0,i.useState)(!1),[X,q]=(0,i.useState)(null),[K,U]=(0,i.useState)(null),[H,J]=(0,i.useState)(""),[Q,V]=(0,i.useState)("板卡故障"),[Y,Z]=(0,i.useState)(""),[$,_]=(0,i.useState)(""),[ee,eo]=(0,i.useState)("中"),[ei,er]=(0,i.useState)("张工"),[et,es]=(0,i.useState)(""),[el,ed]=(0,i.useState)(""),[en,ea]=(0,i.useState)("更换板卡"),[ec,ep]=(0,i.useState)(""),[ex,eg]=(0,i.useState)(""),[eh,eu]=(0,i.useState)("主协板"),[eb,ef]=(0,i.useState)(""),[ey,em]=(0,i.useState)([]),[ej,ev]=(0,i.useState)(""),[eS,eD]=(0,i.useState)(!1),eF=j.filter(e=>("全部"===n||e.status===n)&&("全部"===B||e.priority===B)&&("全部"===R||e.assignee===R)&&(!M||!!e.sn.toLowerCase().includes(M.toLowerCase()))&&(!W||!(e.createDate<W))&&(!G||!(e.createDate>G))&&!0),eC=Math.ceil(eF.length/5),ez=eF.slice((N-1)*5,5*N),ek=H?v[H]:null;return(0,o.jsxs)("div",{style:{padding:24},children:[(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:{fontSize:20,fontWeight:600,margin:0},children:"维修工单"}),(0,o.jsx)("p",{style:{fontSize:14,color:"rgba(0,0,0,0.45)",margin:"4px 0 0"},children:"管理设备维修工单"})]}),(0,o.jsxs)("div",{style:{display:"flex",gap:12},children:[(0,o.jsxs)("button",{onClick:()=>e.push("/repair/stats"),style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:[(0,o.jsx)(l.BarChart3,{size:16}),"维修统计"]}),(0,o.jsxs)("button",{onClick:()=>P(!0),style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:[(0,o.jsx)(s.Plus,{size:16}),"新建工单"]})]})]}),(0,o.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:8,padding:20,marginBottom:24,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:[(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16,marginBottom:16},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{style:{fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:4,display:"block"},children:"状态"}),(0,o.jsx)("select",{value:n,onChange:e=>{k(e.target.value),L(1)},style:{width:"100%",padding:"6px 8px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:b.map(e=>(0,o.jsx)("option",{value:e,children:e},e))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{style:{fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:4,display:"block"},children:"优先级"}),(0,o.jsx)("select",{value:B,onChange:e=>{w(e.target.value),L(1)},style:{width:"100%",padding:"6px 8px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:f.map(e=>(0,o.jsx)("option",{value:e,children:e},e))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{style:{fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:4,display:"block"},children:"负责人"}),(0,o.jsx)("select",{value:R,onChange:e=>{A(e.target.value),L(1)},style:{width:"100%",padding:"6px 8px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:y.map(e=>(0,o.jsx)("option",{value:e,children:e},e))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{style:{fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:4,display:"block"},children:"开始日期"}),(0,o.jsx)("input",{type:"date",value:W,onChange:e=>{T(e.target.value),L(1)},style:{width:"100%",padding:"6px 8px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14}})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{style:{fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:4,display:"block"},children:"结束日期"}),(0,o.jsx)("input",{type:"date",value:G,onChange:e=>{I(e.target.value),L(1)},style:{width:"100%",padding:"6px 8px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14}})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{style:{fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:4,display:"block"},children:"设备SN"}),(0,o.jsx)("input",{type:"text",value:M,onChange:e=>{O(e.target.value),L(1)},placeholder:"输入设备SN搜索",style:{width:"100%",padding:"6px 8px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14}})]})]}),(0,o.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[(0,o.jsxs)("button",{onClick:()=>{k("全部"),w("全部"),A("全部"),T(""),I(""),O(""),L(1)},style:{display:"flex",alignItems:"center",gap:4,padding:"6px 16px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:[(0,o.jsx)(a,{size:14}),"重置"]}),(0,o.jsxs)("button",{onClick:()=>L(1),style:{display:"flex",alignItems:"center",gap:4,padding:"6px 16px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:[(0,o.jsx)(d.Search,{size:14}),"搜索"]})]})]}),(0,o.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12,marginBottom:24},children:ez.map(e=>(0,o.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:8,padding:20,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[(0,o.jsxs)("div",{style:{flex:1},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:8},children:[(0,o.jsx)("span",{style:{fontSize:16,fontWeight:600},children:e.id}),(0,o.jsxs)("span",{style:{...C(e.status),padding:"2px 8px",borderRadius:4,fontSize:12},children:[function(e){switch(e){case"处理中":return"🔧";case"已处理":return"✅";case"待处理":return"⏳";default:return""}}(e.status)," ",e.status]}),(0,o.jsxs)("span",{style:{...z(e.priority),padding:"2px 8px",borderRadius:4,fontSize:12},children:[e.priority,"优先级"]})]}),(0,o.jsxs)("div",{style:{display:"flex",gap:24,fontSize:14,color:"rgba(0,0,0,0.65)"},children:[(0,o.jsxs)("span",{children:["SN: ",e.sn]}),(0,o.jsxs)("span",{children:["故障类型: ",e.faultType]}),(0,o.jsxs)("span",{children:["负责人: ",e.assignee]}),(0,o.jsxs)("span",{children:["创建日期: ",e.createDate]})]}),(0,o.jsx)("div",{style:{fontSize:13,color:"rgba(0,0,0,0.45)",marginTop:8},children:e.description})]}),(0,o.jsxs)("div",{style:{display:"flex",gap:8,flexShrink:0,marginLeft:16},children:[(0,o.jsxs)("button",{onClick:()=>U(e),style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:13,color:"#4a7c59"},children:[(0,o.jsx)(p.Eye,{size:14}),"详情"]}),("处理中"===e.status||"待处理"===e.status)&&(0,o.jsxs)("button",{onClick:()=>q(e),style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:13},children:[(0,o.jsx)(x,{size:14}),"处理"]})]})]})},e.id))}),eC>1&&(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:8},children:[(0,o.jsx)("button",{onClick:()=>L(e=>Math.max(1,e-1)),disabled:1===N,style:{padding:"6px 12px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:1===N?"not-allowed":"pointer",opacity:1===N?.5:1},children:(0,o.jsx)(g.ChevronLeft,{size:16})}),Array.from({length:eC},(e,o)=>o+1).map(e=>(0,o.jsx)("button",{onClick:()=>L(e),style:{padding:"6px 12px",border:N===e?"1px solid #4a7c59":"1px solid #D9D9D9",borderRadius:6,backgroundColor:N===e?"#4a7c59":"#fff",color:N===e?"#fff":"rgba(0,0,0,0.65)",cursor:"pointer",fontSize:14,minWidth:36},children:e},e)),(0,o.jsx)("button",{onClick:()=>L(e=>Math.min(eC,e+1)),disabled:N===eC,style:{padding:"6px 12px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:N===eC?"not-allowed":"pointer",opacity:N===eC?.5:1},children:(0,o.jsx)(h.ChevronRight,{size:16})}),(0,o.jsxs)("span",{style:{fontSize:14,color:"rgba(0,0,0,0.45)",marginLeft:8},children:["共 ",eF.length," 条"]})]}),E&&(0,o.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:50},children:[(0,o.jsx)("div",{onClick:()=>P(!1),style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.45)"}}),(0,o.jsxs)("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:520,backgroundColor:"#fff",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column"},children:[(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"1px solid #F0F0F0"},children:[(0,o.jsx)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:"新建维修工单"}),(0,o.jsx)("button",{onClick:()=>P(!1),style:{border:"none",background:"none",cursor:"pointer",padding:4},children:(0,o.jsx)(c.X,{size:20})})]}),(0,o.jsxs)("div",{style:{flex:1,overflow:"auto",padding:24},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"设备信息"}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"设备SN"}),(0,o.jsxs)("select",{value:H,onChange:e=>J(e.target.value),style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:[(0,o.jsx)("option",{value:"",children:"请选择设备"}),F.map(e=>(0,o.jsx)("option",{value:e,children:e},e))]})]}),ek&&(0,o.jsxs)("div",{style:{padding:12,backgroundColor:"#FAFAFA",borderRadius:6,marginBottom:16,fontSize:13,color:"rgba(0,0,0,0.65)"},children:[(0,o.jsxs)("div",{children:["型号:",ek.model," (",ek.type,")"]}),(0,o.jsxs)("div",{children:["固件:",ek.firmware]}),(0,o.jsxs)("div",{children:["位置:",ek.location]})]}),(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"故障信息"}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"故障类型"}),(0,o.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:m.map(e=>(0,o.jsx)("button",{onClick:()=>V(e),style:{padding:"6px 14px",borderRadius:6,fontSize:13,cursor:"pointer",border:Q===e?"1px solid #4a7c59":"1px solid #D9D9D9",backgroundColor:Q===e?"#eef5f0":"#fff",color:Q===e?"#4a7c59":"rgba(0,0,0,0.65)"},children:e},e))})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"故障描述"}),(0,o.jsx)("textarea",{value:Y,onChange:e=>Z(e.target.value),rows:3,placeholder:"请描述故障情况",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,resize:"vertical",boxSizing:"border-box"}})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"故障现象"}),(0,o.jsx)("textarea",{value:$,onChange:e=>_(e.target.value),rows:2,placeholder:"请描述故障现象",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,resize:"vertical",boxSizing:"border-box"}})]}),(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"工单信息"}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"优先级"}),(0,o.jsx)("div",{style:{display:"flex",gap:8},children:["低","中","高"].map(e=>(0,o.jsx)("button",{onClick:()=>eo(e),style:{padding:"6px 20px",borderRadius:6,fontSize:13,cursor:"pointer",...ee===e?z(e):{border:"1px solid #D9D9D9",backgroundColor:"#fff",color:"rgba(0,0,0,0.65)"}},children:e},e))})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"维修人员"}),(0,o.jsx)("select",{value:ei,onChange:e=>er(e.target.value),style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:y.filter(e=>"全部"!==e).map(e=>(0,o.jsx)("option",{value:e,children:e},e))})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"预计修复时间"}),(0,o.jsx)("input",{type:"date",value:et,onChange:e=>es(e.target.value),style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"备注"}),(0,o.jsx)("textarea",{value:el,onChange:e=>ed(e.target.value),rows:2,placeholder:"备注信息",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,resize:"vertical",boxSizing:"border-box"}})]})]}),(0,o.jsxs)("div",{style:{padding:"16px 24px",borderTop:"1px solid #F0F0F0",display:"flex",justifyContent:"flex-end",gap:12},children:[(0,o.jsx)("button",{onClick:()=>P(!1),style:{padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:"取消"}),(0,o.jsx)("button",{onClick:()=>P(!1),style:{padding:"8px 20px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:"创建工单"})]})]})]}),X&&(0,o.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:50},children:[(0,o.jsx)("div",{onClick:()=>q(null),style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.45)"}}),(0,o.jsxs)("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:520,backgroundColor:"#fff",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column"},children:[(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"1px solid #F0F0F0"},children:[(0,o.jsxs)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:["处理工单 - ",X.id]}),(0,o.jsx)("button",{onClick:()=>q(null),style:{border:"none",background:"none",cursor:"pointer",padding:4},children:(0,o.jsx)(c.X,{size:20})})]}),(0,o.jsxs)("div",{style:{flex:1,overflow:"auto",padding:24},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"处理操作"}),(0,o.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:20},children:["更换板卡","固件修复","参数重置","其他处理"].map(e=>(0,o.jsx)("button",{onClick:()=>ea(e),style:{padding:"6px 14px",borderRadius:6,fontSize:13,cursor:"pointer",border:en===e?"1px solid #4a7c59":"1px solid #D9D9D9",backgroundColor:en===e?"#eef5f0":"#fff",color:en===e?"#4a7c59":"rgba(0,0,0,0.65)"},children:e},e))}),"更换板卡"===en&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"板卡更换"}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"板卡类型"}),(0,o.jsx)("select",{value:eh,onChange:e=>eu(e.target.value),style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:["主协板","采集板","发射板","升压板"].map(e=>(0,o.jsx)("option",{value:e,children:e},e))})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"板卡型号"}),(0,o.jsx)("input",{value:eb,onChange:e=>ef(e.target.value),placeholder:"请输入板卡型号",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"原板卡SN"}),(0,o.jsx)("input",{value:ec,onChange:e=>ep(e.target.value),placeholder:"请输入原板卡SN",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]}),(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("label",{style:{display:"block",fontSize:13,color:"rgba(0,0,0,0.65)",marginBottom:6},children:"新板卡SN"}),(0,o.jsx)("input",{value:ex,onChange:e=>eg(e.target.value),placeholder:"请输入新板卡SN",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]})]}),(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"授权处理"}),(0,o.jsxs)("div",{style:{marginBottom:16,display:"flex",flexDirection:"column",gap:8},children:[(0,o.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,cursor:"pointer"},children:[(0,o.jsx)("input",{type:"checkbox",checked:ey.includes("reauth"),onChange:()=>em(e=>e.includes("reauth")?e.filter(e=>"reauth"!==e):[...e,"reauth"])}),"重新生成授权文件"]}),(0,o.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,cursor:"pointer"},children:[(0,o.jsx)("input",{type:"checkbox",checked:ey.includes("firmware"),onChange:()=>em(e=>e.includes("firmware")?e.filter(e=>"firmware"!==e):[...e,"firmware"])}),"推送适配固件"]})]}),(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:16,paddingBottom:8,borderBottom:"1px solid #F0F0F0"},children:"处理备注"}),(0,o.jsx)("textarea",{value:ej,onChange:e=>ev(e.target.value),rows:3,placeholder:"请输入处理备注",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,resize:"vertical",boxSizing:"border-box",marginBottom:20}}),(0,o.jsxs)("div",{style:{padding:16,borderRadius:8,border:"1px solid #FFCCC7",backgroundColor:"#FFF1F0"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,o.jsx)(u,{size:16,style:{color:"#FF4D4F"}}),(0,o.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#FF4D4F"},children:"报废处理"})]}),(0,o.jsx)("p",{style:{fontSize:13,color:"rgba(0,0,0,0.45)",marginBottom:12},children:"报废操作不可逆,请谨慎操作"}),(0,o.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,cursor:"pointer",marginBottom:12},children:[(0,o.jsx)("input",{type:"checkbox",checked:eS,onChange:e=>eD(e.target.checked)}),"申请报废此设备"]}),eS&&(0,o.jsx)(r.default,{href:"/scrap",style:{display:"inline-flex",alignItems:"center",gap:4,padding:"6px 14px",borderRadius:6,fontSize:13,border:"1px solid #FF4D4F",color:"#FF4D4F",backgroundColor:"#fff",textDecoration:"none"},children:"前往报废管理"})]})]}),(0,o.jsxs)("div",{style:{padding:"16px 24px",borderTop:"1px solid #F0F0F0",display:"flex",justifyContent:"flex-end",gap:12},children:[(0,o.jsx)("button",{onClick:()=>q(null),style:{padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:"取消"}),(0,o.jsx)("button",{onClick:()=>q(null),style:{padding:"8px 20px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:"提交处理"})]})]})]}),K&&(0,o.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:50},children:[(0,o.jsx)("div",{onClick:()=>U(null),style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.45)"}}),(0,o.jsxs)("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:540,backgroundColor:"#fff",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column"},children:[(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"1px solid #F0F0F0"},children:[(0,o.jsxs)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:["工单详情 - ",K.id]}),(0,o.jsx)("button",{onClick:()=>U(null),style:{border:"none",background:"none",cursor:"pointer",padding:4},children:(0,o.jsx)(c.X,{size:20})})]}),(0,o.jsxs)("div",{style:{flex:1,overflow:"auto",padding:24},children:[(0,o.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,marginBottom:16,border:"1px solid #F0F0F0"},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"工单信息"}),(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,fontSize:13},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"工单号:"}),K.id]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"状态:"}),(0,o.jsx)("span",{style:{...C(K.status),padding:"1px 6px",borderRadius:4,fontSize:12},children:K.status})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"优先级:"}),(0,o.jsx)("span",{style:{...z(K.priority),padding:"1px 6px",borderRadius:4,fontSize:12},children:K.priority})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"创建时间:"}),K.createDate]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"维修人员:"}),K.assignee]})]})]}),(0,o.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,marginBottom:16,border:"1px solid #F0F0F0"},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"设备信息"}),(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,fontSize:13},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"设备SN:"}),K.sn]}),v[K.sn]&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"型号:"}),v[K.sn].model]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"固件:"}),v[K.sn].firmware]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"位置:"}),v[K.sn].location]})]})]})]}),(0,o.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,marginBottom:16,border:"1px solid #F0F0F0"},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"故障信息"}),(0,o.jsxs)("div",{style:{fontSize:13},children:[(0,o.jsxs)("div",{style:{marginBottom:8},children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"故障类型:"}),K.faultType]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"故障描述:"}),K.description]})]})]}),(0,o.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,marginBottom:16,border:"1px solid #F0F0F0"},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"处理记录"}),S.map((e,i)=>(0,o.jsxs)("div",{style:{display:"flex",gap:12,paddingBottom:12,marginBottom:12,borderBottom:i<S.length-1?"1px solid #F0F0F0":"none"},children:[(0,o.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:"#4a7c59",marginTop:6,flexShrink:0}}),(0,o.jsxs)("div",{style:{fontSize:13},children:[(0,o.jsx)("div",{style:{fontWeight:500,marginBottom:4},children:e.action}),(0,o.jsx)("div",{style:{color:"rgba(0,0,0,0.45)"},children:e.note}),(0,o.jsxs)("div",{style:{color:"rgba(0,0,0,0.35)",marginTop:4},children:[e.date," · ",e.operator]})]})]},i))]}),(0,o.jsxs)("div",{style:{padding:16,backgroundColor:"#FAFAFA",borderRadius:8,border:"1px solid #F0F0F0"},children:[(0,o.jsx)("h4",{style:{fontSize:14,fontWeight:600,marginBottom:12},children:"板卡更换记录"}),D.map((e,i)=>(0,o.jsxs)("div",{style:{fontSize:13,display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"类型:"}),e.type," (",e.model,")"]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"更换时间:"}),e.date]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"原板卡:"}),e.oldBoard]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"新板卡:"}),e.newBoard]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{style:{color:"rgba(0,0,0,0.45)"},children:"操作人:"}),e.operator]})]},i))]})]}),(0,o.jsx)("div",{style:{padding:"16px 24px",borderTop:"1px solid #F0F0F0",display:"flex",justifyContent:"flex-end",gap:12},children:(0,o.jsx)("button",{onClick:()=>U(null),style:{padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:"关闭"})})]})]})]})}e.s(["default",()=>k],72137)}]); |