酷炫数据营销平台

73.c28780624f7765bee3a6.js 11KB

1
  1. webpackJsonp([73],{"9x4a":function(t,e){},jqZE:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("bQIR"),s={name:"monitoringDetail",components:{},data:function(){return{todayData:{},yesData:{},hasMonitor:!1,timeRange:[],showSelect:!1,proList:[],id:"",info:{},qushiList:[],newQushiList:[],type:2,total:1,pageSize:15,page:1,loading:!0,pathName:[],newData:[]}},created:function(){parseInt(this.$route.params.start_time)&&parseInt(this.$route.params.end_time)&&(this.timeRange[0]=this.$route.params.start_time,this.timeRange[1]=this.$route.params.end_time),this.pathName=this.$route.name,this.id=this.$route.params.id},mounted:function(){this.getList(),this.getQushi(1),this.dataOverview(),this.newgetQushi()},methods:{handleCurrentChange:function(t){this.getQushi(t)},getList:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.dou_videoMonitorDetail,{params:{id:this.id}}).then(function(e){if(t.loading=!1,(e=e.data)&&0==e.errno){var a=e.rst;t.info=a}else t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},newgetQushi:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.dou_videoMonitorDetailList,{params:{id:this.id,page:1,pagesize:999}}).then(function(e){(e=e.data)&&0==e.errno?(t.newQushiList=e.rst.data,t.$nextTick(function(){t.newQushiList&&t.incrementalTrend()})):t.$message({message:e.err,type:"warning"})})},getQushi:function(t){var e=this;this.page=t,this.$axios.get(this.URL.BASEURL+this.URL.dou_videoMonitorDetailList,{params:{id:this.id,page:this.page}}).then(function(t){if((t=t.data)&&0==t.errno){var a=t.rst;e.qushiList=a.data,e.total=a.pageInfo.total,e.pageSize=a.pageInfo.size}else e.$message({message:t.err,type:"warning"})}).catch(function(t){})},dataOverview:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.dou_videoMonitorCounts,{params:{id:this.id}}).then(function(e){if((e=e.data)&&0==e.errno){var a=[];e.rst.all&&a.push(e.rst.all),e.rst.today&&a.push(e.rst.today),e.rst.yestoday&&a.push(e.rst.yestoday),t.newData=a}else Object(i.MessageBox)({message:e.err,duration:3e3})})},incrementalTrend:function(){var t=this.newQushiList.map(function(t){return t.digg_add}),e=this.newQushiList.map(function(t){return t.comment_add}),a=this.newQushiList.map(function(t){return t.created_at}),i=this.newQushiList.map(function(t){return t.digg_count}),s=this.newQushiList.map(function(t){return t.comment_count}),n={tooltip:{trigger:"axis",position:function(t,e,a,i,s){var n={top:10};return n[["left","right"][+(t[0]<s.viewSize[0]/3)]]=20,n}},xAxis:{type:"category",boundaryGap:!1,data:a,axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{boundaryGap:[0,"100%"],max:1==this.type?Math.max.apply(null,t.concat(e)):Math.max.apply(null,i.concat(s)),type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"#eee",type:"dashed"}},nameTextStyle:{color:"#929292",padding:[0,35,0,0]}},legend:{data:["点赞量","评论量"],bottom:0},grid:{left:"3%",right:"4%",bottom:"23%",containLabel:!0},dataZoom:[{type:"slider",start:0,bottom:"15%",handleStyle:{color:"#fff",shadowBlur:3,shadowOffsetX:2,shadowOffsetY:2}}],series:[{name:"点赞量",type:"line",itemStyle:{normal:{color:"#2296F3",borderColor:"#2296F3"}},areaStyle:{color:"#A4FCD6",opacity:.5},data:1==this.type?t:i},{name:"评论量",type:"line",itemStyle:{normal:{color:"#FF7C00",borderColor:"#FF7C00"}},areaStyle:{color:"#fbb473",opacity:.5},data:1==this.type?e:s}]};this.$echarts.init(document.getElementById("chartmain")).setOption(n)}},watch:{type:function(){this.incrementalTrend()},$route:function(){this.pathName=this.$route.name},timeRange:function(){var t=this;this.$axios({url:this.URL.BASEURL+this.URL.dou_changeUsersVideoTime,method:"post",data:{id:this.id,aweme_id:this.info.aweme_id,start_time:this.timeRange[0]+" 00:00:00",end_time:this.timeRange[1]+" 23:59:59"}}).then(function(e){(e=e.data)&&0==e.errno?(t.hasMonitor=!0,t.getList(),t.getQushi(1),t.newgetQushi(),t.dataOverview()):t.$message({message:e.rst,type:"warning"})})}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"monitoringDetail"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[a("li",{staticClass:"hot-item"},[a("div",{staticClass:"icon_pancel"},[a("el-image",{staticClass:"icon",attrs:{src:t.info.cover_url,alt:""}}),t._v(" "),a("span",{staticClass:"type",style:1==t.info.status||0==t.info.status?"color:red":""},[t._v(t._s(0==t.info.status?"未开始":1==t.info.status?"监测中":"已结束"))])],1),t._v(" "),a("div",{staticClass:"info"},[a("a",{attrs:{href:t.info.share_url?t.info.share_url:"javascript:void(0);",target:"_Blank"}},[a("div",{staticClass:"common_user_name"},[a("el-tooltip",{attrs:{effect:"dark",content:t.info.desc,placement:"top"}},[a("span",{staticClass:"common_user_title"},[t._v(t._s(t.info.desc))])])],1)]),t._v(" "),a("a",{staticStyle:{display:"block","padding-top":"4px"},attrs:{href:t.info.share_url?t.info.share_url:"javascript:void(0);",target:"_Blank"}},[a("el-image",{staticClass:"smal_icon",staticStyle:{"border-radius":"50%"},attrs:{src:t.info.headurl,alt:""}}),t._v(" "),a("div",{staticClass:"common_user_title"},[a("el-tooltip",{attrs:{effect:"dark",content:t.info.user_name,placement:"top"}},[a("span",{staticClass:"common_name"},[t._v(t._s(t.info.user_name))])])],1)],1),t._v(" "),a("div",{staticClass:"time"},[a("div",{staticClass:"time"},[t._v("\n 开始时间:"+t._s(t.info.starttime?t.info.starttime:"-")+"\n ")]),t._v(" "),a("div",{staticClass:"time"},[t._v("\n 结束时间:"+t._s(t.info.endtime?t.info.endtime:"-")+"\n ")])]),t._v(" "),t.info.aweme_id?a("el-button",{staticStyle:{display:"inline-block"},attrs:{round:"",size:"small",type:"primary"},on:{click:function(e){t.showSelect=!0}}},[t._v(t._s(0!=t.info.status?"修改监测时段":"设置监测时段"))]):t._e(),t._v(" "),a("el-date-picker",{attrs:{type:"datetimerange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",visible:t.showSelect},on:{"update:visible":function(e){t.showSelect=e}},model:{value:t.timeRange,callback:function(e){t.timeRange=e},expression:"timeRange"}})],1),t._v(" "),a("div",{staticClass:"item-info"},[a("div",{staticClass:"number"},[t._v(t._s(t.info.digg_count_add?t.info.digg_count_add:"-"))]),t._v(" "),a("span",[t._v("新增点赞量")])]),t._v(" "),a("div",{staticClass:"item-info"},[a("div",{staticClass:"number"},[t._v(t._s(t.info.comment_count_add?t.info.comment_count_add:"-"))]),t._v(" "),a("span",[t._v("新增评论量")])]),t._v(" "),a("div",{staticClass:"item-info"},[a("div",{staticClass:"number"},[t._v(t._s(t.info.share_count?t.info.share_count:"-"))]),t._v(" "),a("span",[t._v("分享量")])]),t._v(" "),a("div",{staticClass:"item-info"},[a("div",{staticClass:"number"},[t._v(t._s(t.info.digg_count?t.info.digg_count:"-"))]),t._v(" "),a("span",[t._v("点赞量")])]),t._v(" "),a("div",{staticClass:"item-info"},[a("div",{staticClass:"number"},[t._v(t._s(t.info.comment_count?t.info.comment_count:"-"))]),t._v(" "),a("span",[t._v("评论量")])])]),t._v(" "),a("div",{staticClass:"dataDetail"},[t._m(0),t._v(" "),a("ul",[0!=t.newData.length?a("table",[t._m(1),t._v(" "),t._l(t.newData,function(e,i){return a("tr",{directives:[{name:"show",rawName:"v-show",value:e,expression:"item"}],key:"newData"+i},[a("td",[t._v(t._s(e&&e.created_at?e.created_at:"-"))]),t._v(" "),a("td",[t._v(t._s(e&&e.digg_add?e.digg_add:"-"))]),t._v(" "),a("td",[t._v(t._s(e&&e.comment_add?e.comment_add:"-"))]),t._v(" "),a("td",[t._v(t._s(e&&e.digg_count?e.digg_count:"-"))]),t._v(" "),a("td",[t._v(t._s(e&&e.comment_count?e.comment_count:"-"))])])})],2):a("div",{staticClass:"noHaveData"},[t._v("暂无数据")])])]),t._v(" "),a("div",{staticClass:"dataDetail",attrs:{id:"dataMonitoring"}},[a("div",{staticClass:"title"},[t._v("数据趋势")]),t._v(" "),a("div",{staticClass:"incremental_trend"},[a("div",{staticClass:"choice"},[a("button",{staticClass:"button",class:1==t.type?"activeButton":"",on:{click:function(e){t.type=1}}},[t._v("增量")]),t._v(" "),a("button",{staticClass:"button",class:2==t.type?"activeButton":"",on:{click:function(e){t.type=2}}},[t._v("累计量")])]),t._v(" "),a("div",{staticStyle:{height:"400px"},attrs:{id:"chartmain"}})])]),t._v(" "),a("div",{staticClass:"dataDetail"},[t._m(2),t._v(" "),a("ul",[a("el-table",{staticStyle:{width:"90%",margin:"0 auto"},attrs:{data:t.qushiList}},[a("el-table-column",{attrs:{prop:"created_at",align:"center",label:"时间"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"新增点赞量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.digg_add_str?e.row.digg_add_str:"-")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"新增评论量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.comment_add_str?e.row.comment_add_str:"-")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"总点赞量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.digg_count_str?e.row.digg_count_str:"-")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"user_count",label:"总评论量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.comment_count_str?e.row.comment_count_str:"-")+"\n ")]}}])})],1)],1)]),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],staticClass:"bottom"},[a("span",{directives:[{name:"show",rawName:"v-show",value:t.total,expression:"total"}],staticClass:"total"},[t._v("共"+t._s(t.total)+"条结果")]),t._v(" "),a("el-pagination",{attrs:{background:"","current-page":t.page,"page-size":t.pageSize,layout:"prev, pager, next ",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"top"},[e("div",{staticClass:"title"},[this._v("数据概览")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("tr",[a("td",[t._v("时间")]),t._v(" "),a("td",[t._v("新增点赞量")]),t._v(" "),a("td",[t._v("新增评论量")]),t._v(" "),a("td",[t._v("总点赞量")]),t._v(" "),a("td",[t._v("总评论量")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"top"},[e("div",{staticClass:"title"},[this._v("数据详情")])])}]};var o=a("C7Lr")(s,n,!1,function(t){a("yYGg"),a("9x4a")},"data-v-349b2a96",null);e.default=o.exports},yYGg:function(t,e){}});