netty-server-ui.v1.js.563.53b70f73.js Maven / Gradle / Ivy
The newest version!
"use strict";(self.webpackChunkwu_smart_agent_network=self.webpackChunkwu_smart_agent_network||[]).push([[563],{60563:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var n=r(83986),u=r(35145),l=r(93540),o=r(66252),a=r(2262);const i={__name:"ServerVisitorEdit",props:{showDialog:{type:Boolean,default:!0},title:{type:String,default:"添加"},rowData:{type:Object,default:null}},emits:["closeDialog"],setup:function(e,t){var r=t.emit,i={projectId:[{required:!0,message:"请输入选择项目",trigger:"blur"}],schemaName:[{required:!0,message:"请输入选择数据库",trigger:"blur"}],applicationName:[{required:!0,message:"请输入应用名",trigger:"blur"}]},s=e,c=r,d=(0,a.BK)(s),f=d.title,p=d.rowData,m=function(){c("closeDialog",!1)},v=(0,a.iH)(null),w=(0,a.qj)({visitorPort:"",describe:""}),b=(0,a.BK)(w),g=b.visitorPort,k=b.describe;p.value&&(g.value=p.value.visitorPort,k.value=p.value.describe);return(0,o.bv)((0,l.Z)((0,n.Z)().mark((function e(){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))),function(t,r){var s=(0,o.up)("el-input"),c=(0,o.up)("el-form-item"),d=(0,o.up)("el-form"),b=(0,o.up)("el-button"),_=(0,o.up)("el-dialog");return(0,o.wg)(),(0,o.j4)(_,{title:(0,a.SU)(f),"append-to-body":"","destroy-on-close":"","model-value":e.showDialog,onClose:r[4]||(r[4]=function(e){return m()})},{footer:(0,o.w5)((function(){return[(0,o._)("span",null,[(0,o.Wm)(b,{onClick:r[2]||(r[2]=function(e){return m()})},{default:(0,o.w5)((function(){return[(0,o.Uk)("取消")]})),_:1}),(0,o.Wm)(b,{type:"primary",onClick:r[3]||(r[3]=function(e){v.value.validate(function(){var e=(0,l.Z)((0,n.Z)().mark((function e(t){var r;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=14;break}if("添加"!==f.value){e.next=7;break}return e.next=4,VE_API.cloudNetwork.visitorSave(w);case 4:r=e.sent,e.next=10;break;case 7:return e.next=9,VE_API.cloudNetwork.visitorUpdate((0,u.Z)({visitorPort:p.value.visitorPort},w));case 9:r=e.sent;case 10:0===r.code&&m(),e.next=16;break;case 14:return console.log("error submit!!"),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())})},{default:(0,o.w5)((function(){return[(0,o.Uk)("确定")]})),_:1})])]})),default:(0,o.w5)((function(){return[(0,o.Wm)(d,{model:w,ref_key:"formRef",ref:v,rules:i,"label-width":"80px",inline:!1},{default:(0,o.w5)((function(){return[(0,o.Wm)(c,{label:"访客端口",prop:"visitorPort"},{default:(0,o.w5)((function(){return[(0,o.Wm)(s,{modelValue:(0,a.SU)(g),"onUpdate:modelValue":r[0]||(r[0]=function(e){return(0,a.dq)(g)?g.value=e:null}),placeholder:"",clearable:""},null,8,["modelValue"])]})),_:1}),(0,o.Wm)(c,{label:"描述",prop:"describe"},{default:(0,o.w5)((function(){return[(0,o.Wm)(s,{modelValue:(0,a.SU)(k),"onUpdate:modelValue":r[1]||(r[1]=function(e){return(0,a.dq)(k)?k.value=e:null}),placeholder:"",clearable:""},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model"])]})),_:1},8,["title","model-value"])}}}}}]);