1 line
26 KiB
JavaScript
1 line
26 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7a7a844d"],{"09b6":function(t,e,a){},"2b77":function(t,e,a){"use strict";a("7998")},6046:function(t,e,a){"use strict";a("09b6")},7998:function(t,e,a){},"815e":function(t,e,a){"use strict";a.d(e,"m",(function(){return i})),a.d(e,"e",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"f",(function(){return l})),a.d(e,"g",(function(){return c})),a.d(e,"h",(function(){return u})),a.d(e,"j",(function(){return p})),a.d(e,"k",(function(){return d})),a.d(e,"l",(function(){return h})),a.d(e,"i",(function(){return f})),a.d(e,"d",(function(){return m})),a.d(e,"c",(function(){return b})),a.d(e,"b",(function(){return v})),a.d(e,"p",(function(){return _})),a.d(e,"o",(function(){return w})),a.d(e,"n",(function(){return y}));var n=a("b775"),r="/api/pannel/";function i(t){return Object(n["a"])({url:r+"ReportTableList",method:"post",data:t})}function o(t){return Object(n["a"])({url:r+"DeleteReportTableByID",method:"post",data:t})}function s(t){return Object(n["a"])({url:r+"AddReportTable",method:"post",data:t})}function l(t){return Object(n["a"])({url:r+"FindNameCount",method:"post",data:t})}function c(t){return Object(n["a"])({url:r+"FindRtById",method:"post",data:t})}function u(t){return Object(n["a"])({url:r+"GetPannelList",method:"post",data:t})}function p(t){return Object(n["a"])({url:r+"NewDir",method:"post",data:t})}function d(t){return Object(n["a"])({url:r+"NewPannel",method:"post",data:t})}function h(t){return Object(n["a"])({url:r+"Rename",method:"post",data:t})}function f(t){return Object(n["a"])({url:r+"MovePannel2Dir",method:"post",data:t})}function m(t){return Object(n["a"])({url:r+"DeletePannel",method:"post",data:t})}function b(t){return Object(n["a"])({url:r+"DeleteDir",method:"post",data:t})}function v(t){return Object(n["a"])({url:r+"CopyPannel",method:"post",data:t})}function _(t){return Object(n["a"])({url:r+"UpdatePannelRt",method:"post",data:t})}function w(t){return Object(n["a"])({url:r+"UpdatePannelManager",method:"post",data:t})}function y(t){return Object(n["a"])({url:r+"RtListByAppid",method:"post",data:t})}},"94b0":function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"e",(function(){return o})),a.d(e,"d",(function(){return s})),a.d(e,"b",(function(){return l})),a.d(e,"f",(function(){return c})),a.d(e,"g",(function(){return u})),a.d(e,"h",(function(){return p})),a.d(e,"a",(function(){return d})),a.d(e,"k",(function(){return h})),a.d(e,"j",(function(){return f})),a.d(e,"i",(function(){return m}));var n=a("b775"),r="/api/analysis/";function i(t){return Object(n["a"])({url:r+"GetConfigs",method:"post",data:t})}function o(t){return Object(n["a"])({url:r+"LoadPropQuotas",method:"post",data:t})}function s(t){return Object(n["a"])({url:r+"GetValues",method:"post",data:t})}function l(t){return Object(n["a"])({url:r+"FunnelList",method:"post",data:t})}function c(t){return Object(n["a"])({url:r+"RetentionList",method:"post",data:t})}function u(t){return Object(n["a"])({url:r+"TraceList",method:"post",data:t})}function p(t){return Object(n["a"])({url:r+"UserAttrList",method:"post",data:t})}function d(t){return Object(n["a"])({url:r+"EventList",method:"post",data:t})}function h(t){return Object(n["a"])({url:r+"UserList",method:"post",data:t})}function f(t){return Object(n["a"])({url:r+"UserEventDetailList",method:"post",data:t})}function m(t){return Object(n["a"])({url:r+"UserEventCountList",method:"post",data:t})}},c024:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[a("div",{staticClass:"content_xwl"},[a("div",{staticClass:"header_xwl",staticStyle:{background:"white"}},[a("div",{staticClass:"root_xwl"},[a("div",{staticClass:"main_xwl"},[a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"right"}},[a("template",{slot:"title"},[a("span",[t._v("分析某段时间内,某个事件或事件属性的整体趋势情况")])]),t._v(" "),a("span",{staticClass:"title_xwl",staticStyle:{color:"#202d3f"}},[t._v(" 事件分析 "),a("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(" "),a("div",{staticClass:"actions_xwl"},[a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[a("template",{slot:"title"},[a("span",[t._v("以页面格式下载全量数据")])]),t._v(" "),a("a-button",{staticClass:"actions_xwl_btn",attrs:{type:"link",icon:"download"},on:{click:t.download}})],2),t._v(" "),a("report-table-list",{attrs:{rt_type:Number(1)}})],1)])]),t._v(" "),a("split-pane",{attrs:{"min-percent":0,"default-percent":28,split:"vertical"},on:{resize:t.onResize}},[a("template",{slot:"paneL"},[a("div",{staticStyle:{height:"100%",width:"100%",display:"inline-block","vertical-align":"top",background:"white"},attrs:{id:"scollL"}},[a("div",{staticStyle:{width:"100%",height:"calc(100% - 140px)","overflow-x":"hidden","overflow-y":"auto"}},[a("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[a("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 12px"}},[t._v("\n 分析指标\n ")]),t._v(" "),a("div",{staticClass:"xwl_main"},[a("draggable",{attrs:{handle:".drageTag","chosen-class":"chosen",animation:"1000"},model:{value:t.form.zhibiaoArr,callback:function(e){t.$set(t.form,"zhibiaoArr",e)},expression:"form.zhibiaoArr"}},t._l(t.form.zhibiaoArr,(function(e,n){return a("div",{directives:[{name:"drag",rawName:"v-drag"}]},[1==e.typ?a("div",{staticClass:"row___xwl",staticStyle:{padding:"10px"}},[a("el-row",[a("el-col",{attrs:{span:2}},[a("el-tag",{staticClass:"drageTag",attrs:{type:"warning"}},[t._v(t._s(n+1))])],1),t._v(" "),a("el-col",{attrs:{span:18}},[a("el-row",{staticClass:"zhibiao",attrs:{span:15}},[a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"topLeft"}},[a("template",{slot:"title"},[a("span",[t._v("点击修改指标名称")])]),t._v(" "),a("a-input",{ref:("getFocus"+n).toString(),refInFor:!0,staticClass:"eventNameDisplayInput",attrs:{size:"small",placeholder:"请输入...",autofocus:"autofocus","allow-clear":""},model:{value:t.form.zhibiaoArr[n].eventNameDisplay,callback:function(e){t.$set(t.form.zhibiaoArr[n],"eventNameDisplay",e)},expression:"form.zhibiaoArr[index].eventNameDisplay"}})],2)],1),t._v(" "),a("el-row",{staticStyle:{"padding-top":"10px"},attrs:{span:6}},[a("a-select",{staticStyle:{width:"40%"},attrs:{size:"default","dropdown-match-select-width":"","show-search":"","default-active-first-option":""},on:{change:function(e){return t.changeEventNameDisplay(n)}},model:{value:t.form.zhibiaoArr[n].eventName,callback:function(e){t.$set(t.form.zhibiaoArr[n],"eventName",e)},expression:"form.zhibiaoArr[index].eventName"}},t._l(t.metaEventList,(function(e,n,r){return a("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),t._v(" "),a("el-tag",{attrs:{type:"warning"}},[t._v("的")]),t._v(" "),a("count-select",{attrs:{options:t.form.zhibiaoArr[n].attrOptions,placeholder:"请筛选维度"},model:{value:t.form.zhibiaoArr[n].selectAttr,callback:function(e){t.$set(t.form.zhibiaoArr[n],"selectAttr",e)},expression:"form.zhibiaoArr[index].selectAttr"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:4}},[a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[a("template",{slot:"title"},[a("span",[t._v("复制指标")])]),t._v(" "),a("a-button",{staticClass:"right_icon_zhibiao",staticStyle:{"margin-left":"4px"},attrs:{type:"link",icon:"copy"},on:{click:function(e){return t.copyZhibiao(n)}}})],2),t._v(" "),a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[a("template",{slot:"title"},[a("span",[t._v("删除指标")])]),t._v(" "),a("a-button",{staticClass:"right_icon_zhibiao",staticStyle:{"margin-left":"4px"},attrs:{type:"link",icon:"delete"},nativeOn:{click:function(e){return t.form.zhibiaoArr.splice(n,1)}}})],2)],1)],1),t._v(" "),a("div",{staticClass:"filters_xwl"},[a("filter-where",{attrs:{"font-color":"#ffba00","table-typ":"2","data-type-map":t.attrMap,options:t.eventAttrOptions},model:{value:t.form.zhibiaoArr[n].relation,callback:function(e){t.$set(t.form.zhibiaoArr[n],"relation",e)},expression:"form.zhibiaoArr[index].relation"}})],1)],1):t._e(),t._v(" "),2==e.typ?a("div",{staticClass:"row___xwl",staticStyle:{padding:"10px"}},[a("el-row",[a("el-col",{attrs:{span:2}},[a("el-tag",{staticClass:"drageTag"},[t._v(t._s(n+1))])],1),t._v(" "),a("el-col",{attrs:{span:18}},[a("el-row",{staticClass:"zhibiao",attrs:{span:15}},[a("el-col",{attrs:{span:13}},[a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"topLeft"}},[a("template",{slot:"title"},[a("span",[t._v("点击修改公式名称")])]),t._v(" "),a("a-input",{ref:("getFocus"+n).toString(),refInFor:!0,staticClass:"eventNameDisplayInput",attrs:{size:"small",placeholder:"请输入...",autofocus:"autofocus","allow-clear":""},on:{change:function(e){return t.getFocus1("getFocus"+n)}},model:{value:t.form.zhibiaoArr[n].eventNameDisplay,callback:function(e){t.$set(t.form.zhibiaoArr[n],"eventNameDisplay",e)},expression:"form.zhibiaoArr[index].eventNameDisplay"}})],2)],1),t._v(" "),a("el-col",{attrs:{span:1}},[a("a-select",{staticStyle:{width:"120px"},attrs:{size:"small","default-value":"1"},model:{value:t.form.zhibiaoArr[n].scaleType,callback:function(e){t.$set(t.form.zhibiaoArr[n],"scaleType",e)},expression:"form.zhibiaoArr[index].scaleType"}},[a("a-select-option",{attrs:{value:"1"}},[t._v("\n 两位小数\n ")]),t._v(" "),a("a-select-option",{attrs:{value:"2"}},[t._v("\n 百分比\n ")]),t._v(" "),a("a-select-option",{attrs:{value:"3"}},[t._v("\n 取整\n ")])],1)],1)],1),t._v(" "),a("el-row",{staticStyle:{"padding-top":"10px"},attrs:{span:6}},[a("a-select",{staticStyle:{width:"120px"},attrs:{size:"default","dropdown-match-select-width":"","show-search":"","default-active-first-option":""},on:{change:function(e){return t.changeEventNameDisplay(n,"one")}},model:{value:t.form.zhibiaoArr[n]["one"].eventName,callback:function(e){t.$set(t.form.zhibiaoArr[n]["one"],"eventName",e)},expression:"form.zhibiaoArr[index]['one'].eventName"}},t._l(t.metaEventList,(function(e,n,r){return a("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),t._v(" "),a("el-popover",{attrs:{placement:"right",trigger:"click"}},[a("filter-where",{attrs:{"table-typ":"2","data-type-map":t.attrMap,options:t.eventAttrOptions},model:{value:t.form.zhibiaoArr[n]["one"].relation,callback:function(e){t.$set(t.form.zhibiaoArr[n]["one"],"relation",e)},expression:"form.zhibiaoArr[index]['one'].relation"}}),t._v(" "),a("el-button",{attrs:{slot:"reference",type:"text",icon:"el-icon-data-board"},slot:"reference"})],1),t._v(" "),a("el-tag",[t._v("的")]),t._v(" "),a("count-select",{attrs:{options:t.form.zhibiaoArr[n]["one"].attrOptions,placeholder:"请筛选维度"},model:{value:t.form.zhibiaoArr[n]["one"].selectAttr,callback:function(e){t.$set(t.form.zhibiaoArr[n]["one"],"selectAttr",e)},expression:"form.zhibiaoArr[index]['one'].selectAttr"}}),t._v(" "),a("a-select",{staticStyle:{width:"60px"},attrs:{size:"small"},model:{value:t.form.zhibiaoArr[n].operate,callback:function(e){t.$set(t.form.zhibiaoArr[n],"operate",e)},expression:"form.zhibiaoArr[index].operate"}},[a("a-select-option",{attrs:{value:"plus"}},[t._v("\n 加\n ")]),t._v(" "),a("a-select-option",{attrs:{value:"minus"}},[t._v("\n 减\n ")]),t._v(" "),a("a-select-option",{attrs:{value:"multiply"}},[t._v("\n 乘\n ")]),t._v(" "),a("a-select-option",{attrs:{value:"divide"}},[t._v("\n 除\n ")])],1),t._v(" "),a("a-select",{staticStyle:{width:"120px"},attrs:{size:"default","dropdown-match-select-width":"","show-search":"","default-active-first-option":""},model:{value:t.form.zhibiaoArr[n]["two"].eventName,callback:function(e){t.$set(t.form.zhibiaoArr[n]["two"],"eventName",e)},expression:"form.zhibiaoArr[index]['two'].eventName"}},t._l(t.metaEventList,(function(e,n,r){return a("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),t._v(" "),a("el-popover",{attrs:{placement:"right",trigger:"click"}},[a("filter-where",{attrs:{"table-typ":"2","data-type-map":t.attrMap,options:t.eventAttrOptions},model:{value:t.form.zhibiaoArr[n]["two"].relation,callback:function(e){t.$set(t.form.zhibiaoArr[n]["two"],"relation",e)},expression:"form.zhibiaoArr[index]['two'].relation"}}),t._v(" "),a("el-button",{attrs:{slot:"reference",type:"text",icon:"el-icon-data-board"},slot:"reference"})],1),t._v(" "),a("el-tag",[t._v("的")]),t._v(" "),a("count-select",{attrs:{options:t.form.zhibiaoArr[n]["two"].attrOptions,placeholder:"请筛选维度"},model:{value:t.form.zhibiaoArr[n]["two"].selectAttr,callback:function(e){t.$set(t.form.zhibiaoArr[n]["two"],"selectAttr",e)},expression:"form.zhibiaoArr[index]['two'].selectAttr"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:4}},[a("el-tooltip",{attrs:{content:"被除数不分组: "+t.form.zhibiaoArr[n].divisor_no_grouping,placement:"top"}},[a("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ff4949","active-value":!0,"inactive-value":!1},model:{value:t.form.zhibiaoArr[n].divisor_no_grouping,callback:function(e){t.$set(t.form.zhibiaoArr[n],"divisor_no_grouping",e)},expression:"form.zhibiaoArr[index].divisor_no_grouping"}})],1),t._v(" "),a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[a("template",{slot:"title"},[a("span",[t._v("复制公式")])]),t._v(" "),a("a-button",{staticClass:"right_icon",staticStyle:{"margin-left":"4px"},attrs:{type:"link",icon:"copy"},on:{click:function(e){return t.copyZhibiao(n)}}})],2),t._v(" "),a("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[a("template",{slot:"title"},[a("span",[t._v("删除公式")])]),t._v(" "),a("a-button",{staticClass:"right_icon",staticStyle:{"margin-left":"4px"},attrs:{type:"link",icon:"delete"},nativeOn:{click:function(e){return t.form.zhibiaoArr.splice(n,1)}}})],2)],1)],1)],1):t._e()])})),0)],1),t._v(" "),t.form.zhibiaoArr.length<30?a("div",{staticStyle:{"margin-top":"4px",padding:"0 12px"}},[a("span",{staticClass:"footadd___2D4YB",on:{click:function(e){return t.addZhibiao(1)}}},[a("a-icon",{attrs:{type:"plus"}}),t._v("\n 添加指标\n ")],1),t._v(" "),a("span",{staticClass:"footadd___2D4YB",on:{click:function(e){return t.addZhibiao(2)}}},[a("a-icon",{attrs:{type:"line-height"}}),t._v("\n 添加公式\n ")],1)]):t._e()]),t._v(" "),a("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[a("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 10px"}},[t._v("\n 全局筛选事件维度\n ")]),t._v(" "),a("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(" "),a("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[a("div",{staticStyle:{"line-height":"18px","font-weight":"bolder","font-size":"13px",padding:"10px 16px 10px"}},[t._v("\n 全局筛选用户维度\n ")]),t._v(" "),a("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(" "),a("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[a("filter-user-group",{model:{value:t.form.userGroup,callback:function(e){t.$set(t.form,"userGroup",e)},expression:"form.userGroup"}})],1),t._v(" "),a("div",{staticStyle:{width:"100%","padding-bottom":"8px","border-bottom":"1px solid #f0f2f5"}},[a("filter-group",{attrs:{limit:"20",options:t.eventAttrOptions},model:{value:t.form.groupBy,callback:function(e){t.$set(t.form,"groupBy",e)},expression:"form.groupBy"}})],1)]),t._v(" "),a("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"}},[a("add-report-table",{staticStyle:{width:"200px",height:"50px","line-height":"50px",margin:"0px auto"},attrs:{"rt-type":Number(1),name:t.currentReportTable.name,remark:t.currentReportTable.remark,data:this.form},on:{go:t.go}})],1)])]),t._v(" "),a("template",{slot:"paneR"},[a("a-spin",{attrs:{tip:"计算中...",spinning:t.spinning}},[a("div",{staticClass:"spin-content"},[t.eventResShow?a("event-result",{ref:"eventRes",staticStyle:{padding:"20px"},attrs:{"window-time-format":t.form.windowTimeFormat,"event-res":t.eventRes},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=(a("7f7f"),a("c5f6"),a("6b54"),a("2d63")),o=a("c80c"),s=(a("96cf"),a("3b8d")),l=a("2ef0"),c=a("b76a"),u=a.n(c),p=a("c1df"),d=a.n(p),h=a("94b0"),f=a("815e"),m={name:"Event",components:{CountSelect:function(){return a.e("chunk-789a40ee").then(a.bind(null,"37a72"))},FilterWhere:function(){return a.e("chunk-454df18e").then(a.bind(null,"0c2e"))},FilterGroup:function(){return a.e("chunk-6f38e150").then(a.bind(null,"87d8"))},ReportTableList:function(){return a.e("chunk-0c3cd06a").then(a.bind(null,"4353"))},AddReportTable:function(){return a.e("chunk-74bbab2d").then(a.bind(null,"9327b"))},EventResult:function(){return Promise.all([a.e("chunk-2d3eea4a"),a.e("chunk-7dfc0fdf")]).then(a.bind(null,"8a17"))},FilterUserGroup:function(){return a.e("chunk-44b49fce").then(a.bind(null,"c3b4"))},SmallSelect:function(){return a.e("chunk-0ed9d87a").then(a.bind(null,"c192"))},draggable:u.a},data:function(){return{reportTableName:"",currentReportTable:{name:"",remark:""},spinning:!1,drawerShow:!1,eventRes:{},eventResShow:!0,metaEventList:[],userAttr:[],eventAttr:[],form:{zhibiaoArr:[],groupBy:[],userGroup:[],whereFilter:{filterType:"COMPOUND",filts:[],relation:"且"},whereFilterByUser:{filterType:"COMPOUND",filts:[],relation:"且"},date:[d()().startOf("day").subtract(1,"days").format("YYYY-MM-DD"),d()().startOf("day").subtract(1,"days").format("YYYY-MM-DD")],windowTimeFormat:"按天"},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(l["debounce"])(this.refreshRes,500),this.init();case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{download:function(){this.$refs["eventRes"].download("全量数据")},refreshRes:function(){var t=this;this.$nextTick((function(){t.eventResShow=!0}))},changeWindowTime:function(t){this.form.windowTimeFormat=t,this.go()},onResize:function(){this.eventResShow=!1,this.debounceHandleSizeChange()},getLoadPropQuotas:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(e){var a,n,r,s,l,c,u;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(h["e"])({event_name:e,appid:this.$store.state.baseData.EsConnectID});case 2:if(a=t.sent,n=[{value:"默认",label:"默认",children:[{value:"A1",label:"总次数"},{value:"A2",label:"触发用户数"},{value:"A3",label:"人均次数"}]}],0==a.code){r=Object(i["a"])(a.data);try{for(r.s();!(s=r.n()).done;){for(u in l=s.value,c={value:l.attribute_name,label:l.show_name,children:[]},l.analysis)c.children.push({value:u.toString(),label:l.analysis[u]});n.push(c)}}catch(o){r.e(o)}finally{r.f()}}return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),changeEventNameDisplay:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(e,a){var n,r,s,l,c,u;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:n="",r=Object(i["a"])(this.metaEventList);try{for(r.s();!(s=r.n()).done;)l=s.value,c="",c=a?this.form.zhibiaoArr[e][a].eventName:this.form.zhibiaoArr[e].eventName,l.event_name==c&&(n=""==l.show_name?l.event_name:l.show_name)}catch(o){r.e(o)}finally{r.f()}return t.next=5,this.getLoadPropQuotas(a?this.form.zhibiaoArr[e][a].eventName:this.form.zhibiaoArr[e].eventName);case 5:u=t.sent,this.form.zhibiaoArr[e].attrOptions=u,this.form.zhibiaoArr[e].eventNameDisplay=n;case 8:case"end":return t.stop()}}),t,this)})));function e(e,a){return t.apply(this,arguments)}return e}(),initReportData:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){var e,a;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(f["g"])({id:Number(e),appid:this.$store.state.baseData.EsConnectID});case 4:if(a=t.sent,0==a.code){t.next=8;break}return this.$message({offset:60,type:"error",message:a.msg}),t.abrupt("return");case 8:this.reportTableName=a.data.name,this.currentReportTable.name=a.data.name,this.currentReportTable.remark=a.data.remark,this.form=JSON.parse(a.data.data),this.form.date=[d()().startOf("day").subtract(1,"days").format("YYYY-MM-DD"),d()().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(1);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,a,n,r,s,l,c,u,p,d,f,m,b;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(h["c"])({appid:this.$store.state.baseData.EsConnectID});case 2:if(e=t.sent,0==e.code){t.next=6;break}return this.$message({offset:60,type:"error",message:e.msg}),t.abrupt("return");case 6:if(this.metaEventList=e.data.event_name_list,a=e.data.attributeMap,n=[],r=[],s=[],this.attrMap=[],this.attrMap=a,l={label:"事件",options:[]},c={label:"用户",options:[]},a.hasOwnProperty("2")){u=Object(i["a"])(a["2"]);try{for(u.s();!(p=u.n()).done;)d=p.value,l.options.push({value:d.attribute_name,label:""==d.show_name?d.attribute_name:d.show_name})}catch(o){u.e(o)}finally{u.f()}}if(a.hasOwnProperty("1")){f=Object(i["a"])(a["1"]);try{for(f.s();!(m=f.n()).done;)b=m.value,c.options.push({value:b.attribute_name,label:""==b.show_name?b.attribute_name:b.show_name})}catch(o){f.e(o)}finally{f.f()}}r.push(l),s.push(c),n.push(l,c),this.userAttrOptions=s,this.eventAttrOptions=r,this.allAttrOptions=n;case 23:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),moment:d.a,addZhibiao:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(e){var a,n,r;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(this.form.zhibiaoArr.length>=30)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.getLoadPropQuotas(this.metaEventList[0].event_name);case 4:if(a=t.sent,!(this.metaEventList.length>0)){t.next=15;break}t.t0=e,t.next=1===t.t0?9:2===t.t0?13:15;break;case 9:return n={selectAttr:[],attrOptions:[],typ:1,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:"且"}},n["attrOptions"]=a,this.form.zhibiaoArr.push(n),t.abrupt("break",15);case 13:r={typ:2,scaleType:"1",operate:"divide",divisor_no_grouping:!0,eventNameDisplay:""!=this.metaEventList[0].show_name?this.metaEventList[0].show_name:this.metaEventList[0].event_name,one:{selectAttr:[],attrOptions:a,eventName:this.metaEventList[0].event_name,relation:{filterType:"COMPOUND",filts:[],relation:"且"}},two:{selectAttr:[],attrOptions:a,eventName:this.metaEventList[0].event_name,relation:{filterType:"COMPOUND",filts:[],relation:"且"}}},this.form.zhibiaoArr.push(r);case 15:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),copyZhibiao:function(t){if(!(this.form.zhibiaoArr.length>=30)){console.log("this.form.zhibiaoArr[index]",t);var e=JSON.parse(JSON.stringify(this.form.zhibiaoArr[t]));this.form.zhibiaoArr.splice(t,0,e)}},getFocus1:function(t){var e=this;this.$nextTick((function(){e.$refs[t][0].focus()}))},go:function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(){var e,a,n,r=this;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:for(a in this.spinning=!0,this.eventResShow=!1,e=JSON.parse(JSON.stringify(this.form)),e.zhibiaoArr)1==e.zhibiaoArr[a].typ?e.zhibiaoArr[a].attrOptions&&delete e.zhibiaoArr[a].attrOptions:2==e.zhibiaoArr[a].typ&&(e.zhibiaoArr[a]["one"].attrOptions&&delete e.zhibiaoArr[a]["one"].attrOptions,e.zhibiaoArr[a]["two"].attrOptions&&delete e.zhibiaoArr[a]["two"].attrOptions);return e["appid"]=this.$store.state.baseData.EsConnectID,t.next=7,Object(h["a"])(e);case 7:if(n=t.sent,0==n.code){t.next=14;break}return this.$message({offset:60,type:"error",message:n.msg}),this.eventRes={},this.spinning=!1,this.$nextTick((function(){r.eventResShow=!0})),t.abrupt("return");case 14:this.eventRes=n.data,this.spinning=!1,this.$nextTick((function(){r.eventResShow=!0}));case 17:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}},b=m,v=(a("6046"),a("2b77"),a("2877")),_=Object(v["a"])(b,n,r,!1,null,"3e45d0ee",null);e["default"]=_.exports}}]); |