enterprise-saa-s-dashboard-.../dist/assets/ParameterConfiguration-eKxk...

7 lines
14 KiB
JavaScript

import{c as O,d as W,a as o,b as e,u,f as w,t as d,m as a,p as V,v as g,F as i,r as m,z as c,x as N,h as b,j as p,y as $,k as L,s as r,o as t,n as k,A as R}from"./index-C5t0nGiQ.js";import{A as j}from"./arrow-left-De7UcLOo.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 S=O("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"}]]),q={class:"p-6"},J={class:"mb-6"},K={class:"flex items-center gap-4 mb-2"},Q={class:"text-2xl font-semibold"},X={class:"text-sm ml-12",style:{color:"rgba(0, 0, 0, 0.45)"}},Y={class:"bg-white p-6 rounded-lg mb-6",style:{"box-shadow":"0 1px 2px rgba(0, 0, 0, 0.05)"}},Z={class:"grid grid-cols-3 gap-x-12 gap-y-6"},ee={key:1,class:"font-medium"},le={key:1,style:{color:"#4a7c59"}},se={class:"text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.45)"}},oe={key:0,class:"px-2 py-1 rounded text-xs",style:{"background-color":"#FFFBE6",color:"#FAAD14",border:"1px solid #FFE58F"}},te={key:1,style:{color:"rgba(0, 0, 0, 0.65)"}},re={class:"bg-white p-6 rounded-lg mb-6",style:{"box-shadow":"0 1px 2px rgba(0, 0, 0, 0.05)"}},ae={class:"grid grid-cols-2 gap-x-12 gap-y-6"},de={class:"col-span-2"},ne={class:"flex flex-wrap gap-2"},ce=["checked"],ue={class:"col-span-2"},ie={class:"flex flex-wrap gap-2"},be=["checked"],pe={class:"flex items-center gap-2 cursor-pointer"},ve={style:{color:"rgba(0, 0, 0, 0.65)"}},ye={class:"flex items-center gap-6"},xe={class:"flex items-center gap-2 cursor-pointer"},ge={class:"flex items-center gap-2 cursor-pointer"},me={class:"bg-white p-6 rounded-lg mb-6",style:{"box-shadow":"0 1px 2px rgba(0, 0, 0, 0.05)"}},ke={class:"grid grid-cols-2 gap-x-12 gap-y-6"},fe={class:"col-span-2"},De={class:"flex flex-wrap gap-2"},he=["onClick"],we={class:"col-span-2"},Ve={class:"flex flex-wrap gap-2"},Ce=["checked"],Ue={class:"bg-white p-6 rounded-lg mb-6",style:{"box-shadow":"0 1px 2px rgba(0, 0, 0, 0.05)"}},Ae={class:"grid grid-cols-2 gap-x-12 gap-y-6"},Fe={class:"flex items-center gap-4"},ze={class:"flex items-center gap-2 cursor-pointer"},Ge={key:1,class:"text-sm",style:{color:"rgba(0, 0, 0, 0.45)"}},Te={class:"flex items-center gap-4"},_e={class:"flex items-center gap-2 cursor-pointer"},Me={key:1,class:"text-sm",style:{color:"rgba(0, 0, 0, 0.45)"}},Ne={class:"flex items-center gap-2 cursor-pointer"},Se={style:{color:"rgba(0, 0, 0, 0.65)"}},Pe={class:"flex items-center gap-4"},Be={class:"flex items-center gap-2 cursor-pointer"},Ee={key:1,class:"text-sm",style:{color:"rgba(0, 0, 0, 0.45)"}},He={class:"flex items-center justify-end gap-3 p-4 bg-white rounded-lg sticky bottom-0",style:{"box-shadow":"0 -2px 8px rgba(0, 0, 0, 0.05)"}},Ie={class:"px-6 py-2 rounded flex items-center gap-2",style:{border:"1px solid #D9D9D9",color:"rgba(0, 0, 0, 0.85)"}},Oe={class:"px-6 py-2 rounded flex items-center gap-2",style:{border:"1px solid #D9D9D9",color:"rgba(0, 0, 0, 0.85)"}},qe=W({__name:"ParameterConfiguration",setup(We){const f=$(),P=R(),n=L(()=>P.params.configId==="new"),C=r("GD30"),U=r("v1.0.0"),A=r("1500V"),F=r("10A"),B=r([{value:"±2.5V",checked:!0},{value:"±80V",checked:!0},{value:"±600V",checked:!1}]),D=r(!0),z=r(!0),G=r(!0),v=r(!0),T=r("1600"),y=r(!0),_=r("12"),h=r(!0),x=r(!0),M=r("75"),E=r([{value:"0.25s",checked:!0},{value:"0.5s",checked:!0},{value:"1s",checked:!0},{value:"2s",checked:!0},{value:"4s",checked:!0},{value:"8s",checked:!0},{value:"16s",checked:!0},{value:"32s",checked:!0},{value:"64s",checked:!0}]),H=r([{value:"0+0-",checked:!0},{value:"+0-0",checked:!0},{value:"+-",checked:!0}]),I=r([{value:"50Hz",checked:!0},{value:"60Hz",checked:!0},{value:"100Hz",checked:!0},{value:"1000Hz",checked:!0}]);return($e,l)=>(t(),o("div",q,[e("div",J,[e("div",K,[e("button",{onClick:l[0]||(l[0]=s=>u(f).go(-1)),class:"p-2 rounded hover:bg-gray-100 transition-colors",style:{color:"rgba(0, 0, 0, 0.65)"}},[w(u(j),{size:20})]),e("h2",Q,d(n.value?"新建配置文件":"参数配置"),1)]),e("p",X,d(n.value?"选择设备型号和参数,生成配置文件":"配置设备型号的详细参数"),1)]),e("div",Y,[l[20]||(l[20]=e("h3",{class:"text-lg font-semibold mb-6"},"型号信息",-1)),e("div",Z,[e("div",null,[l[18]||(l[18]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.45)"}},"适配型号",-1)),n.value?a((t(),o("select",{key:0,"onUpdate:modelValue":l[1]||(l[1]=s=>C.value=s),class:"w-full px-3 py-2 border rounded",style:{"border-color":"#D9D9D9","background-color":"#fff"}},[...l[17]||(l[17]=[e("option",{value:"GD30"},"GD30 高密度电法仪",-1),e("option",{value:"GT20"},"GT20 瞬变电磁仪",-1),e("option",{value:"GM10"},"GM10 大地电磁仪",-1)])],512)),[[V,C.value]]):(t(),o("div",ee,"GD30 高密度电法仪"))]),e("div",null,[l[19]||(l[19]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.45)"}},"配置文件版本",-1)),n.value?a((t(),o("input",{key:0,type:"text","onUpdate:modelValue":l[2]||(l[2]=s=>U.value=s),class:"w-full px-3 py-2 border rounded",style:{"border-color":"#D9D9D9"},placeholder:"如 v1.0.0"},null,512)),[[g,U.value]]):(t(),o("div",le,"v1.2.0"))]),e("div",null,[e("div",se,d(n.value?"状态":"最后更新时间"),1),n.value?(t(),o("span",oe,"待生成")):(t(),o("div",te,"2024-03-01 10:30"))])])]),e("div",re,[l[31]||(l[31]=e("h3",{class:"text-lg font-semibold mb-6"},"发射参数",-1)),e("div",ae,[e("div",null,[l[22]||(l[22]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}}," 最大发射电压 ",-1)),a(e("select",{class:"w-full px-3 py-2 border rounded",style:{"border-color":"#D9D9D9","background-color":"#fff"},"onUpdate:modelValue":l[3]||(l[3]=s=>A.value=s)},[...l[21]||(l[21]=[e("option",null,"500V",-1),e("option",null,"800V",-1),e("option",null,"1000V",-1),e("option",null,"1200V",-1),e("option",null,"1500V",-1)])],512),[[V,A.value]])]),e("div",null,[l[24]||(l[24]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}}," 最大发射电流 ",-1)),a(e("select",{class:"w-full px-3 py-2 border rounded",style:{"border-color":"#D9D9D9","background-color":"#fff"},"onUpdate:modelValue":l[4]||(l[4]=s=>F.value=s)},[...l[23]||(l[23]=[e("option",null,"2A",-1),e("option",null,"5A",-1),e("option",null,"8A",-1),e("option",null,"10A",-1),e("option",null,"15A",-1)])],512),[[V,F.value]])]),e("div",de,[l[25]||(l[25]=e("label",{class:"block text-sm mb-3",style:{color:"rgba(0, 0, 0, 0.85)"}}," 发射脉宽 ",-1)),e("div",ne,[(t(!0),o(i,null,m(E.value,s=>(t(),o("label",{key:s.value,class:"px-4 py-2 rounded border cursor-pointer transition-colors",style:k({borderColor:s.checked?"#4a7c59":"#D9D9D9",backgroundColor:s.checked?"#eef5f0":"#fff",color:s.checked?"#4a7c59":"rgba(0, 0, 0, 0.65)"})},[e("input",{type:"checkbox",class:"hidden",checked:s.checked,readonly:""},null,8,ce),p(" "+d(s.value),1)],4))),128))])]),e("div",ue,[l[26]||(l[26]=e("label",{class:"block text-sm mb-3",style:{color:"rgba(0, 0, 0, 0.85)"}}," 发射波形 ",-1)),e("div",ie,[(t(!0),o(i,null,m(H.value,s=>(t(),o("label",{key:s.value,class:"px-4 py-2 rounded border cursor-pointer transition-colors",style:k({borderColor:s.checked?"#4a7c59":"#D9D9D9",backgroundColor:s.checked?"#eef5f0":"#fff",color:s.checked?"#4a7c59":"rgba(0, 0, 0, 0.65)"})},[e("input",{type:"checkbox",class:"hidden",checked:s.checked,readonly:""},null,8,be),p(" "+d(s.value),1)],4))),128))])]),e("div",null,[l[27]||(l[27]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}},"支持全波形测量",-1)),e("label",pe,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[5]||(l[5]=s=>D.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,D.value]]),e("span",ve,d(D.value?"是":"否"),1)])]),e("div",null,[l[30]||(l[30]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}},"占空比支持",-1)),e("div",ye,[e("label",xe,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[6]||(l[6]=s=>z.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,z.value]]),l[28]||(l[28]=e("span",{style:{color:"rgba(0, 0, 0, 0.65)"}},"50% 占空比",-1))]),e("label",ge,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[7]||(l[7]=s=>G.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,G.value]]),l[29]||(l[29]=e("span",{style:{color:"rgba(0, 0, 0, 0.65)"}},"100% 占空比",-1))])])])])]),e("div",me,[l[35]||(l[35]=e("h3",{class:"text-lg font-semibold mb-6"},"采集参数",-1)),e("div",ke,[e("div",fe,[l[32]||(l[32]=e("label",{class:"block text-sm mb-3",style:{color:"rgba(0, 0, 0, 0.85)"}},"电压测量范围",-1)),e("div",De,[(t(!0),o(i,null,m(B.value,s=>(t(),o("label",{key:s.value,class:"px-4 py-2 rounded border cursor-pointer transition-colors",style:k({borderColor:s.checked?"#4a7c59":"#D9D9D9",backgroundColor:s.checked?"#eef5f0":"#fff",color:s.checked?"#4a7c59":"rgba(0, 0, 0, 0.65)"}),onClick:Le=>s.checked=!s.checked},d(s.value),13,he))),128))])]),e("div",we,[l[33]||(l[33]=e("label",{class:"block text-sm mb-3",style:{color:"rgba(0, 0, 0, 0.85)"}}," 采样率 ",-1)),e("div",Ve,[(t(!0),o(i,null,m(I.value,s=>(t(),o("label",{key:s.value,class:"px-4 py-2 rounded border cursor-pointer transition-colors",style:k({borderColor:s.checked?"#4a7c59":"#D9D9D9",backgroundColor:s.checked?"#eef5f0":"#fff",color:s.checked?"#4a7c59":"rgba(0, 0, 0, 0.65)"})},[e("input",{type:"checkbox",class:"hidden",checked:s.checked,readonly:""},null,8,Ce),p(" "+d(s.value),1)],4))),128))])]),l[34]||(l[34]=N('<div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);"> 支持通道数 </label><input type="number" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="12"></div><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);"> 迭代次数范围 </label><div class="flex items-center gap-2"><input type="number" class="flex-1 px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="1"><span style="color:rgba(0, 0, 0, 0.45);">-</span><input type="number" class="flex-1 px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="256"></div></div>',2))])]),e("div",Ue,[l[43]||(l[43]=e("h3",{class:"text-lg font-semibold mb-6"},"保护参数",-1)),e("div",Ae,[e("div",null,[l[37]||(l[37]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}},"过压保护",-1)),e("div",Fe,[e("label",ze,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[8]||(l[8]=s=>v.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,v.value]]),l[36]||(l[36]=e("span",{style:{color:"rgba(0, 0, 0, 0.65)"}},"启用",-1))]),v.value?a((t(),o("input",{key:0,type:"number",class:"w-32 px-3 py-1 border rounded text-sm",style:{"border-color":"#D9D9D9"},"onUpdate:modelValue":l[9]||(l[9]=s=>T.value=s)},null,512)),[[g,T.value]]):b("",!0),v.value?(t(),o("span",Ge,"V")):b("",!0)])]),e("div",null,[l[39]||(l[39]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}},"过流保护",-1)),e("div",Te,[e("label",_e,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[10]||(l[10]=s=>y.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,y.value]]),l[38]||(l[38]=e("span",{style:{color:"rgba(0, 0, 0, 0.65)"}},"启用",-1))]),y.value?a((t(),o("input",{key:0,type:"number",class:"w-32 px-3 py-1 border rounded text-sm",style:{"border-color":"#D9D9D9"},"onUpdate:modelValue":l[11]||(l[11]=s=>_.value=s)},null,512)),[[g,_.value]]):b("",!0),y.value?(t(),o("span",Me,"A")):b("",!0)])]),e("div",null,[l[40]||(l[40]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}},"短路保护",-1)),e("label",Ne,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[12]||(l[12]=s=>h.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,h.value]]),e("span",Se,d(h.value?"已启用":"未启用"),1)])]),e("div",null,[l[42]||(l[42]=e("label",{class:"block text-sm mb-2",style:{color:"rgba(0, 0, 0, 0.85)"}},"高温保护",-1)),e("div",Pe,[e("label",Be,[a(e("input",{type:"checkbox","onUpdate:modelValue":l[13]||(l[13]=s=>x.value=s),class:"w-4 h-4",style:{"accent-color":"#4a7c59"}},null,512),[[c,x.value]]),l[41]||(l[41]=e("span",{style:{color:"rgba(0, 0, 0, 0.65)"}},"启用",-1))]),x.value?a((t(),o("input",{key:0,type:"number",class:"w-32 px-3 py-1 border rounded text-sm",style:{"border-color":"#D9D9D9"},"onUpdate:modelValue":l[14]||(l[14]=s=>M.value=s)},null,512)),[[g,M.value]]):b("",!0),x.value?(t(),o("span",Ee,"°C")):b("",!0)])])])]),l[48]||(l[48]=N('<div class="bg-white p-6 rounded-lg mb-6" style="box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);"><h3 class="text-lg font-semibold mb-6">网络参数</h3><div class="grid grid-cols-2 gap-x-12 gap-y-6"><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);">WiFi SSID</label><input type="text" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="GD30_Device"></div><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);">WiFi密码</label><input type="password" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="12345678"></div><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);">默认IP地址</label><input type="text" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="192.168.1.100"></div><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);">子网掩码</label><input type="text" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="255.255.255.0"></div><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);">默认网关</label><input type="text" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="192.168.1.1"></div><div><label class="block text-sm mb-2" style="color:rgba(0, 0, 0, 0.85);">DNS服务器</label><input type="text" class="w-full px-3 py-2 border rounded" style="border-color:#D9D9D9;" value="8.8.8.8"></div></div></div>',1)),e("div",He,[e("button",{class:"px-6 py-2 rounded",style:{border:"1px solid #D9D9D9",color:"rgba(0, 0, 0, 0.85)"},onClick:l[15]||(l[15]=s=>u(f).go(-1))}," 取消 "),n.value?(t(),o(i,{key:0},[e("button",Ie,[w(u(S),{size:16}),l[44]||(l[44]=p(" 预览配置 ",-1))]),e("button",{class:"px-6 py-2 rounded text-white",style:{"background-color":"#52C41A"},onClick:l[16]||(l[16]=s=>u(f).push("/config-files"))}," 确认生成配置文件 ")],64)):(t(),o(i,{key:1},[l[46]||(l[46]=e("button",{class:"px-6 py-2 rounded",style:{border:"1px solid #D9D9D9",color:"rgba(0, 0, 0, 0.85)"}}," 重置默认 ",-1)),e("button",Oe,[w(u(S),{size:16}),l[45]||(l[45]=p(" 预览配置 ",-1))]),l[47]||(l[47]=e("button",{class:"px-6 py-2 rounded text-white",style:{"background-color":"#4a7c59"}}," 下发配置 ",-1))],64))])]))}});export{qe as default};