3 lines
24 KiB
JavaScript
3 lines
24 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0453d6be"],{"0c9f":function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"l",(function(){return u})),n.d(e,"g",(function(){return d})),n.d(e,"h",(function(){return f})),n.d(e,"i",(function(){return h})),n.d(e,"k",(function(){return m})),n.d(e,"j",(function(){return p}));var r=n("b775");function a(t){return Object(r["a"])({url:"/admin/statistics/product/data",method:"GET",params:t})}function i(t){return Object(r["a"])({url:"/admin/statistics/product/ranking",method:"GET",params:t})}function o(t){return Object(r["a"])({url:"/admin/statistics/product/trend",method:"GET",params:t})}function c(){return Object(r["a"])({url:"/admin/statistics/trade/data",method:"GET"})}function s(t){return Object(r["a"])({url:"/admin/statistics/trade/overview",method:"GET",params:t})}function l(t){return Object(r["a"])({url:"/admin/statistics/trade/trend",method:"GET",params:t})}function u(){return Object(r["a"])({url:"/admin/statistics/user/total/data",method:"GET"})}function d(){return Object(r["a"])({url:"/admin/statistics/user/area",method:"GET"})}function f(){return Object(r["a"])({url:"/admin/statistics/user/channel",method:"GET"})}function h(t){return Object(r["a"])({url:"/admin/statistics/user/overview",method:"GET",params:t})}function m(){return Object(r["a"])({url:"/admin/statistics/user/sex",method:"GET"})}function p(t){return Object(r["a"])({url:"/admin/statistics/user/overview/list",method:"GET",params:t})}},"19bf":function(t,e,n){},"2e83":function(t,e,n){"use strict";function r(t,e){e&&(t+=1462);var n=Date.parse(t);return(n-new Date(Date.UTC(1899,11,30)))/864e5}function a(t,e){for(var n={},a={s:{c:1e7,r:1e7},e:{c:0,r:0}},i=0;i!=t.length;++i)for(var o=0;o!=t[i].length;++o){a.s.r>i&&(a.s.r=i),a.s.c>o&&(a.s.c=o),a.e.r<i&&(a.e.r=i),a.e.c<o&&(a.e.c=o);var c={v:t[i][o]};if(null!=c.v){var s=XLSX.utils.encode_cell({c:o,r:i});"number"===typeof c.v?c.t="n":"boolean"===typeof c.v?c.t="b":c.v instanceof Date?(c.t="n",c.z=XLSX.SSF._table[14],c.v=r(c.v)):c.t="s",n[s]=c}}return a.s.c<1e7&&(n["!ref"]=XLSX.utils.encode_range(a)),n}function i(){if(!(this instanceof i))return new i;this.SheetNames=[],this.Sheets={}}function o(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),r=0;r!=t.length;++r)n[r]=255&t.charCodeAt(r);return e}function c(t,e,n){var r=e;r.unshift(t);var c="SheetJS",s=new i,l=a(r);s.SheetNames.push(c),s.Sheets[c]=l;var u=XLSX.write(s,{bookType:"xlsx",bookSST:!1,type:"binary"}),d=n||"列表";saveAs(new Blob([o(u)],{type:"application/octet-stream"}),d+".xlsx")}function s(t,e,n,r){var a=l(e,r);c(t,a,n)}function l(t,e){return e.map((function(e){return t.map((function(t){return e[t]}))}))}n("0fd4"),n("60e7"),n("1447"),n.d(e,"a",(function(){return s}))},4158:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("product"),t._v(" "),n("table-data")],1)},a=[],i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"divBox"},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"flex justify-between mb46"},[n("div",{staticClass:"header_title"},[t._v("商品概况")]),t._v(" "),n("div",{staticClass:"acea-row"},[n("div",{staticClass:"mr-20"},[n("el-radio-group",{staticClass:"mr20",attrs:{type:"button",size:"small"},on:{change:function(e){return t.selectChange(t.dateLimit)}},model:{value:t.dateLimit,callback:function(e){t.dateLimit=e},expression:"dateLimit"}},t._l(t.fromList.fromTxt,(function(e,r){return n("el-radio-button",{key:r,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),n("el-date-picker",{staticStyle:{width:"220px",height:"34px"},attrs:{size:"small",type:"daterange",placement:"bottom-end","picker-options":t.pickerOptions,"value-format":"yyyy-MM-dd",format:"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),n("el-button",{staticClass:"mr10",attrs:{type:"primary",size:"small"},on:{click:t.onSeach}},[t._v("查询")]),t._v(" "),n("el-button",{attrs:{type:"default",size:"small",icon:"el-icon-upload2"},on:{click:t.exports}},[t._v(" 导出")])],1)]),t._v(" "),t.checkPermi(["admin:statistics:product:data"])?n("div",{staticClass:"flex flex-wrap mb20"},t._l(t.list,(function(e,r){return n("div",{key:r,staticClass:"infoBox acea-row mb30"},[n("div",{staticClass:"iconCrl mr15",class:e.class},[n("i",{staticClass:"iconfont",class:e.icon,style:{color:e.color}})]),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"flex align-center"},[n("span",{staticClass:"sp1",domProps:{textContent:t._s(e.name)}}),t._v(" "),n("el-tooltip",{staticClass:"pl10",attrs:{effect:"dark",placement:"top-start"}},[n("i",{staticClass:"el-icon-warning-outline"}),t._v(" "),n("div",{staticStyle:{"max-width":"400px"},attrs:{slot:"content"},domProps:{textContent:t._s(e.info)},slot:"content"})])],1),t._v(" "),(t.list.length,n("span",{staticClass:"sp2",domProps:{textContent:t._s(e.list.num)}})),t._v(" "),n("span",{staticClass:"content-time"},[n("i",{class:e.ratio>=0?"up":"down"},[t._v(t._s(e.list.percent))]),t._v(" "),n("i",{class:e.ratio>=0?"el-icon-caret-top":"el-icon-caret-bottom",attrs:{color:e.ratio>=0?"#F5222D":"#39C15B"}})])])])})),0):t._e(),t._v(" "),t.optionData&&t.checkPermi(["admin:statistics:product:trend"])?n("echarts-new",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}}):t._e()],1)],1)},o=[],c=n("c71e"),s=n("2e83"),l=n("0c9f"),u=n("e350");function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),c=new T(r||[]);return a(o,"_invoke",{value:N(t,n,c)}),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var m="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function b(){}function w(){}function L(){}var x={};l(x,o,(function(){return this}));var _=Object.getPrototypeOf,k=_&&_(_(P([])));k&&k!==n&&r.call(k,o)&&(x=k);var S=L.prototype=b.prototype=Object.create(x);function C(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(a,i,o,c){var s=h(t[a],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==d(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,o,c)}),(function(t){n("throw",t,o,c)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,c)}))}c(s.arg)}var i;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return i=i?i.then(a,a):a()}})}function N(e,n,r){var a=m;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===i)throw o;return{value:t,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var s=O(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===m)throw a=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var l=h(e,n,r);if("normal"===l.type){if(a=r.done?g:p,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=g,r.method="throw",r.arg=l.arg)}}}function O(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=h(a,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(d(e)+" is not iterable")}return w.prototype=L,a(S,"constructor",{value:L,configurable:!0}),a(L,"constructor",{value:w,configurable:!0}),w.displayName=l(L,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,L):(t.__proto__=L,l(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},C(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,a,i){void 0===i&&(i=Promise);var o=new E(u(t,n,r,a),i);return e.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(S),l(S,s,"Generator"),l(S,o,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return c.type="throw",c.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function h(t,e,n,r,a,i,o){try{var c=t[i](o),s=c.value}catch(l){return void n(l)}c.done?e(s):Promise.resolve(s).then(r,a)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){h(i,r,a,o,c,"next",t)}function c(t){h(i,r,a,o,c,"throw",t)}o(void 0)}))}}var p={components:{echartsNew:c["a"]},data:function(){return{spinShow:!1,grid:{xl:8,lg:8,md:8,sm:24,xs:24},options:this.$timeOptions,name:"近30天",timeVal:[],fromList:this.$constants.timeList,dateLimit:"",dateLimitPram:{},list:[],optionData:{},style:{height:"400px"},pickerOptions:this.$timeOptions}},created:function(){var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.timeVal=[e,t]},mounted:function(){this.dateLimit="lately7",this.dateLimitPram="lately7",this.getStatistics(),this.getTrend()},methods:{checkPermi:u["a"],onchangeTime:function(t){this.timeVal=t,this.dateLimit=t?this.timeVal.join(","):"",this.dateLimitPram=t?this.timeVal.join(","):""},selectChange:function(t){if(""==t){var e=new Date,n=new Date;e.setTime(e.getTime()-1728e5),n.setTime(n.getTime()-864e5);var r=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate(),a=n.getFullYear()+"-"+(n.getMonth()+1)+"-"+n.getDate();this.dateLimitPram="".concat(r,",").concat(a),this.getTrend(),this.getStatistics()}else this.dateLimitPram=t,this.getTrend(),this.getStatistics()},onSeach:function(){this.getStatistics(),this.getTrend()},exports:function(){var t=m(f().mark((function t(){var e,n,r,a,i;return f().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=[],n=[],r=[],a="",t.next=3,this.getExcelData();case 3:i=t.sent,a||(a="商品统计表"),n.length||(n=i.filekey),e.length||(e=i.header),r=r.concat(i.exportData),Object(s["a"])(e,n,a,r);case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getExcelData:function(t){var e=this;return new Promise((function(t,n){Object(l["c"])({dateLimit:e.dateLimitPram}).then((function(e){var n=["日期/时间","浏览量","新增商品数量","收藏量","加购件数","下单商品数","交易成功商品数"],r=["date","pageView","addProductNum","collectNum","addCartNum","orderProductNum","orderSuccessProductNum"],a=new Array;a=e.map((function(t){return{date:t.date,pageView:t.pageView,addProductNum:t.addProductNum,collectNum:t.collectNum,addCartNum:t.addCartNum,orderProductNum:t.orderProductNum,orderSuccessProductNum:t.orderSuccessProductNum}})),t({header:n,filekey:r,exportData:a})}))}))},getStatistics:function(){var t=this;Object(l["a"])({dateLimit:this.dateLimitPram}).then((function(e){var n=[{name:"新增量",icon:"iconxinzengliang",color:"#1890FF",class:"one",info:"在选定条件下,新增加的商品之和",list:{num:e.newProductNum,percent:e.newProductNumRatio}},{name:"浏览量",icon:"iconliulanliang",color:"#A277FF",class:"two",info:"在选定条件下,所有商品详情页被访问的次数,一个人在统计时间内访问多次记为多次",list:{num:e.pageView,percent:e.pageViewRatio}},{name:"收藏量",icon:"iconshoucangliang",color:"#EF9C20",class:"three",info:"在选定条件下,被收藏的商品数量之和",list:{num:e.collectNum,percent:e.collectNumRatio}},{name:"加购量",icon:"iconjiagouliang",color:"#1BBE6B",class:"four",info:"在选定条件下,添加商品进入购物车的商品件数",list:{num:e.addCartNum,percent:e.addCartNumRatio}},{name:"交易总件数",icon:"iconjiaoyijianshu",color:"#4BCAD5",class:"five",info:"在选定条件下,成功下单的商品件数之和",list:{num:e.orderProductNum,percent:e.orderProductNumRatio}},{name:"交易成功数",icon:"iconjiaoyichenggongshu",color:"#EF9C20",class:"six",info:"在选定条件下,交易成功的商品件数之和",list:{num:e.orderSuccessProductNum,percent:e.orderSuccessProductNumRatio}}];t.list=n.map((function(t){return{name:t.name,icon:t.icon,list:t.list,info:t.info,color:t.color,class:t.class,ratio:t.list.percent.replace("%","")/100}}))}))},getTrend:function(){var t=this;Object(l["c"])({dateLimit:this.dateLimitPram}).then((function(e){var n=new Array,r=[{name:"商品浏览量",data:[],type:"line",smooth:"true",yAxisIndex:0},{name:"收藏数量",data:[],type:"line",smooth:"true",yAxisIndex:0},{name:"交易总件数",data:[],type:"line",smooth:"true",yAxisIndex:0}];n=e.map((function(t){return t.date})),r[0].data=e.map((function(t){return t.pageView})),r[1].data=e.map((function(t){return t.collectNum})),r[2].data=e.map((function(t){return t.orderSuccessProductNum})),t.spinShow=!0;var a=r.map((function(t){return t.name})),i=["#B37FEB","#FFAB2B","#1890FF","#00C050"];r.map((function(t,e){t.itemStyle={normal:{color:i[e]}}})),t.optionData={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"center",data:a},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{interval:0,rotate:40,textStyle:{color:"#000000"}},data:n},yAxis:[{type:"value",name:"数量",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}}],series:r},t.spinShow=!1}))}}},v=p,g=(n("48e2"),n("2877")),y=Object(g["a"])(v,i,o,!1,null,"0907f9f6",null),b=y.exports,w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"divBox",staticStyle:{"padding-top":"0"}},[n("el-card",{staticClass:"box-card"},[t.checkPermi(["admin:statistics:product:ranking"])?n("div",{staticClass:"flex justify-between mb20"},[n("div",{staticClass:"header_title"},[t._v("商品排行")]),t._v(" "),n("div",{staticClass:"acea-row"},[n("div",{staticClass:"mr-20"},[n("el-select",{staticClass:"mr-20",attrs:{placeholder:"请选择",size:"small"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.options,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),t._v(" "),n("el-date-picker",{staticStyle:{width:"220px"},attrs:{size:"small",type:"daterange",placement:"bottom-end","picker-options":t.pickerOptions,"value-format":"yyyy-MM-dd",format:"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.search}},[t._v("查询")])],1)]):t._e(),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.LogLoading,expression:"LogLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.list,stripe:"","default-sort":{prop:"pageviews",order:"descending"}}},[n("el-table-column",{attrs:{label:"商品图",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",[n("el-image",{staticStyle:{width:"40px",height:"40px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"商品名称",prop:"proName","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"text_overflow"},[t._v(t._s(e.row.proName))])]}}])}),t._v(" "),t._l(t.columns1,(function(t,e){return n("el-table-column",{key:e,attrs:{label:t.title,prop:t.key,sortable:t.sortable,align:"center",width:"150"}})}))],2),t._v(" "),n("div",{staticClass:"flex justify-center"},[n("el-pagination",{attrs:{"page-sizes":[10,20,30,40],"page-size":t.limit,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChangeLog,"current-change":t.pageChangeLog}})],1)],1)],1)},L=[],x={data:function(){return{timeVal:[],dateLimit:"",options:[{value:"pageviews",label:"浏览量"},{value:"collectNum",label:"收藏数"},{value:"addCartNum",label:"加购件数"},{value:"salesNum",label:"销量"},{value:"salesAmount",label:"销售额"}],value:"pageviews",columns1:[{title:"浏览量",key:"pageView",sortable:!0},{title:"收藏数量",key:"collectNum",sortable:!0},{title:"加购件数",key:"addCartNum",sortable:!0},{title:"销量",key:"salesNum",sortable:!0},{title:"销售额",key:"salesAmount",sortable:!0}],pickerOptions:this.$timeOptions,LogLoading:!1,tableData:[],limit:20,currentPage:1}},created:function(){var t=new Date,e=new Date;e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),this.timeVal=[e,t]},mounted:function(){this.dateLimit="lately30",this.getRankData()},methods:{checkPermi:u["a"],search:function(){this.getRankData()},onchangeTime:function(t){this.timeVal=t,this.dateLimit=t?this.timeVal.join(","):""},getRankData:function(){var t=this;this.LogLoading=!0;var e={dateLimit:this.dateLimit,limit:this.limit,page:this.currentPage,sortKey:this.value};Object(l["b"])(e).then((function(e){t.tableData=e,t.LogLoading=!1})).catch((function(){t.LogLoading=!1}))},handleSizeChangeLog:function(t){this.limit=t,this.getRankData()},pageChangeLog:function(t){this.currentPage=t,this.getRankData()}}},_=x,k=(n("68da"),Object(g["a"])(_,w,L,!1,null,"01743ba2",null)),S=k.exports,C={components:{product:b,tableData:S}},E=C,N=Object(g["a"])(E,r,a,!1,null,"38a9caec",null);e["default"]=N.exports},"485b":function(t,e,n){},"48e2":function(t,e,n){"use strict";n("485b")},"60e7":function(t,e){
|
|
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
|
(function(t){"use strict";if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return void new Blob}catch(n){}var e=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},r=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},a=n.prototype,i=r.prototype,o=t.FileReaderSync,c=function(t){this.code=this[this.name=t]},s="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),l=s.length,u=t.URL||t.webkitURL||t,d=u.createObjectURL,f=u.revokeObjectURL,h=u,m=t.btoa,p=t.atob,v=t.ArrayBuffer,g=t.Uint8Array;r.fake=i.fake=!0;while(l--)c.prototype[s[l]]=l+1;return u.createObjectURL||(h=t.URL={}),h.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof r?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):m?e+";base64,"+m(t.data):e+","+encodeURIComponent(t.data)):d?d.call(u,t):void 0},h.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&f&&f.call(u,t)},a.append=function(t){var n=this.data;if(g&&(t instanceof v||t instanceof g)){for(var a="",i=new g(t),s=0,l=i.length;s<l;s++)a+=String.fromCharCode(i[s]);n.push(a)}else if("Blob"===e(t)||"File"===e(t)){if(!o)throw new c("NOT_READABLE_ERR");var u=new o;n.push(u.readAsBinaryString(t))}else t instanceof r?"base64"===t.encoding&&p?n.push(p(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!==typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},a.getBlob=function(t){return arguments.length||(t=null),new r(this.data.join(""),t,"raw")},a.toString=function(){return"[object BlobBuilder]"},i.slice=function(t,e,n){var a=arguments.length;return a<3&&(n=null),new r(this.data.slice(t,a>1?e:this.data.length),n,this.encoding)},i.toString=function(){return"[object Blob]"},i.close=function(){this.size=this.data.length=0},n}(t);t.Blob=function(t,n){var r=n&&n.type||"",a=new e;if(t)for(var i=0,o=t.length;i<o;i++)a.append(t[i]);return a.getBlob(r)}})("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content||this)},"68da":function(t,e,n){"use strict";n("19bf")}}]); |