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