1 |
- webpackJsonp([33],{KEA0:function(t,e){},Ld2u:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={data:function(){return{allData:[],title:"",positionList:[{name:"第一篇",value:1},{name:"第二篇",value:2},{name:"第三篇",value:3},{name:"第四篇",value:4},{name:"第五篇",value:5},{name:"第六篇",value:6},{name:"第七篇",value:7},{name:"第八篇",value:8}],position:"",groupList:[],group:"",typeList:[],type:"",levelList:[],level:"",attrList:[],attr:"",wxList:this.$store.state.wxList,app_id:"",data:[],timeRange:[this.getDay(-1,!1),this.getDay(-1,!1)],total:1,wxName:"",loadingQrcode:!1,page_size:20,page:1,pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()}}}},created:function(){this.getGroup(),this.getList(1),this.getList(2),this.getList(3),this.$cookieStore.getCookie("wxName")&&(this.wxName=JSON.parse(this.$cookieStore.getCookie("wxName")).nickname,this.app_id=JSON.parse(this.$cookieStore.getCookie("wxName")).app_id),this.init(1)},methods:{getGroup:function(){var t=this;this.loadAttr=!0,this.$axios.post(this.URL.BASEURL+this.URL.groupList,{page_size:999,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id}).then(function(e){t.loadAttr=!1,(e=e.data)&&0==e.errno&&(t.groupList=e.rst.data)}).catch(function(e){console.log(e),t.loadAttr=!1})},getList:function(t){var e=this;this.loadingFan=!0,this.$axios.get(this.URL.BASEURL+this.URL.attrList,{params:{type:t,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id}}).then(function(a){if(e.loadingFan=!1,(a=a.data)&&0==a.errno)switch(t){case 1:e.typeList=a.rst;break;case 2:e.levelList=a.rst;break;case 3:e.attrList=a.rst}}).catch(function(t){console.log(t),e.loadingFan=!1})},toBack:function(){this.$router.push("/qrcode")},init:function(t){var e=this;this.page=t,this.loadingQrcode=!0;var a={app_id:this.app_id,start_time:this.timeRange&&this.timeRange.length>0?this.timeRange[0]:"",end_time:this.timeRange&&this.timeRange.length>0?this.timeRange[1]:"",page:this.page,page_size:this.page_size,content_type:this.type,account_level:this.level,account_attr:this.attr,group_id:this.group,title:this.title,position:this.position,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id};this.$axios.post(this.URL.BASEURL+this.URL.newsData,a).then(function(t){e.loadingQrcode=!1,(t=t.data)&&0==t.errno?(t.rst.data&&t.rst.data.length>0&&t.rst.data.forEach(function(t){e.wxList.forEach(function(e){t.app_id==e.app_id&&(t.name=e.nickname)})}),e.data=t.rst.data?t.rst.data:[],e.total=t.rst.pageInfo?t.rst.pageInfo.total:1,e.page_size=t.rst.pageInfo?Number(t.rst.pageInfo.size):e.page_size):e.$message({message:t.err,type:"warning"})}).catch(function(t){console.log(t),e.loadingQrcode=!1})},handleCurrentChange:function(t){this.init(t)},getAll:function(){var t=this;this.loadingQrcode=!0;var e={app_id:this.app_id,start_time:this.timeRange&&this.timeRange.length>0?this.timeRange[0]:"",end_time:this.timeRange&&this.timeRange.length>0?this.timeRange[1]:"",page:this.page,page_size:1e3,content_type:this.type,account_level:this.level,account_attr:this.attr,group_id:this.group,title:this.title,position:this.position,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id};this.$axios.post(this.URL.BASEURL+this.URL.newsData,e).then(function(e){t.loadingQrcode=!1,(e=e.data)&&0==e.errno?(e.rst.data&&e.rst.data.length>0&&e.rst.data.forEach(function(e){t.wxList.forEach(function(t){e.app_id==t.app_id&&(e.name=t.nickname)})}),t.allData=e.rst.data?e.rst.data:[],t.exportToExcel()):t.$message({message:e.err,type:"warning"})}).catch(function(e){console.log(e),t.loadingQrcode=!1})},exportToExcel:function(){var t=this.allData,e=[];for(var a in t)e.push({name:t[a].name?'"'+t[a].name+'"':"空",title:t[a].title?t[a].title.replace(/,/g,","):"空",position:t[a].position?"第"+t[a].position+"篇":"空",send_time:t[a].send_time?t[a].send_time:"空",target_user:t[a].target_user?t[a].target_user:"空",int_page_read_count:t[a].int_page_read_count?t[a].int_page_read_count:"空",int_page_percent:t[a].int_page_percent?t[a].int_page_percent:"空",ori_page_read_count:t[a].ori_page_read_count?t[a].ori_page_read_count:"空",ori_page_percent:t[a].ori_page_percent?t[a].ori_page_percent:"空"});for(var i="公众号名称,文章标题,文章位置,发文日期,送达人数,阅读数,阅读率,原文阅读数,原文阅读率\n",n=0;n<e.length;n++){for(var o in e[n])i+=e[n][o]+"\t,";i+="\n"}var l="data:text/csv;charset=utf-8,\ufeff"+encodeURIComponent(i),r=document.createElement("a");r.href=l,r.download="图文数据"+(this.wxName?"("+this.wxName+")":"")+".csv",document.body.appendChild(r),r.click(),document.body.removeChild(r)}},watch:{app_id:function(){var t=this;this.app_id&&this.wxList.forEach(function(e){e.app_id==t.app_id&&(t.wxName=e.nickname)})}}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingQrcode,expression:"loadingQrcode"}],staticClass:"fanData",attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[i("div",{staticClass:"mainCon"},[i("div",{staticClass:"searchCon"},[i("label",[t._v("选择公众号:")]),t._v(" "),i("el-select",{attrs:{size:"mini",clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.init(1)}},model:{value:t.app_id,callback:function(e){t.app_id=e},expression:"app_id"}},t._l(t.wxList,function(t){return i("el-option",{key:t.app_id,attrs:{label:t.nickname,value:t.app_id}})}),1),t._v(" "),i("label",{attrs:{for:"tag2"}},[t._v("内容类型:")]),t._v(" "),i("el-select",{staticStyle:{width:"100px"},attrs:{id:"tag2",clearable:"",size:"mini",placeholder:"请选择"},on:{change:function(e){return t.init(1)}},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},t._l(t.typeList,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1),t._v(" "),i("label",{attrs:{for:"tag4"}},[t._v("公众号属性:")]),t._v(" "),i("el-select",{staticStyle:{width:"100px"},attrs:{id:"tag4",clearable:"",size:"mini",placeholder:"请选择"},on:{change:function(e){return t.init(1)}},model:{value:t.attr,callback:function(e){t.attr=e},expression:"attr"}},t._l(t.attrList,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1),t._v(" "),i("label",{attrs:{for:"tag3"}},[t._v("公众号等级:")]),t._v(" "),i("el-select",{staticStyle:{width:"100px"},attrs:{id:"tag3",clearable:"",size:"mini",placeholder:"请选择"},on:{change:function(e){return t.init(1)}},model:{value:t.level,callback:function(e){t.level=e},expression:"level"}},t._l(t.levelList,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1),t._v(" "),i("label",{attrs:{for:"tag5"}},[t._v("公众号分组:")]),t._v(" "),i("el-select",{staticStyle:{width:"100px"},attrs:{id:"tag5",clearable:"",size:"mini",placeholder:"请选择"},on:{change:function(e){return t.init(1)}},model:{value:t.group,callback:function(e){t.group=e},expression:"group"}},t._l(t.groupList,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1),t._v(" "),i("br"),i("br"),t._v(" "),i("label",{attrs:{for:"tagT"}},[t._v("子文章标题:")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],staticStyle:{width:"200px"},attrs:{id:"tagT",type:"text",placeholder:"请输入子文章标题"},domProps:{value:t.title},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.init(1)},input:function(e){e.target.composing||(t.title=e.target.value)}}}),t._v(" "),i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:function(e){return t.init(1)}}},[t._v("搜索")]),t._v(" "),i("label",{attrs:{for:"tagP"}},[t._v("子文章位置:")]),t._v(" "),i("el-select",{staticStyle:{width:"100px"},attrs:{id:"tagP",clearable:"",size:"mini",placeholder:"请选择"},on:{change:function(e){return t.init(1)}},model:{value:t.position,callback:function(e){t.position=e},expression:"position"}},t._l(t.positionList,function(t){return i("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}),1),t._v(" "),i("label",{attrs:{for:"time"}},[t._v("时间:")]),t._v(" "),i("el-date-picker",{attrs:{clearable:!1,id:"time",size:"mini","value-format":"yyyy-MM-dd","picker-options":t.pickerOptions,type:"daterange",placeholder:"选择日期"},on:{change:function(e){return t.init(1)}},model:{value:t.timeRange,callback:function(e){t.timeRange=e},expression:"timeRange"}}),t._v(" "),i("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.getAll()}}},[t._v("导出")])],1),t._v(" "),i("el-table",{staticStyle:{width:"100%","margin-top":"15px"},attrs:{border:"",data:t.data}},[i("template",{slot:"empty"},[i("img",{staticClass:"pic",attrs:{src:a("z3Om"),alt:""}}),t._v(" "),i("span",[t._v("暂无数据")])]),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"公众号名称",prop:"name"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"文章标题","show-overflow-tooltip":"",prop:"title"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"文章位置",prop:"position"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"发文日期",prop:"send_time"}}),t._v(" "),i("el-table-column",{attrs:{align:"center","show-overflow-tooltip":"",label:"送达人数",prop:"target_user"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"阅读数",prop:"int_page_read_count"}}),t._v(" "),i("el-table-column",{attrs:{align:"center","show-overflow-tooltip":"",label:"阅读率",prop:"int_page_percent"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"原文阅读数",prop:"ori_page_read_count"}}),t._v(" "),i("el-table-column",{attrs:{align:"center","show-overflow-tooltip":"",label:"原文阅读率",prop:"ori_page_percent"}})],2),t._v(" "),i("br"),i("br"),t._v(" "),t.data.length>0&&t.total>=t.page_size?i("div",{staticClass:"bottom"},[i("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}})],1):t._e()],1)])},staticRenderFns:[]};var o=a("VU/8")(i,n,!1,function(t){a("KEA0")},"data-v-7e2a3203",null);e.default=o.exports}});
|