猎户系统

21.d9b0dda0a4f74fbb8cb9.js 10KB

1
  1. webpackJsonp([21],{"+MLA":function(t,a,e){var n=e("EqjI"),i=e("06OY").onFreeze;e("uqUo")("freeze",function(t){return function(a){return t&&n(a)?t(i(a)):a}})},O4R0:function(t,a,e){e("+MLA"),t.exports=e("FeBl").Object.freeze},YlAl:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("Gu7T"),i=e.n(n),r=e("Xxa5"),s=e.n(r),c=e("exGp"),o=e.n(c),h=e("u2KI"),l=e.n(h),d={"background-color":"#F8F8F9","font-size":"13px",color:"#666",padding:"8px 0"},u={components:{datePicker:e("gzej").a},data:function(){var t=[this.$getDay(-30,!1),this.$getDay(0,!1)];return{height:"",headerCellStyle:l()(d),myChartToday:null,myChart:null,loadingChartToday:!1,loadingChart:!1,loadingList:!1,pidOptions:[],echartsDataToday:{time:[],view_cn:[],click_cn:[],click_uv:[],copy_cn:[],jump_cn:[],view_detail_cn:[],guess_like_cn:[]},echartsData:{date:[],view_count:[],click_count:[],click_ucount:[],copy_count:[],jump_count:[],dcount:[],guess_total:[]},default_time:t,filter:{time:t},pagination:{page:1,page_size:20,pages:0,total:0},tableData:[],guessColumns:[]}},created:function(){this.height=document.documentElement.clientHeight-100,window.addEventListener("resize",this.handleResizeChart)},mounted:function(){this.handleGetChartToday(),this.handleGetChart(),this.handleGetList()},beforeDestroy:function(){window.removeEventListener("resize",this.handleResizeChart),this.myChartToday&&this.myChartToday.clear(),this.myChart&&this.myChart.clear()},methods:{handleResizeChart:function(){this.myChartToday&&this.myChartToday.resize(),this.myChart&&this.myChart.resize()},handleInitEchartsDataToday:function(){this.echartsDataToday.time=[],this.echartsDataToday.view_cn=[],this.echartsDataToday.click_cn=[],this.echartsDataToday.click_uv=[],this.echartsDataToday.copy_cn=[],this.echartsDataToday.jump_cn=[],this.echartsDataToday.view_detail_cn=[],this.echartsDataToday.guess_like_cn=[]},handleGetChartToday:function(){var t=this;return o()(s.a.mark(function a(){var e,n,i,r,c;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,t.loadingChartToday=!0,e=""+t.URL.BASEURL+t.URL.h5Data_todayPerformance,n={},a.next=6,t.$axios.get(e,{params:n});case 6:i=a.sent,r=i.data,(c=void 0===r?{}:r)&&0==c.errno?(t.handleInitEchartsDataToday(),c.rst.forEach(function(a){t.echartsDataToday.time.push(a.time),t.echartsDataToday.view_cn.push(a.view_cn),t.echartsDataToday.click_cn.push(a.click_cn),t.echartsDataToday.click_uv.push(a.click_uv),t.echartsDataToday.copy_cn.push(a.copy_cn),t.echartsDataToday.jump_cn.push(a.jump_cn),t.echartsDataToday.view_detail_cn.push(a.view_detail_cn),t.echartsDataToday.guess_like_cn.push(a.guess_like_cn)}),t.handleDrawChartToday()):4002!=c.errno&&(t.handleInitEchartsDataToday(),t.handleDrawChartToday(),t.$message.warning(c.err||"操作失败")),a.next=15;break;case 12:a.prev=12,a.t0=a.catch(0),console.log("error =>",a.t0);case 15:return a.prev=15,t.loadingChartToday=!1,a.finish(15);case 18:case"end":return a.stop()}},a,t,[[0,12,15,18]])}))()},handleDrawChartToday:function(){this.myChartToday&&this.myChartToday.clear();var t={legend:{icon:"circle",data:["曝光","点击次数","点击人数","复制淘口令","打开淘宝","查看详情","猜你喜欢"],show:!0,itemGap:22,itemWidth:14,itemHeight:14,left:0},grid:{left:0,right:20,bottom:0,containLabel:!0},xAxis:{type:"category",data:this.echartsDataToday.time,axisTick:{show:!1}},tooltip:{trigger:"axis",position:function(t,a,e,n,i){var r=t[0],s=t[1],c=i.contentSize[0],o=i.contentSize[1];return[c>r?r+30:r-c-30,o>s?5:s-o]}},yAxis:{type:"value"},series:[{showSymbol:!1,data:this.echartsDataToday.view_cn,type:"line",name:"曝光"},{showSymbol:!1,data:this.echartsDataToday.click_cn,type:"line",name:"点击次数"},{showSymbol:!1,data:this.echartsDataToday.click_uv,type:"line",name:"点击人数"},{showSymbol:!1,data:this.echartsDataToday.copy_cn,type:"line",name:"复制淘口令"},{showSymbol:!1,data:this.echartsDataToday.jump_cn,type:"line",name:"打开淘宝"},{showSymbol:!1,data:this.echartsDataToday.view_detail_cn,type:"line",name:"查看详情"},{showSymbol:!1,data:this.echartsDataToday.guess_like_cn,type:"line",name:"猜你喜欢"}]};this.myChartToday=this.myChartToday?this.myChartToday:this.$echarts.init(document.getElementById("trend_today")),this.myChartToday.setOption(t)},handleInitEchartsData:function(){this.echartsData.date=[],this.echartsData.view_count=[],this.echartsData.click_count=[],this.echartsData.click_ucount=[],this.echartsData.copy_count=[],this.echartsData.jump_count=[],this.echartsData.dcount=[],this.echartsData.guess_total=[]},handleGetChart:function(){var t=this;return o()(s.a.mark(function a(){var e,n,i,r,c;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,t.loadingChart=!0,e=""+t.URL.BASEURL+t.URL.h5Data_eventTrends,n={start:t.filter.time[0],end:t.filter.time[1]},a.next=6,t.$axios.get(e,{params:n});case 6:i=a.sent,r=i.data,(c=void 0===r?{}:r)&&0==c.errno?(t.handleInitEchartsData(),c.rst.forEach(function(a){t.echartsData.date.push(a.date),t.echartsData.view_count.push(a.view_count),t.echartsData.click_count.push(a.click_count),t.echartsData.click_ucount.push(a.click_ucount),t.echartsData.copy_count.push(a.copy_count),t.echartsData.jump_count.push(a.jump_count),t.echartsData.dcount.push(a.dcount),t.echartsData.guess_total.push(a.guess_total)}),t.handleDrawChart()):4002!=c.errno&&(t.handleInitEchartsData(),t.handleDrawChart(),t.$message.warning(c.err||"操作失败")),a.next=15;break;case 12:a.prev=12,a.t0=a.catch(0),console.log("error =>",a.t0);case 15:return a.prev=15,t.loadingChart=!1,a.finish(15);case 18:case"end":return a.stop()}},a,t,[[0,12,15,18]])}))()},handleDrawChart:function(){this.myChart&&this.myChart.clear();var t={legend:{icon:"circle",data:["曝光","点击次数","点击人数","复制淘口令","打开淘宝","查看详情","猜你喜欢"],show:!0,itemGap:22,itemWidth:14,itemHeight:14,left:0},grid:{left:0,right:20,bottom:0,containLabel:!0},xAxis:{type:"category",data:this.echartsData.date,axisTick:{show:!1}},tooltip:{trigger:"axis"},yAxis:{type:"value"},series:[{showSymbol:!1,data:this.echartsData.view_count,type:"line",name:"曝光"},{showSymbol:!1,data:this.echartsData.click_count,type:"line",name:"点击次数"},{showSymbol:!1,data:this.echartsData.click_ucount,type:"line",name:"点击人数"},{showSymbol:!1,data:this.echartsData.copy_count,type:"line",name:"复制淘口令"},{showSymbol:!1,data:this.echartsData.jump_count,type:"line",name:"打开淘宝"},{showSymbol:!1,data:this.echartsData.dcount,type:"line",name:"查看详情"},{showSymbol:!1,data:this.echartsData.guess_total,type:"line",name:"猜你喜欢"}]};this.myChart=this.myChart?this.myChart:this.$echarts.init(document.getElementById("trend")),this.myChart.setOption(t)},handleGetList:function(){var t=this;return o()(s.a.mark(function a(){var e,n,r,c,o;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,t.loadingList=!0,e=""+t.URL.BASEURL+t.URL.h5Data_eventTrends,n={start:t.filter.time[0],end:t.filter.time[1]},a.next=6,t.$axios.get(e,{params:n});case 6:if(r=a.sent,c=r.data,!(o=void 0===c?{}:c)||0!=o.errno){a.next=22;break}if(!o.rst||!o.rst.length){a.next=19;break}return t.guessColumns=o.rst[0].guess.map(function(t,a){return{label:"猜你喜欢"+(a+1),prop:"guess_"+(a+1)}}),o.rst.forEach(function(t){t.guess.forEach(function(a,e){t["guess_"+(e+1)]=a})}),t.tableData=[].concat(i()(o.rst)),a.next=16,t.$nextTick();case 16:t.$refs.tableEl.doLayout(),a.next=20;break;case 19:t.tableData=[];case 20:a.next=23;break;case 22:4002!=o.errno&&(t.tableData=[],t.$message.warning(o.err||"操作失败"));case 23:a.next=28;break;case 25:a.prev=25,a.t0=a.catch(0),console.log("error =>",a.t0);case 28:return a.prev=28,t.loadingList=!1,a.finish(28);case 31:case"end":return a.stop()}},a,t,[[0,25,28,31]])}))()},onChangeTime:function(t){this.filter.time=Array.isArray(t)?t:[],this.handleGetChart(),this.handleGetList()}}},m={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"h5Data-wrap"},[e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingChartToday,expression:"loadingChartToday"}],staticClass:"content-wrap mb-10"},[t._m(0)]),t._v(" "),e("div",{staticClass:"filter-wrap"},[e("datePicker",{attrs:{title:"自定义",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1},on:{changeTime:t.onChangeTime}})],1),t._v(" "),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingChart,expression:"loadingChart"}],staticClass:"content-wrap"},[t._m(1)]),t._v(" "),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingList,expression:"loadingList"}],staticClass:"content-wrap"},[e("el-table",{ref:"tableEl",staticClass:"mt-20",staticStyle:{width:"100%"},attrs:{height:t.height,data:t.tableData,"tooltip-effect":"dark","header-cell-style":t.headerCellStyle}},[e("el-table-column",{attrs:{label:"日期",prop:"date",align:"center","min-width":"180",fixed:"left"}}),t._v(" "),e("el-table-column",{attrs:{label:"曝光",prop:"view_count",align:"center","min-width":"180"}}),t._v(" "),e("el-table-column",{attrs:{label:"点击次数",prop:"click_count",align:"center","min-width":"180"}}),t._v(" "),e("el-table-column",{attrs:{label:"点击人数",prop:"click_ucount",align:"center","min-width":"180"}}),t._v(" "),e("el-table-column",{attrs:{label:"复制淘口令",prop:"copy_count",align:"center","min-width":"180"}}),t._v(" "),e("el-table-column",{attrs:{label:"打开淘宝",prop:"jump_count",align:"center","min-width":"180"}}),t._v(" "),e("el-table-column",{attrs:{label:"查看详情",prop:"dcount",align:"center","min-width":"180"}}),t._v(" "),t._l(t.guessColumns,function(t,a){return e("el-table-column",{key:t.label+a,attrs:{label:t.label,prop:t.prop,align:"center","min-width":"180"}})})],2)],1)])},staticRenderFns:[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"chart-wrap"},[a("div",{staticStyle:{width:"100%",height:"250px"},attrs:{id:"trend_today"}})])},function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"chart-wrap"},[a("div",{staticStyle:{width:"100%",height:"250px"},attrs:{id:"trend"}})])}]};var y=e("VU/8")(u,m,!1,function(t){e("nUPe")},"data-v-75ff41a2",null);a.default=y.exports},nUPe:function(t,a){},u2KI:function(t,a,e){t.exports={default:e("O4R0"),__esModule:!0}},uqUo:function(t,a,e){var n=e("kM2E"),i=e("FeBl"),r=e("S82l");t.exports=function(t,a){var e=(i.Object||{})[t]||Object[t],s={};s[t]=a(e),n(n.S+n.F*r(function(){e(1)}),"Object",s)}}});