webpackJsonp([65],{mHcS:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={data:function(){return{dataForm:{templateId:"",mailTo:"",status:null},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,dataListSelections:[]}},activated:function(){this.getDataList()},methods:{getDataList:function(){var e=this;this.dataListLoading=!0,this.$http.get(window.SITE_CONFIG.baseURL+"/sys/maillog/list",{params:{page:this.pageIndex,limit:this.pageSize,templateId:this.dataForm.templateId,mailTo:this.dataForm.mailTo,status:this.dataForm.status}}).then(function(t){t&&0===t.code?(e.dataList=t.data,e.totalPage=t.count):(e.dataList=[],e.totalPage=0),e.dataListLoading=!1})},sizeChangeHandle:function(e){this.pageSize=e,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(e){this.pageIndex=e,this.getDataList()},selectionChangeHandle:function(e){this.dataListSelections=e},deleteHandle:function(e){var t=this,a=e?[e]:this.dataListSelections.map(function(e){return e.id});this.$confirm("确定对[id="+a.join(",")+"]进行["+(e?"删除":"批量删除")+"]操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$http.post(window.SITE_CONFIG.baseURL+"/sys/maillog/delete",a).then(function(e){e&&0===e.code&&t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.getDataList()}})})}).catch(function(){})}}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mod-message__mail-log"},[a("el-form",{attrs:{inline:!0,model:e.dataForm},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.getDataList()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"请输入模板ID",clearable:""},model:{value:e.dataForm.templateId,callback:function(t){e.$set(e.dataForm,"templateId",t)},expression:"dataForm.templateId"}})],1),e._v(" "),a("el-form-item",[a("el-input",{attrs:{placeholder:"请输入收件人",clearable:""},model:{value:e.dataForm.mailTo,callback:function(t){e.$set(e.dataForm,"mailTo",t)},expression:"dataForm.mailTo"}})],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{clearable:"",placeholder:"请选择状态"},model:{value:e.dataForm.status,callback:function(t){e.$set(e.dataForm,"status",t)},expression:"dataForm.status"}},[a("el-option",{attrs:{label:"发送成功",value:0}}),e._v(" "),a("el-option",{attrs:{label:"发送失败",value:1}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{on:{click:function(t){e.getDataList()}}},[e._v("查询")])],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger",disabled:e.dataListSelections.length<=0},on:{click:function(t){e.deleteHandle()}}},[e._v("批量删除")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:e.dataList,border:""},on:{"selection-change":e.selectionChangeHandle}},[a("el-table-column",{attrs:{type:"selection","header-align":"center",align:"center",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{prop:"id","header-align":"center",align:"center",width:"80",label:"ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"templateId","header-align":"center",align:"center",label:"模板ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mailFrom","header-align":"center",align:"center",label:"发送者"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mailTo","header-align":"center",align:"center",label:"收件人"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mailCc","header-align":"center",align:"center",label:"抄送者"}}),e._v(" "),a("el-table-column",{attrs:{prop:"subject","header-align":"center",align:"center",label:"邮件主题"}}),e._v(" "),a("el-table-column",{attrs:{prop:"status","header-align":"center",align:"center",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.status?a("el-tag",{attrs:{size:"small"}},[e._v("成功")]):a("el-tag",{attrs:{size:"small",type:"danger"}},[e._v("失败")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"sendTime","header-align":"center",align:"center",width:"180",label:"发送时间"}}),e._v(" "),a("el-table-column",{attrs:{fixed:"right","header-align":"center",align:"center",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.deleteHandle(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("el-pagination",{attrs:{"current-page":e.pageIndex,"page-sizes":[10,20,50,100],"page-size":e.pageSize,total:e.totalPage,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.sizeChangeHandle,"current-change":e.currentChangeHandle}})],1)},staticRenderFns:[]},i=a("C7Lr")(l,n,!1,null,null,null);t.default=i.exports}});