webpackJsonp([63],{LC9i:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{smtp:"",port:"",username:"",password:""},dataRule:{smtp:[{required:!0,message:"必填项不能为空",trigger:"blur"}],port:[{required:!0,message:"必填项不能为空",trigger:"blur"}],username:[{required:!0,message:"必填项不能为空",trigger:"blur"}],password:[{required:!0,message:"必填项不能为空",trigger:"blur"}]}}},methods:{init:function(){var t=this;this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.getConfig()})},getConfig:function(){var t=this;this.$http.get(window.SITE_CONFIG.baseURL+"/sys/mailtemplate/config").then(function(e){e&&0===e.code&&(t.dataForm.smtp=e.config.smtp,t.dataForm.port=e.config.port,t.dataForm.username=e.config.username,t.dataForm.password=e.config.password)})},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(e){e&&t.$http.post(window.SITE_CONFIG.baseURL+"/sys/mailtemplate/saveConfig",t.dataForm).then(function(e){e&&0===e.code&&t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.visible=!1}})})})}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:"邮件配置","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":"120px"},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:"SMTP",prop:"smtp"}},[a("el-input",{attrs:{placeholder:"SMTP"},model:{value:t.dataForm.smtp,callback:function(e){t.$set(t.dataForm,"smtp",e)},expression:"dataForm.smtp"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"端口号",prop:"port"}},[a("el-input",{attrs:{placeholder:"端口号"},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:"邮箱账号",prop:"username"}},[a("el-input",{attrs:{placeholder:"邮箱账号"},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:"邮箱密码",prop:"password"}},[a("el-input",{attrs:{placeholder:"邮箱密码"},model:{value:t.dataForm.password,callback:function(e){t.$set(t.dataForm,"password",e)},expression:"dataForm.password"}})],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("C7Lr")(r,o,!1,null,null,null);e.default=s.exports}});