12 lines
13 KiB
JavaScript
12 lines
13 KiB
JavaScript
import{I as V}from"./info-D3XHB5ch.js";import{P as T}from"./plus-vY9kAeXh.js";import{S as j}from"./server-Del2gqI5.js";import{C as B}from"./circle-check-Ddc7xHK2.js";import{T as G}from"./triangle-alert-DZ0A_5xH.js";import{c as h,d as N,a,b as t,i as y,u as b,F as x,r as p,j as g,k as F,o as d,t as l,n as m,e as E,g as z}from"./index-C436_g8x.js";import{T as M}from"./trash-2-B47UwHOB.js";/**
|
|
* @license lucide-vue-next v0.487.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const I=h("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
* @license lucide-vue-next v0.487.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const P=h("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),$={class:"p-6"},L={class:"mb-6 p-4 rounded-lg flex items-start gap-3",style:{backgroundColor:"#E6F7FF",border:"1px solid #91D5FF"}},R={class:"grid grid-cols-4 gap-6 mb-6"},K={class:"flex items-center justify-between"},O={class:"text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.65)"}},U={class:"text-3xl font-semibold"},W={class:"bg-white rounded-lg mb-6",style:{boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},X={class:"overflow-x-auto"},H={class:"w-full"},J={class:"px-6 py-4"},Q={class:"px-6 py-4",style:{color:"rgba(0, 0, 0, 0.65)"}},Y={class:"px-6 py-4"},Z={class:"text-sm",style:{color:"#1890FF"}},tt={class:"px-6 py-4"},et={class:"text-sm",style:{color:"#1890FF"}},ot={class:"px-6 py-4"},st={class:"text-sm",style:{color:"#1890FF"}},lt={class:"px-6 py-4"},rt={class:"px-6 py-4"},it={class:"bg-white rounded-lg mb-6",style:{boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},dt={class:"flex border-b",style:{borderColor:"#F0F0F0"}},nt=["onClick"],at={class:"p-6"},ct={class:"w-full"},ut={class:"px-3 py-3 text-sm",style:{color:"rgba(0, 0, 0, 0.45)"}},xt={class:"flex items-center gap-1"},pt={class:"px-3 py-3 text-sm"},yt=["value","onBlur"],bt=["onClick"],mt={class:"px-3 py-3 text-center"},vt=["onClick"],Ft={class:"mt-4 flex items-center justify-between"},ft={class:"bg-white rounded-lg",style:{boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},gt={class:"overflow-x-auto"},ht={class:"w-full"},_t={class:"px-6 py-4"},kt={class:"px-6 py-4"},Ct={class:"px-2 py-1 rounded text-xs",style:{backgroundColor:"#F0F2F5",color:"rgba(0, 0, 0, 0.85)"}},qt={class:"px-6 py-4",style:{color:"rgba(0, 0, 0, 0.65)"}},Gt=N({__name:"DeviceModelManagement",setup(wt){const n=F("GD30"),_=[{label:"型号总数",value:"12",icon:j,color:"#1890FF"},{label:"在产型号",value:"8",icon:B,color:"#52C41A"},{label:"停产型号",value:"3",icon:G,color:"#FAAD14"},{label:"关联设备总数",value:"5,234",icon:P,color:"#722ED1"}],k=[{name:"GD30 高密度电法仪",code:"GD30-2024",authFile:"auth_gd30_v2.3.lic",configFile:"config_gd30_v1.5.json",firmwareVersion:"v2.3.5",deviceCount:2456,status:"在产"},{name:"GT20 瞬变电磁仪",code:"GT20-2023",authFile:"auth_gt20_v1.8.lic",configFile:"config_gt20_v1.2.json",firmwareVersion:"v1.8.2",deviceCount:1823,status:"在产"},{name:"GM10 大地电磁仪",code:"GM10-2022",authFile:"auth_gm10_v1.5.lic",configFile:"config_gm10_v1.0.json",firmwareVersion:"v1.5.1",deviceCount:955,status:"停产"}],i=F({GD30:[{id:1,text:"主板SN扫码绑定主机",type:"text",required:!0,note:"唯一SN"},{id:2,text:"采集板SN录入",type:"text",required:!0,note:"1/6/12通道"},{id:3,text:"发射板SN录入",type:"text",required:!0,note:""},{id:4,text:"内置升压模块检查",type:"bool",required:!0,note:""},{id:5,text:"GPS/北斗检测",type:"bool",required:!0,note:"授时正常"},{id:6,text:"电池安装与容量检测",type:"bool",required:!0,note:""},{id:7,text:"输入电压12~48V测试",type:"bool",required:!0,note:""},{id:8,text:"接收电压精度校验",type:"bool",required:!0,note:"按型号量程"},{id:9,text:"自电补偿±10V",type:"bool",required:!0,note:""},{id:10,text:"输入阻抗≥100MΩ",type:"bool",required:!0,note:""},{id:11,text:"恒压/恒流模式",type:"bool",required:!0,note:""},{id:12,text:"最大发射电流达标",type:"bool",required:!0,note:"6A/10A/10A"},{id:13,text:"脉冲宽度配置",type:"bool",required:!0,note:""},{id:14,text:"调级输出电压",type:"bool",required:!0,note:"100~600V"},{id:15,text:"系统启动正常",type:"bool",required:!0,note:""},{id:16,text:"采集APP连接",type:"bool",required:!0,note:""},{id:17,text:"Geometa账号配置",type:"bool",required:!0,note:""},{id:18,text:"授权文件校验",type:"bool",required:!0,note:""},{id:19,text:"USB/WiFi/网口/SD",type:"bool",required:!0,note:""},{id:20,text:"IP66防护与密封",type:"bool",required:!0,note:""},{id:21,text:"过流/过压/短路保护",type:"bool",required:!0,note:""},{id:22,text:"出厂装箱核对",type:"bool",required:!0,note:""}],GT20:[{id:1,text:"主板SN扫码绑定主机",type:"text",required:!0,note:"唯一SN"},{id:2,text:"采集板SN录入",type:"text",required:!0,note:""},{id:3,text:"GPS/北斗检测",type:"bool",required:!0,note:"授时正常"},{id:4,text:"系统启动正常",type:"bool",required:!0,note:""},{id:5,text:"整体功能测试",type:"bool",required:!0,note:""}],GTXD:[{id:1,text:"主板SN扫码绑定主机",type:"text",required:!0,note:"唯一SN"},{id:2,text:"传感器模块连接",type:"bool",required:!0,note:""},{id:3,text:"接口板安装",type:"bool",required:!0,note:""},{id:4,text:"线缆整理",type:"bool",required:!0,note:""},{id:5,text:"系统初始化检测",type:"bool",required:!0,note:""}]}),u=F(null),C=(r,o,e,s)=>{i.value={...i.value,[r]:i.value[r].map(c=>c.id===o?{...c,[e]:s}:c)}},q=r=>{const o=i.value[r],e=o.length>0?Math.max(...o.map(s=>s.id))+1:1;i.value={...i.value,[r]:[...o,{id:e,text:"新检查项",type:"bool",required:!0,note:""}]}},w=(r,o)=>{i.value={...i.value,[r]:i.value[r].filter(e=>e.id!==o).map((e,s)=>({...e,id:s+1}))}},S=(r,o,e)=>{C(o,e,"text",r.target.value),u.value=null},A=r=>{r.key==="Enter"&&r.target.blur()},D=[{boardType:"主板",requiredVersion:"v2.3.x",validationRule:"版本号前缀必须为 v2.3",status:"active"},{boardType:"采集板",requiredVersion:"v1.8.x",validationRule:"版本号前缀必须为 v1.8",status:"active"},{boardType:"测控板",requiredVersion:"v1.5.x",validationRule:"版本号前缀必须为 v1.5",status:"active"}];return(r,o)=>(d(),a("div",$,[o[12]||(o[12]=t("div",{class:"mb-6"},[t("h2",{class:"text-2xl font-semibold mb-1"},"设备型号管理"),t("p",{class:"text-sm",style:{color:"rgba(0, 0, 0, 0.45)"}},"管理设备型号及相关配置")],-1)),t("div",L,[y(b(V),{size:20,style:{color:"#1890FF",flexShrink:0,marginTop:"2px"}}),o[1]||(o[1]=t("div",{style:{color:"#0050B3"}}," 型号管理是平台核心枢纽,每个型号关联授权文件、配置文件和固件版本 ",-1))]),t("div",R,[(d(),a(x,null,p(_,(e,s)=>t("div",{key:s,class:"bg-white p-6 rounded-lg",style:{boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},[t("div",K,[t("div",null,[t("div",O,l(e.label),1),t("div",U,l(e.value),1)]),t("div",{class:"w-12 h-12 rounded-lg flex items-center justify-center",style:m({backgroundColor:`${e.color}15`})},[(d(),E(z(e.icon),{size:24,style:m({color:e.color})},null,8,["style"]))],4)])])),64))]),t("div",W,[o[4]||(o[4]=t("div",{class:"p-6 border-b",style:{borderColor:"#F0F0F0"}},[t("div",{class:"flex items-center justify-between"},[t("h3",{class:"text-lg font-semibold"},"型号列表"),t("button",{class:"px-4 py-2 rounded text-white",style:{backgroundColor:"#1890FF"}}," 新增型号 ")])],-1)),t("div",X,[t("table",H,[o[3]||(o[3]=t("thead",{style:{backgroundColor:"#FAFAFA"}},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"型号名称"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"编码"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"授权文件"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"配置文件"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"固件版本"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"设备数"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"状态"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"操作")])],-1)),t("tbody",null,[(d(),a(x,null,p(k,(e,s)=>t("tr",{key:s,class:"border-b",style:{borderColor:"#F0F0F0"}},[t("td",J,l(e.name),1),t("td",Q,l(e.code),1),t("td",Y,[t("button",Z,l(e.authFile),1)]),t("td",tt,[t("button",et,l(e.configFile),1)]),t("td",ot,[t("button",st,l(e.firmwareVersion),1)]),t("td",lt,l(e.deviceCount.toLocaleString()),1),t("td",rt,[t("span",{class:"px-2 py-1 rounded text-xs",style:m({backgroundColor:e.status==="在产"?"#F6FFED":"#FFFBE6",color:e.status==="在产"?"#52C41A":"#FAAD14",border:`1px solid ${e.status==="在产"?"#B7EB8F":"#FFE58F"}`})},l(e.status),5)]),o[2]||(o[2]=t("td",{class:"px-6 py-4"},[t("div",{class:"flex items-center gap-3"},[t("button",{class:"text-sm",style:{color:"#1890FF"}},"编辑"),t("button",{class:"text-sm",style:{color:"#1890FF"}},"授权"),t("button",{class:"text-sm",style:{color:"#1890FF"}},"配置"),t("button",{class:"text-sm",style:{color:"#1890FF"}},"固件")])],-1))])),64))])])])]),t("div",it,[o[8]||(o[8]=t("div",{class:"p-6 border-b",style:{borderColor:"#F0F0F0"}},[t("h3",{class:"text-lg font-semibold"},"装配Checklist模板")],-1)),t("div",dt,[(d(!0),a(x,null,p(Object.keys(i.value),e=>(d(),a("button",{key:e,onClick:s=>n.value=e,class:"px-6 py-3 text-sm font-medium transition-colors",style:m({color:n.value===e?"#1890FF":"rgba(0, 0, 0, 0.65)",borderBottom:n.value===e?"2px solid #1890FF":"none",marginBottom:n.value===e?"-1px":"0"})},l(e),13,nt))),128))]),t("div",at,[t("table",ct,[o[5]||(o[5]=t("thead",{style:{backgroundColor:"#FAFAFA"}},[t("tr",null,[t("th",{class:"px-3 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)",width:"50px"}},"序号"),t("th",{class:"px-3 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"项目名称"),t("th",{class:"px-3 py-3 text-center text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)",width:"70px"}},"操作")])],-1)),t("tbody",null,[(d(!0),a(x,null,p(i.value[n.value],e=>{var s,c,f;return d(),a("tr",{key:e.id,class:"border-b",style:{borderColor:"#F0F0F0"}},[t("td",ut,[t("div",xt,[y(b(I),{size:14,style:{color:"#D9D9D9"}}),g(" "+l(e.id),1)])]),t("td",pt,[((s=u.value)==null?void 0:s.model)===n.value&&((c=u.value)==null?void 0:c.id)===e.id&&((f=u.value)==null?void 0:f.field)==="text"?(d(),a("input",{key:0,autofocus:"",class:"w-full px-2 py-1 border rounded text-sm",style:{borderColor:"#1890FF"},value:e.text,onBlur:v=>S(v,n.value,e.id),onKeydown:A},null,40,yt)):(d(),a("span",{key:1,class:"cursor-pointer hover:text-blue-500",onClick:v=>u.value={model:n.value,id:e.id,field:"text"}},l(e.text),9,bt))]),t("td",mt,[t("button",{onClick:v=>w(n.value,e.id),class:"text-gray-400 hover:text-red-500 transition-colors"},[y(b(M),{size:15})],8,vt)])])}),128))])]),t("div",Ft,[t("button",{onClick:o[0]||(o[0]=e=>q(n.value)),class:"px-4 py-2 text-sm flex items-center gap-1 rounded transition-colors",style:{color:"#1890FF",border:"1px dashed #1890FF"}},[y(b(T),{size:14}),o[6]||(o[6]=g(" 添加检查项 ",-1))]),o[7]||(o[7]=t("button",{class:"px-6 py-2 text-sm rounded text-white",style:{backgroundColor:"#1890FF"}}," 确认保存 ",-1))])])]),t("div",ft,[o[11]||(o[11]=t("div",{class:"p-6 border-b",style:{borderColor:"#F0F0F0"}},[t("h3",{class:"text-lg font-semibold"},"板卡版本要求")],-1)),t("div",gt,[t("table",ht,[o[10]||(o[10]=t("thead",{style:{backgroundColor:"#FAFAFA"}},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"板卡类型"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"要求固件版本"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"校验规则"),t("th",{class:"px-6 py-3 text-left text-sm font-medium",style:{color:"rgba(0, 0, 0, 0.85)"}},"操作")])],-1)),t("tbody",null,[(d(),a(x,null,p(D,(e,s)=>t("tr",{key:s,class:"border-b",style:{borderColor:"#F0F0F0"}},[t("td",_t,l(e.boardType),1),t("td",kt,[t("span",Ct,l(e.requiredVersion),1)]),t("td",qt,l(e.validationRule),1),o[9]||(o[9]=t("td",{class:"px-6 py-4"},[t("div",{class:"flex items-center gap-3"},[t("button",{class:"text-sm",style:{color:"#1890FF"}},"编辑"),t("button",{class:"text-sm",style:{color:"#1890FF"}},"测试")])],-1))])),64))])])])])]))}});export{Gt as default};
|