PLC-read/dist/20490957/static/js/34.js
2023-12-18 09:42:27 +08:00

1 line
3.4 KiB
JavaScript

webpackJsonp([34],{Yzs3:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:"更新MQ配置","close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"80px"},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"username",prop:"username"}},[a("el-input",{attrs:{placeholder:"username",clearable:""},model:{value:t.dataForm.username,callback:function(e){t.$set(t.dataForm,"username",e)},expression:"dataForm.username"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"port",prop:"port"}},[a("el-input",{attrs:{placeholder:"port",clearable:""},model:{value:t.dataForm.port,callback:function(e){t.$set(t.dataForm,"port",e)},expression:"dataForm.port"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"host",prop:"host"}},[a("el-input",{attrs:{placeholder:"host",clearable:""},model:{value:t.dataForm.host,callback:function(e){t.$set(t.dataForm,"host",e)},expression:"dataForm.host"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"isstart",prop:"isstart"}},[a("el-switch",{model:{value:t.dataForm.isstart,callback:function(e){t.$set(t.dataForm,"isstart",e)},expression:"dataForm.isstart"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"passport",prop:"passport"}},[a("el-input",{attrs:{placeholder:"passport",clearable:""},model:{value:t.dataForm.passport,callback:function(e){t.$set(t.dataForm,"passport",e)},expression:"dataForm.passport"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"virtualhost",prop:"virtualhost"}},[a("el-input",{attrs:{placeholder:"",clearable:""},model:{value:t.dataForm.virtualhost,callback:function(e){t.$set(t.dataForm,"virtualhost",e)},expression:"dataForm.virtualhost"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dataFormSubmit()}}},[t._v("确定")])],1)],1)},staticRenderFns:[]},s=a("VU/8")({data:function(){return{visible:!1,dataForm:{id:"",username:"",port:"",host:"",passport:"",isstart:"",virtualhost:""},dataRule:{username:[{required:!0,message:"名称不能为空",trigger:"blur"}],port:[{required:!0,message:"端口不能为空",trigger:"blur"}],host:[{required:!0,message:"IP不能为空",trigger:"blur"}],passport:[{required:!0,message:"passport不能为空",trigger:"blur"}],isstart:[{required:!0,message:"isstart不能为空",trigger:"blur"}],virtualhost:[{required:!0,message:"isstart不能为空",trigger:"blur"}]}}},methods:{init:function(){var t=this;this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.$http({url:t.$http.adornUrl("api/server/main-config/getMqConfig"),method:"post"}).then(function(e){var a=e.data;a&&0===a.code&&(t.dataForm=a.data)})})},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(e){e&&t.$http({url:t.$http.adornUrl("api/server/main-config/updateMqConfig"),method:"post",data:t.$http.adornData(t.dataForm)}).then(function(e){var a=e.data;a&&0===a.code?t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}}):t.$message.error(a.msg)})})}}},r,!1,null,null,null);e.default=s.exports}});