(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3e65"],{"5f75":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),a("div",[a("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请输入消息名",size:"small"},model:{value:e.searchParams.search_name,callback:function(t){e.$set(e.searchParams,"search_name",t)},expression:"searchParams.search_name"}}),e._v(" "),a("el-select",{attrs:{placeholder:"请选择",size:"small"},model:{value:e.searchParams.type,callback:function(t){e.$set(e.searchParams,"type",t)},expression:"searchParams.type"}},[a("el-option",{attrs:{label:"系统消息",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"订单消息",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"下单消息",value:"3"}})],1),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){e.searchParams.page_index=1,e.getList()}}},[e._v("\n 查询\n ")])],1),e._v(" "),a("el-table",{staticClass:"tableBorder",attrs:{data:e.table,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{type:"index",index:e.indexMethod,width:"70",label:"编号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"title",label:"标题",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"data",label:"消息内容",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[2!==r.type?a("div",[e._v("\n "+e._s(r.data)+"\n ")]):a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.showOrderGoods(r)}}},[e._v("查看订单商品")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"发送时间",align:"center",width:"250"}}),e._v(" "),a("el-table-column",{attrs:{prop:"type",label:"消息类型",align:"center",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:1===r.type?"#409EFF":2===r.type?"#3cc59f":"#8461d8"}},[e._v(e._s(1===r.type?"系统消息":2===r.type?"订单消息":"下单消息"))])]}}])})],1),e._v(" "),a("div",{staticClass:"batch-container"},[a("pagination",{staticStyle:{"margin-top":"0"},attrs:{total:e.tableTotal,limit:e.searchParams.page_size,page:e.searchParams.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}})],1),e._v(" "),a("el-drawer",{attrs:{title:"订单商品",visible:e.visible.order,direction:"rtl"},on:{"update:visible":function(t){return e.$set(e.visible,"order",t)}}},[a("el-form",{attrs:{"label-width":"20px"}},e._l(e.orderGoods,(function(t,r){return a("el-form-item",{key:r},[a("div",{staticClass:"flex"},[a("el-image",{staticStyle:{width:"60px",height:"60px"},attrs:{src:t.img,fit:"cover"}}),e._v(" "),a("p",{staticStyle:{"margin-left":"20px","margin-right":"20px"}},[e._v(e._s(t.name))]),e._v(" "),a("p",[e._v(e._s(t.price))])],1)])})),1)],1)],1)},s=[],l=a("c7eb"),i=(a("96cf"),a("1da1")),n=a("b775");function o(e){return Object(n["a"])({url:"/message/getmessagelist",method:"Get",params:e})}var c={data:function(){return{searchParams:{page_index:1,page_size:10,search_name:"",type:"1"},table:[],tableTotal:0,orderGoods:[],visible:{order:!1},loadingFull:!1}},created:function(){this.getList()},methods:{getList:function(){var e=Object(i["a"])(Object(l["a"])().mark((function e(){var t,a,r,s,i,n;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,e.prev=1,e.next=4,o(this.searchParams);case 4:t=e.sent,a=t.code,r=t.message,200===a?(s=t.data,i=s.list,n=s.total,this.tableTotal=n,this.table=i):this.$message.error(r),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](1),this.$message.error("获取消息推送列表失败!!");case 12:this.loadingFull=!1;case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}(),changePagination:function(e){var t=e.page,a=e.limit;this.searchParams.page_size=a,this.searchParams.page_index=t,this.getList()},showOrderGoods:function(e){var t=e.data;try{this.orderGoods=JSON.parse(t)}catch(a){this.orderGoods=[]}this.visible.order=!0},indexMethod:function(e){var t=this.searchParams,a=t.page_index,r=t.page_size;return e+=(a-1)*r+1,e}}},d=c,p=a("2877"),u=Object(p["a"])(d,r,s,!1,null,null,null);t["default"]=u.exports}}]);