webpackJsonp([22],{dyKt:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t("gyMJ"),o={data:function(){return{visible:!1,dataForm:{id:0,key:"",value:"",remark:""},dataRule:{key:[{required:!0,message:"参数名不能为空",trigger:"blur"}],value:[{required:!0,message:"参数值不能为空",trigger:"blur"}]}}},methods:{init:function(e){var a=this;this.dataForm.id=e||0,this.visible=!0,this.$nextTick(function(){a.$refs.dataForm.resetFields(),a.dataForm.id&&r.a.config.info(a.dataForm.id).then(function(e){var t=e.data;t&&0===t.code&&(a.dataForm.key=t.config.key,a.dataForm.value=t.config.value,a.dataForm.remark=t.config.remark)})})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(a){if(a){var t={id:e.dataForm.id||void 0,key:e.dataForm.key,value:e.dataForm.value,remark:e.dataForm.remark};(e.dataForm.id?r.a.config.update(t):r.a.config.add(t)).then(function(a){var t=a.data;t&&0===t.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}}):e.$message.error(t.msg)})}})}}},i={render:function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("el-dialog",{attrs:{title:e.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(a){e.visible=a}}},[t("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"80px"},nativeOn:{keyup:function(a){if(!("button"in a)&&e._k(a.keyCode,"enter",13,a.key))return null;e.dataFormSubmit()}}},[t("el-form-item",{attrs:{label:"参数名",prop:"key"}},[t("el-input",{attrs:{placeholder:"参数名"},model:{value:e.dataForm.key,callback:function(a){e.$set(e.dataForm,"key",a)},expression:"dataForm.key"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"参数值",prop:"value"}},[t("el-input",{attrs:{placeholder:"参数值"},model:{value:e.dataForm.value,callback:function(a){e.$set(e.dataForm,"value",a)},expression:"dataForm.value"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"备注",prop:"remark"}},[t("el-input",{attrs:{placeholder:"备注"},model:{value:e.dataForm.remark,callback:function(a){e.$set(e.dataForm,"remark",a)},expression:"dataForm.remark"}})],1)],1),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(a){e.visible=!1}}},[e._v("取消")]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:function(a){e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},staticRenderFns:[]},l=t("46Yf")(o,i,!1,null,null,null);a.default=l.exports}});