(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4f4713e0"],{"0b62":function(e,t,a){},5839:function(e,t,a){},"7cbb":function(e,t,a){"use strict";a("5839")},bacc:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"system"},[a("page-header",[e._v(" 系统设置 ")]),a("el-tabs",{model:{value:e.activeTabName,callback:function(t){e.activeTabName=t},expression:"activeTabName"}},[a("el-tab-pane",{attrs:{label:"邮件设置",name:"email"}},[a("EmailSetting")],1)],1)],1)},s=[],r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"system"},[a("el-form",{ref:"form",staticClass:"email-form",attrs:{model:e.form,rules:e.formRules,"label-width":"150px","status-icon":!0}},[a("el-form-item",{attrs:{label:"电子邮箱服务"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.emailServerKey,callback:function(t){e.emailServerKey=t},expression:"emailServerKey"}},[a("el-option",{key:"0",attrs:{label:"系统默认邮箱服务",value:"default"}})],1)],1),a("el-form-item",{attrs:{label:"SMTP服务地址",prop:"host"}},[a("el-input",{model:{value:e.form.host,callback:function(t){e.$set(e.form,"host",t)},expression:"form.host"}})],1),a("el-form-item",{attrs:{label:"SMTP服务端口"}},[a("el-input-number",{model:{value:e.form.port,callback:function(t){e.$set(e.form,"port",t)},expression:"form.port"}})],1),a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),a("el-form-item",{attrs:{label:"密码"}},[a("el-input",{attrs:{type:"password"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),a("el-form-item",{attrs:{label:"测试收件箱",error:e.testmailMSg}},[a("el-input",{model:{value:e.testmail,callback:function(t){e.testmail=t},expression:"testmail"}},[a("el-button",{attrs:{slot:"append"},on:{click:e.doSendTest},slot:"append"},[e._v("发送")])],1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.doSaveEmailConfig}},[e._v("保存配置")])],1)],1)],1)},l=[],n=a("d232"),i="/msg";function m(){return n["post"]("".concat(i,"/mail/query"),{name:"master"})}function c(e){return e.id?n["put"]("".concat(i,"/mail"),e):n["post"]("".concat(i,"/mail"),e)}function u(e){return n["post"]("".concat(i,"/send/mail"),{to:[e],title:"这是一封测试邮件",content:"恭喜您已成功配置邮件服务，这是一封测试邮件，可以进行删除!"})}var f={components:{},data:function(){return{emailServerKey:"default",testmail:null,testmailMSg:"",form:{host:"",port:25,username:"",password:""},formRules:{host:{required:!0,message:"邮件服务器地址不能为空",trigger:"blur"},username:{required:!0,message:"用户名不能为空",trigger:"blur"},password:{required:!0,message:"密码不能为空",trigger:"blur"}},loading:!1}},computed:{},watch:{},methods:{doLoadMailServerList:function(){var e=this;m().then((function(t){var a=t.code,o=t.data;t.message;if(0==a){var s=o.records[0];e.form=s}}))},doSaveEmailConfig:function(){var e=this;this.$refs["form"].validate((function(t,a){t&&(e.loading=!0,c(e.form).then((function(t){var a=t.code;t.data,t.message;0==a&&(e.loading=!1,e.$message.success("邮件配置保存成功!"))})))}))},doSendTest:function(){this.testmail?(this.testmailMSg=null,u(this.testmail).then((function(e){}))):this.testmailMSg="请输入测试邮箱"}},created:function(){this.doLoadMailServerList()},mounted:function(){}},d=f,p=(a("7cbb"),a("2877")),b=Object(p["a"])(d,r,l,!1,null,"2209dcdd",null),v=b.exports,h={components:{EmailSetting:v},data:function(){return{activeTabName:"email"}},computed:{},watch:{},methods:{},created:function(){},mounted:function(){}},g=h,S=(a("ff57"),Object(p["a"])(g,o,s,!1,null,"6fb11bb3",null));t["default"]=S.exports},ff57:function(e,t,a){"use strict";a("0b62")}}]);
//# sourceMappingURL=chunk-4f4713e0.e0fe39ce.js.map