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