webpackJsonp([62],{bkMT:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=e("E4LH"),r={data:function(){return{visible:!1,dataForm:{templateId:"",mailTo:"",mailCc:"",params:""},dataRule:{templateId:[{required:!0,message:"必填项不能为空",trigger:"blur"}],mailTo:[{required:!0,message:"必填项不能为空",trigger:"blur"},{validator:function(t,a,e){Object(l.a)(a)?e():e(new Error("邮箱格式错误"))},trigger:"blur"}]}}},methods:{init:function(){var t=this;this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields()})},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(a){a&&t.$http.post(window.SITE_CONFIG.baseURL+"/sys/mailtemplate/send",{templateId:t.dataForm.templateId,mailTo:t.dataForm.mailTo,mailCc:t.dataForm.mailCc,params:t.dataForm.params},{headers:{"content-type":"application/x-www-form-urlencoded"}}).then(function(a){a&&0===a.code&&t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})})})}}},o={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-dialog",{attrs:{title:"发送邮件","close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(a){t.visible=a}}},[e("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"120px"},nativeOn:{keyup:function(a){if(!("button"in a)&&t._k(a.keyCode,"enter",13,a.key,"Enter"))return null;t.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:"模板ID",prop:"templateId"}},[e("el-input",{attrs:{placeholder:"模板ID"},model:{value:t.dataForm.templateId,callback:function(a){t.$set(t.dataForm,"templateId",a)},expression:"dataForm.templateId"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"收件人",prop:"mailTo"}},[e("el-input",{attrs:{placeholder:"收件人邮箱"},model:{value:t.dataForm.mailTo,callback:function(a){t.$set(t.dataForm,"mailTo",a)},expression:"dataForm.mailTo"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"抄送",prop:"mailCc"}},[e("el-input",{attrs:{placeholder:"抄送，可为空"},model:{value:t.dataForm.mailCc,callback:function(a){t.$set(t.dataForm,"mailCc",a)},expression:"dataForm.mailCc"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"模板参数",prop:"params"}},[e("el-input",{attrs:{placeholder:'如：{"code": "123456"}'},model:{value:t.dataForm.params,callback:function(a){t.$set(t.dataForm,"params",a)},expression:"dataForm.params"}})],1)],1),t._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(a){t.visible=!1}}},[t._v("取消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){t.dataFormSubmit()}}},[t._v("确定")])],1)],1)},staticRenderFns:[]},i=e("C7Lr")(r,o,!1,null,null,null);a.default=i.exports}});