chunk-4d248452.30c43588.js 5.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d248452"],{"0643":function(e,t,a){"use strict";a("d254")},cb8e:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"e",(function(){return s})),a.d(t,"f",(function(){return o})),a.d(t,"c",(function(){return c})),a.d(t,"d",(function(){return u})),a.d(t,"b",(function(){return d}));var n=a("b775"),r={behaviorTrend:"/analysis.behavior/behaviorTrend",pageVisit:"/analysis.page/pageVisit",retainData:"/analysis.retain/retainData",exportPage:"/analysis.page/export",exportRetain:"/analysis.retain/exportRetainData",exportBehaviorTrend:"/analysis.behavior/exportBehaviorTrend"};function i(e){return Object(n["b"])({url:r.behaviorTrend,method:"get",params:e})}function s(e){return Object(n["b"])({url:r.pageVisit,method:"get",params:e})}function o(e){return Object(n["b"])({url:r.retainData,method:"get",params:e})}function c(e){return Object(n["b"])({url:r.exportPage,method:"get",params:e})}function u(e){return Object(n["b"])({url:r.exportRetain,method:"post",data:e})}function d(e){return Object(n["b"])({url:r.exportBehaviorTrend,method:"post",data:e})}},d254:function(e,t,a){},e7c6:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordere:!1}},[t("div",{staticClass:"table-operator"},[t("a-radio-group",{style:{marginBottom:"30px"},attrs:{"button-style":"solid"},model:{value:e.pageMode,callback:function(t){e.pageMode=t},expression:"pageMode"}},[t("a-radio-button",{attrs:{value:1},on:{click:function(t){return e.chooseTab(1)}}},[e._v("行为分析")]),t("a-radio-button",{attrs:{value:2},on:{click:function(t){return e.chooseTab(2)}}},[e._v("留存分析")]),t("a-radio-button",{attrs:{value:3}},[e._v("页面分析")])],1)],1),t("div",{staticClass:"title"},[e._v("访问页面")]),t("div",{staticClass:"timeSelectContent"},[t("div",{staticClass:"timeBoxLeft"},[t("a-select",{staticStyle:{width:"130px"},attrs:{"default-value":e.timeSelectType},on:{change:e.changeSelect}},[t("a-select-option",{attrs:{value:1}},[e._v("最近7天")]),t("a-select-option",{attrs:{value:2}},[e._v("最近30天")]),t("a-select-option",{attrs:{value:3}},[e._v("自定义时间")])],1),1==e.timeSelectType||2==e.timeSelectType?t("span",{staticClass:"selTimeText"},[e._v(e._s(e.startText)+" 至 "+e._s(e.endText))]):e._e(),3==e.timeSelectType?t("a-range-picker",{staticClass:"inputW220",attrs:{placeholder:["开始时间","结束时间"],allowClear:!1,disabledDate:e.disabledDate},on:{change:e.changeCustomTime},model:{value:e.customTime,callback:function(t){e.customTime=t},expression:"customTime"}}):e._e()],1),t("a-button",{attrs:{type:"primary",loading:e.isBtnLoading},on:{click:e.exportPage}},[e._v("下载")])],1),t("s-table",{ref:"table",staticClass:"tableBox",attrs:{rowKey:"page_path",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,bordered:""},scopedSlots:e._u([{key:"page_path_name",fn:function(a,n){return t("span",{},[e._v(" "+e._s(a||n.page_path)+" ")])}},{key:"exitpage_percent",fn:function(a){return t("span",{},[e._v(" "+e._s(a)+"% ")])}}])})],1)},r=[],i=a("753f"),s=(a("9f29"),a("cb8e")),o=a("2af9"),c=a("2f42"),u=a.n(c),d=[{title:"页面",dataIndex:"page_path_name",scopedSlots:{customRender:"page_path_name"}},{title:"访问次数",dataIndex:"page_visit_pv",sorter:!0},{title:"访问人数",dataIndex:"page_visit_uv",sorter:!0},{title:"次均时长(s)",dataIndex:"page_staytime_pv",sorter:!0},{title:"入口页次数",dataIndex:"entrypage_pv",sorter:!0},{title:"退出页次数",dataIndex:"exitpage_pv",sorter:!0},{title:"退出率",dataIndex:"exitpage_percent",scopedSlots:{customRender:"exitpage_percent"},sorter:!0},{title:"分享次数",dataIndex:"page_share_pv"},{title:"分享人数",dataIndex:"page_share_uv"}],l={components:{STable:o["c"]},data:function(){var e=this;return{pageMode:3,timeSelectType:1,columns:d,queryParam:{},isLoading:!1,isBtnLoading:!1,loadData:function(t){return e.queryParam.type=e.timeSelectType,s["e"](Object(i["a"])(Object(i["a"])({},t),e.queryParam)).then((function(t){var a=t.data.start,n=t.data.end;return e.customTime=[a,n],e.startText=a,e.endText=n,t.data.table}))},customTime:[],startText:"",endText:""}},created:function(){},methods:{disabledDate:function(e){return e&&(e<u()().subtract(91,"days")||e>u()().subtract(1,"days"))},chooseTab:function(e){var t=1==e?"./behavior":"./retained";this.$router.push(t)},changeSelect:function(e){this.timeSelectType=e,3!=this.timeSelectType&&this.handleRefresh(!0)},changeCustomTime:function(e){this.customTime=e;var t=new Date(this.customTime[0]).getTime()/1e3,a=new Date(this.customTime[1]).getTime()/1e3;this.queryParam.start=t,this.queryParam.end=a,this.handleRefresh(!0)},exportPage:function(){var e=this,t=this.$refs.table.sorterData;t&&(this.queryParam.sortField=t.field||"",this.queryParam.sortOrder=t.order||""),this.queryParam.type=this.timeSelectType,this.isBtnLoading=!0,s["c"](this.queryParam).then((function(t){e.$message.success(t.message,1.5);var a=document.createElement("a");a.href=t.data.file,a.setAttribute("download",t.data.filename),a.click(),a=null,e.isBtnLoading=!1})).finally((function(t){e.isBtnLoading=!1}))},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},p=l,m=(a("0643"),a("829d")),h=Object(m["a"])(p,n,r,!1,null,"4fcf5a94",null);t["default"]=h.exports}}]);