"use strict";(self.webpackChunkwu_vue_zone_ecology_net=self.webpackChunkwu_vue_zone_ecology_net||[]).push([[380],{6380:function(e,l,t){t.r(l),t.d(l,{default:function(){return r}});var a=t(67759),o=t(76364);var r={__name:"ClientPermeatePortPoolEdit",props:{showDialog:{type:Boolean,default:!0},title:{type:String,default:"添加"},rowData:{type:Object,default:null}},emits:["closeDialog"],setup(e,{emit:l}){const t={clientId:[{required:!0,message:"请选择客户端",trigger:"blur"}],visitorPort:[{required:!0,message:"请输入端口",trigger:"blur"}],applicationName:[{required:!0,message:"请输入应用名",trigger:"blur"}]},r=e,u=l,{title:i,rowData:d}=(0,o.BK)(r),n=(0,o.iH)(null),s=()=>{u("closeDialog",!1)},c=(0,o.iH)(null),p=(0,o.qj)({clientId:"",visitorPort:"",describe:""}),{clientId:v,visitorPort:m,describe:w}=(0,o.BK)(p);d.value&&(v.value=d.value.clientId,m.value=d.value.visitorPort,w.value=d.value.describe);return(0,a.bv)((async()=>{VE_API.cloudNetwork.cloudClientFindListGroupByClient().then((e=>{0===e.code&&e.data&&(e.data.map((e=>{e.label=e.clientId,e.value=e.clientId})),n.value=e.data?e.data:[])}))})),(l,r)=>{const u=(0,a.up)("el-option"),b=(0,a.up)("el-select"),f=(0,a.up)("el-form-item"),_=(0,a.up)("el-input"),g=(0,a.up)("el-form"),P=(0,a.up)("el-button"),y=(0,a.up)("el-dialog");return(0,a.wg)(),(0,a.j4)(y,{title:(0,o.SU)(i),"append-to-body":"","destroy-on-close":"","model-value":e.showDialog,onClose:r[5]||(r[5]=e=>s())},{footer:(0,a.w5)((()=>[(0,a._)("span",null,[(0,a.Wm)(P,{onClick:r[3]||(r[3]=e=>s())},{default:(0,a.w5)((()=>r[6]||(r[6]=[(0,a.Uk)("取消")]))),_:1}),(0,a.Wm)(P,{type:"primary",onClick:r[4]||(r[4]=e=>{c.value.validate((async e=>{if(!e)return console.log("error submit!!"),!1;{let e;e="添加"===i.value?await VE_API.cloudNetworkServerPerMeate.lazyNettyClientPermeatePortPoolSave(p):await VE_API.cloudNetworkServerPerMeate.lazyNettyClientPermeatePortPoolUpdate({visitorPort:d.value.visitorPort,...p});const{code:l}=e;0===l&&s()}}))})},{default:(0,a.w5)((()=>r[7]||(r[7]=[(0,a.Uk)("确定")]))),_:1})])])),default:(0,a.w5)((()=>[(0,a.Wm)(g,{model:p,ref_key:"formRef",ref:c,rules:t,"label-width":"80px",inline:!1},{default:(0,a.w5)((()=>[(0,a.Wm)(f,{label:"客户端ID","label-width":"140px",prop:"clientId"},{default:(0,a.w5)((()=>[(0,a.Wm)(b,{modelValue:(0,o.SU)(v),"onUpdate:modelValue":r[0]||(r[0]=e=>(0,o.dq)(v)?v.value=e:null),placeholder:"客户端ID",clearable:""},{default:(0,a.w5)((()=>[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.value,(e=>((0,a.wg)(),(0,a.j4)(u,{key:e.value,label:e.label,value:e.value,serverId:e},null,8,["label","value","serverId"])))),128))])),_:1},8,["modelValue"])])),_:1}),(0,a.Wm)(f,{label:"渗透端口",prop:"visitorPort"},{default:(0,a.w5)((()=>[(0,a.Wm)(_,{modelValue:(0,o.SU)(m),"onUpdate:modelValue":r[1]||(r[1]=e=>(0,o.dq)(m)?m.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,a.Wm)(f,{label:"描述",prop:"describe"},{default:(0,a.w5)((()=>[(0,a.Wm)(_,{modelValue:(0,o.SU)(w),"onUpdate:modelValue":r[2]||(r[2]=e=>(0,o.dq)(w)?w.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["model"])])),_:1},8,["title","model-value"])}}}}}]);