import{d as M,Q as q,J as A,r,A as D,b as J,a1 as O,o as c,c as Q,k as e,B as a,a as n,a2 as I,O as m,P as f,g,F as W,a7 as X,S as Z,U as j,V as Y,W as E,X as G,Y as H,Z as L}from"./index-CHTXMeh8.js";import{_ as $}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as ee}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{_ as ae,g as le,d as te}from"./ModBusDeviceForm.vue_vue_type_script_setup_true_lang-BxbKZDx7.js";import"./index-DVe591HI.js";import"./el-card-Bdk9qx7q.js";import"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";const ne=M({name:"DataModbus",__name:"index",setup(se){const k=q(),{t:S}=A(),y=r(!0),v=r(0),x=r([]),s=D({pageNo:1,pageSize:10,name:void 0,address:void 0}),h=r();r(!1);const i=async()=>{y.value=!0;try{const p=await le(s);x.value=p.list,v.value=p.total}finally{y.value=!1}},u=()=>{s.pageNo=1,i()},U=()=>{h.value.resetFields(),u()},C=r(),P=(p,l)=>{C.value.open(p,l)};return J(async()=>{await i()}),(p,l)=>{const T=X,b=Z,_=j,d=Y,N=E,V=ee,t=G,z=H,F=$,w=O("hasPermi"),R=L;return c(),Q(W,null,[e(V,null,{default:a(()=>[e(N,{class:"-mb-15px",model:n(s),ref_key:"queryFormRef",ref:h,inline:!0,"label-width":"68px"},{default:a(()=>[e(b,{label:"\u8BBE\u5907\u540D\u79F0",prop:"name"},{default:a(()=>[e(T,{modelValue:n(s).name,"onUpdate:modelValue":l[0]||(l[0]=o=>n(s).name=o),placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0",clearable:"",onKeyup:I(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(b,{label:"IP\u5730\u5740",prop:"address"},{default:a(()=>[e(T,{modelValue:n(s).address,"onUpdate:modelValue":l[1]||(l[1]=o=>n(s).address=o),placeholder:"\u8BF7\u8F93\u5165IP\u5730\u5740",clearable:"",onKeyup:I(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(b,null,{default:a(()=>[e(d,{onClick:u},{default:a(()=>[e(_,{icon:"ep:search",class:"mr-5px"}),m(" \u641C\u7D22 ")]),_:1}),e(d,{onClick:U},{default:a(()=>[e(_,{icon:"ep:refresh",class:"mr-5px"}),m(" \u91CD\u7F6E ")]),_:1}),f((c(),g(d,{type:"primary",plain:"",onClick:l[2]||(l[2]=o=>P("create"))},{default:a(()=>[e(_,{icon:"ep:plus",class:"mr-5px"}),m(" \u65B0\u589E ")]),_:1})),[[w,["system:tenant:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(V,null,{default:a(()=>[f((c(),g(z,{data:n(x)},{default:a(()=>[e(t,{label:"\u8BBE\u5907\u540D\u79F0",align:"center",prop:"name"}),e(t,{label:"IP\u5730\u5740",align:"center",prop:"address"}),e(t,{label:"\u7AEF\u53E3",align:"center",prop:"port"}),e(t,{label:"\u4E0D\u6D3B\u52A8\u8D85\u65F6(ms)",align:"center",prop:"connectInactivityTimeout"}),e(t,{label:"\u91CD\u8FDE\u8D85\u65F6(ms)",align:"center",prop:"reconnectInterval"}),e(t,{label:"\u91CD\u8BD5\u6B21\u6570",align:"center",prop:"attemptsBeforeTimeout"}),e(t,{label:"\u52A0\u8F7D\u7C7B\u578B",align:"center",prop:"loadType"}),e(t,{label:" \u91CD\u8BD5\u95F4\u9694(ms)",align:"center",prop:"waitToRetryMilliseconds"}),e(t,{label:"\u8BFB\u8D85\u65F6(ms)",align:"center",prop:"readTimeout"}),e(t,{label:"\u5199\u8D85\u65F6(ms)",align:"center",prop:"writeTimeout"}),e(t,{label:"\u8BFB\u8D85\u65F6(ms)",align:"center",prop:"readTimeout"}),e(t,{label:"\u64CD\u4F5C",align:"center","min-width":"110",fixed:"right"},{default:a(o=>[f((c(),g(d,{link:"",type:"primary",onClick:B=>P("update",o.row.id)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["system:tenant:update"]]]),f((c(),g(d,{link:"",type:"danger",onClick:B=>(async K=>{try{await k.delConfirm(),await te(K),k.success(S("common.delSuccess")),await i()}catch{}})(o.row.id)},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:tenant:delete"]]])]),_:1})]),_:1},8,["data"])),[[R,n(y)]]),e(F,{total:n(v),page:n(s).pageNo,"onUpdate:page":l[3]||(l[3]=o=>n(s).pageNo=o),limit:n(s).pageSize,"onUpdate:limit":l[4]||(l[4]=o=>n(s).pageSize=o),onPagination:i},null,8,["total","page","limit"])]),_:1}),e(ae,{ref_key:"formRef",ref:C,onSuccess:i},null,512)],64)}}});export{ne as default};
|