微信公众号管理后台

31.b14ecfc84da220260ade.js 7.2KB

1
  1. webpackJsonp([31],{6140:function(t,e){},vdNx:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{checkList:[],send_time:"",isNow:"true",loadingNews:!1,enable:"全部",keyword:"",infoObj:{},list:[],tagList:[],page:1,page_size:20,total:1}},created:function(){this.getTag(1)},methods:{getTag:function(){var t=this;this.loadingNews=!0,this.$axios.get(this.URL.BASEURL+this.URL.tagList).then(function(e){t.loadingNews=!1,(e=e.data)&&0==e.errno?(t.tagList=e.rst.data.tags,t.init(1)):t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loadingNews=!1})},handleCurrentChange:function(t){this.init(t)},toUrl:function(t){var e=t.id?"?rule_id="+t.id:"";this.$router.push("/checkTemplate"+e)},init:function(t){var e=this;this.page=t,this.loadingNews=!0,this.$axios.post(this.URL.BASEURL+this.URL.ruleList,{keyword:this.keyword,enable:"全部"==this.enable?"":"进行中"==this.enable?2:1,page:this.page,page_size:this.page_size,user_app_id:JSON.parse(this.$cookieStore.getCookie("wxName")).app_id}).then(function(t){if(e.loadingNews=!1,(t=t.data)&&0==t.errno){var n=t.rst.data;e.list=n,e.total=t.rst.pageInfo.total,e.page_size=t.rst.pageInfo.size}else e.$message({message:t.err,type:"warning"})}).catch(function(t){console.log(t),e.loadingNews=!1})},getInfo:function(t,e){var n=this,a=this.$refs.table;if(t.info)return a.toggleRowExpansion(t,!1),void delete t.info;this.list.forEach(function(t,n){e!=n&&t.info&&delete t.info}),this.loadingNews=!0,this.$axios.post(this.URL.BASEURL+this.URL.condition,{rule_id:t.id,user_app_id:JSON.parse(this.$cookieStore.getCookie("wxName")).app_id}).then(function(e){if(n.loadingNews=!1,(e=e.data)&&0==e.errno){var i=e.rst.data;n.infoObj=i,n.$set(t,"info",i),setTimeout(function(){a.toggleRowExpansion(t)},500)}else n.$message({message:e.err,type:"warning"})}).catch(function(t){console.log(t),n.loadingNews=!1})},toDel:function(t){var e=this;this.loadingNews=!0,this.$axios.get(this.URL.BASEURL+this.URL.delRule,{params:{rule_id:Number(t.id),user_app_id:JSON.parse(this.$cookieStore.getCookie("wxName")).app_id}}).then(function(t){e.loadingNews=!1,(t=t.data)&&0==t.errno?(e.$message({message:"删除成功",type:"success"}),e.init(1)):e.$message({message:t.err,type:"warning"})}).catch(function(t){console.log(t),e.loadingNews=!1})}}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"templateM"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingNews,expression:"loadingNews"}],staticClass:"mainCon",attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[a("wx-item",{staticStyle:{"margin-top":"28px"}}),t._v(" "),a("div",{staticClass:"searchCon"},[a("el-button",{staticStyle:{float:"left"},attrs:{type:"primary"},on:{click:function(e){return t.$router.push("/addTemplate")}}},[t._v("新建模板消息")]),t._v(" "),a("el-radio-group",{on:{change:function(e){return t.init(1)}},model:{value:t.enable,callback:function(e){t.enable=e},expression:"enable"}},[a("el-radio-button",{attrs:{label:"全部"}}),t._v(" "),a("el-radio-button",{attrs:{label:"进行中"}}),t._v(" "),a("el-radio-button",{attrs:{label:"等待中"}})],1),t._v(" "),a("el-input",{staticClass:"input",staticStyle:{width:"300px"},attrs:{placeholder:"请输入模板消息名称","prefix-icon":"el-icon-search"},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}}),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.init(1)}}},[t._v("搜索")])],1),t._v(" "),a("div",{staticClass:"mainBorder taskList"},[a("div",{staticClass:"taskItem"},[a("el-table",{ref:"table",staticStyle:{width:"100%"},attrs:{data:t.list,border:""}},[a("template",{slot:"empty"},[a("img",{staticClass:"pic",attrs:{src:n("z3Om"),alt:""}}),t._v(" "),a("span",[t._v("暂无数据")])]),t._v(" "),a("el-table-column",{attrs:{type:"expand",width:"1"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.info?a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"群发状态:"}},[a("span",[t._v(t._s(0==e.row.info.enable?"未查询到信息":1==e.row.info.enable?"未发送":2==e.row.info.enable?"正在发送":"已发送")+"("+t._s(e.row.info.success)+"/"+t._s(e.row.info.total)+")")])]),t._v(" "),a("el-form-item",{attrs:{label:"发送时间:"}},[a("span",[t._v(t._s(e.row.info.begin))])]),t._v(" "),a("el-form-item",{attrs:{label:"完成时间:"}},[a("span",[t._v(t._s(e.row.info.end))])]),t._v(" "),a("el-form-item",{attrs:{label:"目标人数:"}},[a("span",[t._v(t._s(e.row.info.total))])]),t._v(" "),a("el-form-item",{attrs:{label:"成功人数:"}},[a("span",[t._v(t._s(e.row.info.success))])]),t._v(" "),a("el-form-item",{attrs:{label:"失败人数:"}},[a("span",[t._v(t._s(e.row.info.fail))])])],1):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"规则名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"tag_id",label:"发送标签"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.tagList&&t.tagList.length>0?t.tagList.filter(function(t){return t.id==e.row.tag_id}).length>0?t.tagList.filter(function(t){return t.id==e.row.tag_id})[0].name:"全部":""))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"name",width:"100",label:"发送性别"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(1==e.row.sex?"男":2==e.row.sex?"女":"全部"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"name",width:"100",label:"跳转类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(1==e.row.redirect_type?"链接":"小程序"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"用户所在地"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.country?a("span",[t._v(t._s(e.row.country?e.row.country:"")+t._s(e.row.province?"/"+e.row.province:"")+t._s(e.row.city?"/"+e.row.city:""))]):a("span",[t._v("全部")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"发送时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.send_time?e.row.send_time:"-"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{fixed:"right",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0==e.row.enable?"禁用":1==e.row.enable?"未处理":"已处理"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{fixed:"right",align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(n){return t.toUrl(e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(n){return t.getInfo(e.row,e.row.$index)}}},[t._v("发送情况")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(n){return t.toDel(e.row)}}},[t._v("删除")])]}}])})],2),t._v(" "),t.list.length>0?a("div",{staticClass:"bottom"},[a("div"),t._v(" "),a("el-pagination",{attrs:{background:"","current-page":t.page,"page-size":t.page_size,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),t._v(" "),a("div")],1):t._e()],1)])],1)])},staticRenderFns:[]};var s=n("VU/8")(a,i,!1,function(t){n("6140")},"data-v-b2d810d2",null);e.default=s.exports}});