import{g as y,b as C}from"./index.382339dd.js";import{x as q,a3 as U,y as w,r,a4 as h,o as _,a as c,t as b,b as e,d as a,e as l,Q as j,C as v,g as k}from"./vendor.475775fc.js";import"./index.e07f9e9c.js";const B={class:"flex-sub padding-lr",style:{"overflow-y":"auto"}},G=b("div",{class:"solid-bottom padding-tb margin-bottom text-bold"},"\u57FA\u672C\u914D\u7F6E",-1),E={__name:"gpsConfiguration",setup(N){const{proxy:m}=k(),p=q(!1),V=U({form:{MMSI:"",fLongitude:0,fLatitude:0,fSpeed:3,status:8},rules:{MMSI:[{required:!0,message:"\u8BF7\u586B\u5199\u8239\u8236mmsi",trigger:"blur"}],fLongitude:[{required:!0,message:"\u8BF7\u586B\u5199\u7ECF\u5EA6",trigger:"blur"}],fLatitude:[{required:!0,message:"\u8BF7\u586B\u5199\u7EAC\u5EA6",trigger:"blur"}],fSpeed:[{required:!0,message:"\u8BF7\u586B\u5199\u822A\u884C\u901F\u5EA6",trigger:"blur"}],status:[{required:!0,message:"\u8BF7\u9009\u62E9\u822A\u884C\u72B6\u6001",trigger:"blur"}]}}),{form:t,rules:S}=w(V),M=()=>{m.$refs.gpsRef.validate(d=>{d&&(p.value=!0,C(t.value).then(o=>{m.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),p.value=!1,f()}))})},f=function(){y().then(d=>{t.value=d.data[1]})};return f(),(d,o)=>{const n=r("el-input"),u=r("el-form-item"),i=r("el-option"),x=r("el-select"),g=r("el-button"),L=r("el-form"),I=h("loading");return _(),c("div",null,[b("div",B,[G,e(L,{ref:"gpsRef",model:l(t),rules:l(S),"label-width":"120px"},{default:a(()=>[j((_(),c("div",null,[e(u,{label:"\u8239\u8236MMSI",prop:"MMSI"},{default:a(()=>[e(n,{modelValue:l(t).MMSI,"onUpdate:modelValue":o[0]||(o[0]=s=>l(t).MMSI=s),placeholder:"\u8BF7\u8F93\u5165\u8239\u8236MMSI"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7ECF\u5EA6",prop:"fLongitude"},{default:a(()=>[e(n,{modelValue:l(t).fLongitude,"onUpdate:modelValue":o[1]||(o[1]=s=>l(t).fLongitude=s),placeholder:"\u8BF7\u8F93\u5165\u7ECF\u5EA6"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7EAC\u5EA6",prop:"fLatitude"},{default:a(()=>[e(n,{modelValue:l(t).fLatitude,"onUpdate:modelValue":o[2]||(o[2]=s=>l(t).fLatitude=s),placeholder:"\u8BF7\u8F93\u5165\u7EAC\u5EA6"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u822A\u901F",prop:"fSpeed"},{default:a(()=>[e(n,{modelValue:l(t).fSpeed,"onUpdate:modelValue":o[3]||(o[3]=s=>l(t).fSpeed=s),placeholder:"\u8BF7\u8F93\u5165\u822A\u901F"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u822A\u884C\u72B6\u6001",prop:"status"},{default:a(()=>[e(x,{modelValue:l(t).status,"onUpdate:modelValue":o[4]||(o[4]=s=>l(t).status=s),placeholder:"\u9009\u62E9\u72B6\u6001"},{default:a(()=>[e(i,{label:"\u5728\u822A",value:8}),e(i,{label:"\u7CFB\u6CCA",value:5}),e(i,{label:"\u951A\u6CCA",value:1}),e(i,{label:"\u5176\u4ED6",value:99})]),_:1},8,["modelValue"])]),_:1})])),[[I,l(p)]]),e(u,null,{default:a(()=>[e(g,{type:"primary",onClick:M},{default:a(()=>[v("\u4FDD\u5B58\u914D\u7F6E")]),_:1}),e(g,{type:"danger"},{default:a(()=>[v("\u5220\u9664\u914D\u7F6E")]),_:1})]),_:1})]),_:1},8,["model","rules"])])])}}};export{E as default};
