1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-accb7db6"],{1985:function(t,e,n){},"22af":function(t,e,n){"use strict";n("bdfc")},"238a":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[n("div",{staticClass:"content_xwl"},[n("div",{staticClass:"header_xwl",staticStyle:{background:"white"}},[n("div",{staticClass:"root_xwl"},[n("div",{staticClass:"main_xwl"},[n("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"right"}},[n("template",{slot:"title"},[n("span",[t._v("以某段时间做过初始事件的用户为样本,查看在指定日期后用户进行回访事件的留存情况")])]),t._v(" "),n("span",{staticClass:"title_xwl",staticStyle:{color:"#202d3f"}},[t._v(" 留存分析 "),n("a-icon",{attrs:{type:"question-circle"}}),t._v(" "),""!=t.reportTableName?[t._v("\n "+t._s(t.reportTableName)+"\n ")]:t._e()],2)],2)],1),t._v(" "),n("div",{staticClass:"actions_xwl"},[n("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[n("template",{slot:"title"},[n("span",[t._v("以页面格式下载全量数据")])]),t._v(" "),n("a-button",{staticClass:"actions_xwl_btn",attrs:{type:"link",icon:"download"},on:{click:t.download}})],2),t._v(" "),n("report-table-list",{attrs:{rt_type:Number(2)}})],1)])]),t._v(" "),n("split-pane",{attrs:{"min-percent":0,"default-percent":22,split:"vertical"},on:{resize:t.onResize}},[n("template",{slot:"paneL"},[n("div",{staticStyle:{height:"100%",width:"100%",display:"inline-block","vertical-align":"top",background:"white"},attrs:{id:"scollL"}},[n("div",{staticStyle:{width:"100%",height:"calc(100% - 140px)","overflow-x":"hidden","overflow-y":"auto"}},[n("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[n("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 12px"}},[t._v("\n 初始事件\n ")]),t._v(" "),n("div",{staticClass:"xwl_main"},t._l(t.form.zhibiaoArr,(function(e,a){return 0==a?n("div",[n("div",{staticClass:"row___xwl",staticStyle:{padding:"10px"}},[n("el-row",[n("el-col",{attrs:{span:2}},[n("el-tag",{staticClass:"drageTag",attrs:{type:"warning"}},[t._v(t._s(a+1))])],1),t._v(" "),n("el-col",{attrs:{span:18}},[n("el-row",{staticClass:"zhibiao",attrs:{span:15}},[n("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"topLeft"}},[n("template",{slot:"title"},[n("span",[t._v("点击修改指标名称")])]),t._v(" "),n("a-input",{ref:("getFocus"+a).toString(),refInFor:!0,staticClass:"eventNameDisplayInput",attrs:{placeholder:"请输入...",autofocus:"autofocus","allow-clear":""},on:{change:function(e){return t.getFocus1("getFocus"+a)}},model:{value:t.form.zhibiaoArr[a].eventNameDisplay,callback:function(e){t.$set(t.form.zhibiaoArr[a],"eventNameDisplay",e)},expression:"form.zhibiaoArr[index].eventNameDisplay"}})],2)],1),t._v(" "),n("el-row",{staticStyle:{"padding-top":"5px"},attrs:{span:6}},[n("a-select",{staticStyle:{width:"75%"},attrs:{"dropdown-match-select-width":"","show-search":"","default-active-first-option":""},on:{change:function(e){return t.changeEventNameDisplay(a)}},model:{value:t.form.zhibiaoArr[a].eventName,callback:function(e){t.$set(t.form.zhibiaoArr[a],"eventName",e)},expression:"form.zhibiaoArr[index].eventName"}},t._l(t.metaEventList,(function(e,a,r){return n("a-select-option",{key:r,attrs:{value:e.event_name}},[t._v("\n "+t._s(""==e.show_name?e.event_name:e.show_name)+"\n ")])})),1)],1)],1)],1),t._v(" "),n("div",{staticClass:"filters_xwl"},[n("filter-where",{attrs:{"table-typ":"2","data-type-map":t.attrMap,options:t.eventAttrOptions},model:{value:t.form.zhibiaoArr[a].relation,callback:function(e){t.$set(t.form.zhibiaoArr[a],"relation",e)},expression:"form.zhibiaoArr[index].relation"}})],1)],1)]):t._e()})),0)]),t._v(" "),n("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[n("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 12px"}},[t._v("\n 回访事件\n ")]),t._v(" "),n("div",{staticClass:"xwl_main"},t._l(t.form.zhibiaoArr,(function(e,a){return 1==a?n("div",[n("div",{staticClass:"row___xwl",staticStyle:{padding:"10px"}},[n("el-row",[n("el-col",{attrs:{span:2}},[n("el-tag",{staticClass:"drageTag",attrs:{type:"warning"}},[t._v(t._s(a+1))])],1),t._v(" "),n("el-col",{attrs:{span:18}},[n("el-row",{staticClass:"zhibiao",attrs:{span:15}},[n("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"topLeft"}},[n("template",{slot:"title"},[n("span",[t._v("点击修改指标名称")])]),t._v(" "),n("a-input",{ref:("getFocus"+a).toString(),refInFor:!0,staticClass:"eventNameDisplayInput",attrs:{placeholder:"请输入...",autofocus:"autofocus","allow-clear":""},on:{change:function(e){return t.getFocus1("getFocus"+a)}},model:{value:t.form.zhibiaoArr[a].eventNameDisplay,callback:function(e){t.$set(t.form.zhibiaoArr[a],"eventNameDisplay",e)},expression:"form.zhibiaoArr[index].eventNameDisplay"}})],2)],1),t._v(" "),n("el-row",{staticStyle:{"padding-top":"5px"},attrs:{span:6}},[n("a-select",{staticStyle:{width:"75%"},attrs:{"dropdown-match-select-width":"","show-search":"","default-active-first-option":""},on:{change:function(e){return t.changeEventNameDisplay(a)}},model:{value:t.form.zhibiaoArr[a].eventName,callback:function(e){t.$set(t.form.zhibiaoArr[a],"eventName",e)},expression:"form.zhibiaoArr[index].eventName"}},t._l(t.metaEventList,(function(e,a,r){return n("a-select-option",{key:r,attrs:{value:e.event_name}},[t._v("\n "+t._s(""==e.show_name?e.event_name:e.show_name)+"\n ")])})),1)],1)],1)],1),t._v(" "),n("div",{staticClass:"filters_xwl"},[n("filter-where",{attrs:{"table-typ":"2","data-type-map":t.attrMap,options:t.eventAttrOptions},model:{value:t.form.zhibiaoArr[a].relation,callback:function(e){t.$set(t.form.zhibiaoArr[a],"relation",e)},expression:"form.zhibiaoArr[index].relation"}})],1)],1)]):t._e()})),0)]),t._v(" "),n("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[n("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 10px"}},[t._v("\n 全局筛选事件维度\n ")]),t._v(" "),n("filter-where",{attrs:{"data-type-map":t.attrMap,"table-typ":"2",options:t.eventAttrOptions},model:{value:t.form.whereFilter,callback:function(e){t.$set(t.form,"whereFilter",e)},expression:"form.whereFilter"}})],1),t._v(" "),n("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[n("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 10px"}},[t._v("\n 全局筛选用户维度\n ")]),t._v(" "),n("filter-where",{attrs:{"data-type-map":t.attrMap,"table-typ":"1",options:t.userAttrOptions},model:{value:t.form.whereFilterByUser,callback:function(e){t.$set(t.form,"whereFilterByUser",e)},expression:"form.whereFilterByUser"}})],1),t._v(" "),n("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[n("filter-user-group",{model:{value:t.form.userGroup,callback:function(e){t.$set(t.form,"userGroup",e)},expression:"form.userGroup"}})],1)]),t._v(" "),n("div",{staticStyle:{width:"100%",height:"50px","margin-bottom":"0px","z-index":"10000","border-top":"1px solid #f0f2f5",background:"white",display:"flex","align-items":"center","justify-content":"center"}},[n("add-report-table",{staticStyle:{width:"200px",height:"50px","line-height":"50px",margin:"0px auto"},attrs:{"rt-type":Number(2),name:t.currentReportTable.name,remark:t.currentReportTable.remark,data:this.form},on:{go:t.go}})],1)])]),t._v(" "),n("template",{slot:"paneR"},[n("a-spin",{attrs:{tip:"计算中...",spinning:t.spinning}},[n("div",{staticClass:"spin-content"},[t.retentionResShow?n("retention-result",{ref:"retentionRes",staticStyle:{padding:"20px"},attrs:{"window-time":t.form.windowTime,"table-header":t.tableHeader,"retention-res":t.retentionRes},on:{changeWindowTime:t.changeWindowTime,go:t.go},model:{value:t.form.date,callback:function(e){t.$set(t.form,"date",e)},expression:"form.date"}}):t._e()],1)])],1)],2)],1)])},r=[],i=(n("7f7f"),n("c5f6"),n("2d63")),o=n("c80c"),s=(n("96cf"),n("3b8d")),c=n("2ef0"),l=n("c1df"),u=n.n(l),d=n("94b0"),p=n("815e"),f={name:"Retention",components:{FilterWhere:function(){return n.e("chunk-454df18e").then(n.bind(null,"0c2e"))},FilterGroup:function(){return n.e("chunk-6f38e150").then(n.bind(null,"87d8"))},RetentionResult:function(){return Promise.all([n.e("chunk-2d3eea4a"),n.e("chunk-35e7ccdd")]).then(n.bind(null,"b7b1"))},ReportTableList:function(){return n.e("chunk-0c3cd06a").then(n.bind(null,"4353"))},AddReportTable:function(){return n.e("chunk-74bbab2d").then(n.bind(null,"9327b"))},FilterUserGroup:function(){return n.e("chunk-44b49fce").then(n.bind(null,"c3b4"))}},data:function(){return{currentReportTable:{name:"",remark:""},spinning:!1,drawerShow:!1,tableHeader:[],retentionRes:[],retentionResShow:!0,prevCount:0,metaEventList:[],userAttr:[],eventAttr:[],reportTableName:"",form:{zhibiaoArr:[],groupBy:[],whereFilter:{filterType:"COMPOUND",filts:[],relation:"且"},whereFilterByUser:{filterType:"COMPOUND",filts:[],relation:"且"},windowTime:1,windowTimeFormat:"天",date:[u()().startOf("day").subtract(1,"days").format("YYYY-MM-DD"),u()().startOf("day").subtract(1,"days").format("YYYY-MM-DD")]},eventAttrOptions:[],allAttrOptions:[],userAttrOptions:[],attrMap:[],debounceHandleSizeChange:void 0}},beforeMount:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.initReportData();case 2:this.debounceHandleSizeChange=Object(c["debounce"])(this.refreshRes,500);case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){this.init()},methods:{download:function(){this.$refs["retentionRes"].download("全量数据")},changeWindowTime:function(t,e){this.form.windowTime=t,this.form.windowTimeFormat=e},refreshRes:function(){var t=this;this.$nextTick((function(){t.retentionResShow=!0}))},onResize:function(){this.retentionResShow=!1,this.debounceHandleSizeChange()},changeEventNameDisplay:function(t){var e,n="",a=Object(i["a"])(this.metaEventList);try{for(a.s();!(e=a.n()).done;){var r=e.value;r.event_name==this.form.zhibiaoArr[t].eventName&&(n=""==r.show_name?r.event_name:r.show_name)}}catch(o){a.e(o)}finally{a.f()}this.form.zhibiaoArr[t].eventNameDisplay=n},initReportData:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){var e,n;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this.$route.params.id,":id"==e||0==Number(e)){t.next=14;break}return t.next=4,Object(p["g"])({id:Number(e),appid:this.$store.state.baseData.EsConnectID});case 4:if(n=t.sent,0==n.code){t.next=8;break}return this.$message({offset:60,type:"error",message:n.msg}),t.abrupt("return");case 8:this.reportTableName=n.data.name,this.currentReportTable.name=n.data.name,this.currentReportTable.remark=n.data.remark,this.form=JSON.parse(n.data.data),this.form.date=[u()().startOf("day").subtract(1,"days").format("YYYY-MM-DD"),u()().startOf("day").subtract(1,"days").format("YYYY-MM-DD")],this.go();case 14:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),init:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getMetaEventList();case 2:0==this.form.zhibiaoArr.length&&(this.addZhibiao(),this.addZhibiao());case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getMetaEventList:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){var e,n,a,r,s,c,l,u,p,f,h,m,b;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(d["c"])({appid:this.$store.state.baseData.EsConnectID});case 2:if(e=t.sent,0==e.code){t.next=6;break}return this.$message({type:"error",offset:60,message:e.msg}),t.abrupt("return");case 6:if(this.metaEventList=e.data.event_name_list,n=e.data.attributeMap,a=[],r=[],s=[],this.attrMap=[],this.attrMap=n,c={label:"事件",options:[]},l={label:"用户",options:[]},n.hasOwnProperty("2")){u=Object(i["a"])(n["2"]);try{for(u.s();!(p=u.n()).done;)f=p.value,c.options.push({value:f.attribute_name,label:""==f.show_name?f.attribute_name:f.show_name})}catch(o){u.e(o)}finally{u.f()}}if(n.hasOwnProperty("1")){h=Object(i["a"])(n["1"]);try{for(h.s();!(m=h.n()).done;)b=m.value,l.options.push({value:b.attribute_name,label:""==b.show_name?b.attribute_name:b.show_name})}catch(o){h.e(o)}finally{h.f()}}r.push(c),s.push(l),a.push(c,l),this.userAttrOptions=s,this.eventAttrOptions=r,this.allAttrOptions=a;case 23:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),moment:u.a,addZhibiao:function(){this.form.zhibiaoArr.length>=30||this.form.zhibiaoArr.push({eventName:this.metaEventList[0].event_name,eventNameDisplay:""!=this.metaEventList[0].show_name?this.metaEventList[0].show_name:this.metaEventList[0].event_name,relation:{filterType:"COMPOUND",filts:[],relation:"且"}})},getFocus1:function(t){this.$nextTick((function(){this.$refs[t][0].focus()}))},go:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){var e,n,a=this;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.retentionResShow=!1,this.spinning=!0,e=this.form,e["appid"]=this.$store.state.baseData.EsConnectID,t.next=6,Object(d["f"])(e);case 6:n=t.sent,0!=n.code?(this.$message({type:"error",offset:60,message:n.msg}),this.retentionRes=[]):this.retentionRes=n.data.alldata,this.spinning=!1,this.$nextTick((function(){a.retentionResShow=!0}));case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}},h=f,m=(n("22af"),n("d2d0"),n("2877")),b=Object(m["a"])(h,a,r,!1,null,"4d1c8a44",null);e["default"]=b.exports},"815e":function(t,e,n){"use strict";n.d(e,"m",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"j",(function(){return d})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return f})),n.d(e,"i",(function(){return h})),n.d(e,"d",(function(){return m})),n.d(e,"c",(function(){return b})),n.d(e,"b",(function(){return v})),n.d(e,"p",(function(){return w})),n.d(e,"o",(function(){return y})),n.d(e,"n",(function(){return _}));var a=n("b775"),r="/api/pannel/";function i(t){return Object(a["a"])({url:r+"ReportTableList",method:"post",data:t})}function o(t){return Object(a["a"])({url:r+"DeleteReportTableByID",method:"post",data:t})}function s(t){return Object(a["a"])({url:r+"AddReportTable",method:"post",data:t})}function c(t){return Object(a["a"])({url:r+"FindNameCount",method:"post",data:t})}function l(t){return Object(a["a"])({url:r+"FindRtById",method:"post",data:t})}function u(t){return Object(a["a"])({url:r+"GetPannelList",method:"post",data:t})}function d(t){return Object(a["a"])({url:r+"NewDir",method:"post",data:t})}function p(t){return Object(a["a"])({url:r+"NewPannel",method:"post",data:t})}function f(t){return Object(a["a"])({url:r+"Rename",method:"post",data:t})}function h(t){return Object(a["a"])({url:r+"MovePannel2Dir",method:"post",data:t})}function m(t){return Object(a["a"])({url:r+"DeletePannel",method:"post",data:t})}function b(t){return Object(a["a"])({url:r+"DeleteDir",method:"post",data:t})}function v(t){return Object(a["a"])({url:r+"CopyPannel",method:"post",data:t})}function w(t){return Object(a["a"])({url:r+"UpdatePannelRt",method:"post",data:t})}function y(t){return Object(a["a"])({url:r+"UpdatePannelManager",method:"post",data:t})}function _(t){return Object(a["a"])({url:r+"RtListByAppid",method:"post",data:t})}},"94b0":function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"a",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"i",(function(){return m}));var a=n("b775"),r="/api/analysis/";function i(t){return Object(a["a"])({url:r+"GetConfigs",method:"post",data:t})}function o(t){return Object(a["a"])({url:r+"LoadPropQuotas",method:"post",data:t})}function s(t){return Object(a["a"])({url:r+"GetValues",method:"post",data:t})}function c(t){return Object(a["a"])({url:r+"FunnelList",method:"post",data:t})}function l(t){return Object(a["a"])({url:r+"RetentionList",method:"post",data:t})}function u(t){return Object(a["a"])({url:r+"TraceList",method:"post",data:t})}function d(t){return Object(a["a"])({url:r+"UserAttrList",method:"post",data:t})}function p(t){return Object(a["a"])({url:r+"EventList",method:"post",data:t})}function f(t){return Object(a["a"])({url:r+"UserList",method:"post",data:t})}function h(t){return Object(a["a"])({url:r+"UserEventDetailList",method:"post",data:t})}function m(t){return Object(a["a"])({url:r+"UserEventCountList",method:"post",data:t})}},bdfc:function(t,e,n){},d2d0:function(t,e,n){"use strict";n("1985")}}]); |