bi/views/dist/static/js/chunk-1413a208.66e17d93.js
2025-05-22 16:27:39 +08:00

1 line
7.6 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1413a208"],{2:function(t,e){},2153:function(t,e,a){"use strict";a("439d")},3:function(t,e){},4:function(t,e){},"439d":function(t,e,a){},"989b":function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a("21a6"),i=a.n(n),l=a("1146"),s=a.n(l);function r(t,e,a){try{var n=t.$refs[e].$el,l=n.querySelector(".el-table__fixed");l||(l=n);var r=s.a.utils.table_to_book(l,{raw:!0}),o=s.a.write(r,{bookType:"xlsx",bookSST:!0,type:"array"});i.a.saveAs(new Blob([o],{type:"application/octet-stream"}),"".concat(a,".xlsx"))}catch(c){"undefined"!==typeof console&&console.error(c)}}},fd29: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",{staticClass:"right_res"},[a("div",[a("div",{staticClass:"app-container",staticStyle:{height:"100%",background:"white"}},[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"space-between"}},[a("div",{staticClass:"echartBox_title"},[t.dateShow?a("date",{on:{changeDate:t.filterDateCall},model:{value:t.filterDate,callback:function(e){t.filterDate=e},expression:"filterDate"}}):t._e(),t._v(" "),a("a-divider",{attrs:{type:"vertical"}}),t._v(" "),a("a-cascader",{staticStyle:{width:"160px"},attrs:{options:t.stepOptions,placeholder:"请选择步骤"},on:{change:t.changeStep},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}})],1),t._v(" "),a("div",{staticClass:"echartBox_title"})]),t._v(" "),t.showCharts?[t.g2Show&&t.showList.length>0?a("funnel-bar",{attrs:{"class-name":t.className,"chart-data":t.showList}}):a("div",{staticStyle:{background:"white !important",padding:"40px",width:"300px",height:"300px","text-align":"center",margin:"0px auto"}},[a("a-empty",[a("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.emptyText))])])],1)]:t._e()],2),t._v(" "),t.showTable?[t.g2Show?a("div",{staticStyle:{background:"white"}},[a("div",{staticClass:"filter-container",staticStyle:{background:"white",padding:"20px"}},[a("el-radio-group",{staticClass:"filter-item",model:{value:t.tableType,callback:function(e){t.tableType=e},expression:"tableType"}},[a("el-radio-button",{attrs:{label:"conversion"}},[t._v("转化")]),t._v(" "),a("el-radio-button",{attrs:{label:"drain"}},[t._v("流失")])],1),t._v(" "),a("el-input",{staticClass:"filter-item",staticStyle:{width:"300px"},attrs:{placeholder:"输入关键字进行过滤"},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}})],1),t._v(" "),""!=t.tableTitle.toString()?a("div",{staticStyle:{width:"100%",padding:"20px",background:"white"}},[a("div",{staticStyle:{width:"300px","text-align":"center",margin:"0px auto","font-weight":"bolder","font-size":"20px",color:"#909399"}},[t._v("\n "+t._s(t.tableTitle.toString())+"\n ")])]):t._e(),t._v(" "),t.tableShow?a("page-table",{ref:"pagetable",staticStyle:{padding:"20px"},attrs:{"table-ref":"table",input:t.input,"show-title":t.tableTitle.toString(),"table-list":t.tableData,"table-info":t.tableInfo}},[a("el-table-column",{attrs:{slot:"operate",label:t.tableHeaderShow[0],align:"center",sortable:"",prop:"groupKey"},slot:"operate"}),t._v(" "),t._l(t.tableHeaderShow.slice(1,t.tableHeaderShow.length),(function(e,n,i){return a("el-table-column",{key:i,attrs:{slot:"operate",label:e,align:"center",sortable:""},slot:"operate",scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center",width:"73%","max-width":"92px",margin:"auto"}},[a("div",[a("a",{staticStyle:{color:"#6bb8ff"},on:{click:function(a){return t.drillDown(e.row.countArr[n].ui)}}},[t._v("        "+t._s(e.row.countArr[n].count)+"  ")]),t._v(" "),a("add-user-group",{attrs:{uid:e.row.countArr[n].ui}})],1),t._v(" "),a("div",{staticStyle:{"text-align":"center"}},["conversion"==t.tableType?[t._v(t._s(e.row.countArr[n].conversionScale)+"%  \n ")]:[t._v(t._s(e.row.countArr[n].washScale)+"%  ")]],2)])]}}],null,!0)})}))],2):t._e()],1):t._e()]:t._e()],2)])},i=[],l=(a("ac6a"),a("75fc")),s=(a("c5f6"),a("2d63")),r=a("989b"),o={name:"FunnelResult",components:{FunnelBar:function(){return a.e("chunk-0cd1fd34").then(a.bind(null,"fb01"))},PageTable:function(){return a.e("chunk-b022bae4").then(a.bind(null,"e94a"))},Date:function(){return a.e("chunk-2d213cc6").then(a.bind(null,"ade2"))},AddUserGroup:function(){return a.e("chunk-322ba4e8").then(a.bind(null,"7d94"))}},props:{className:{type:String,default:"charts"},emptyText:{type:String,default:"选择完分析条件后,请点击“计算”"},value:{type:Array,default:[]},funnelRes:{type:Array,default:[]},groupData:{type:Object,default:{}},tableHeader:{type:Array,default:[]},showCharts:{type:Boolean,default:!0},showTable:{type:Boolean,default:!0}},data:function(){return{dateShow:!0,input:"",tableHeaderShow:[],groupDataShow:{},g2Show:!0,tableShow:!0,filterDate:this.value,step:[-1],stepOptions:[],tableType:"conversion",tableInfo:[{slot:"operate"}],chartType:0,showList:[],tableData:[]}},computed:{tableTitle:function(){return"全步骤(共".concat(this.showList.length,"步)的用户").concat("conversion"==this.tableType?"转化率":"流失率")}},watch:{funnelRes:{deep:!0,handler:function(){this.init(),this.changeStep()}},groupData:{deep:!0,handler:function(){this.init(),this.changeStep()}},value:{deep:!0,handler:function(){var t=this;this.dateShow=!1,this.$nextTick((function(){t.dateShow=!0}))}}},mounted:function(){this.init(),this.changeStep()},methods:{drillDown:function(t){this.$store.dispatch("baseData/SETUI",t),this.$router.push({path:"/user-analysis/user_list"})},download:function(t){Object(r["a"])(this,"pagetable","漏斗分析:".concat(t))},NaN2Zero:function(t){return isNaN(t)?0:t},changeTable:function(){var t=[];for(var e in this.groupDataShow){var a,n=[],i=Object(s["a"])(this.groupDataShow[e]);try{for(i.s();!(a=i.n()).done;){var l=a.value;n.push({count:l.count,ui:l.ui,conversionScale:this.NaN2Zero(l.conversionScale),washScale:this.NaN2Zero(l.washScale)})}}catch(r){i.e(r)}finally{i.f()}t.push({groupKey:e,countArr:n})}this.tableData=t},changeStep:function(){switch(this.step.length){case 0:this.step=[-1];case 1:this.showList=JSON.parse(JSON.stringify(this.funnelRes)),this.groupDataShow=JSON.parse(JSON.stringify(this.groupData)),this.tableHeaderShow=JSON.parse(JSON.stringify(this.tableHeader));break;case 2:var t,e=this.step[0],a=this.step[1],n=[],i=Object(s["a"])(this.funnelRes);try{for(i.s();!(t=i.n()).done;){var l=t.value;l.level_index>=e&&l.level_index<=a&&n.push(l)}}catch(v){i.e(v)}finally{i.f()}var r={};for(var o in this.groupData){var c,u=[],h=Object(s["a"])(this.groupData[o]);try{for(h.s();!(c=h.n()).done;){var p=c.value;p.level_index>=e&&p.level_index<=a&&u.push(p)}}catch(v){h.e(v)}finally{h.f()}r[o]=u}this.groupDataShow=r,this.showList=n;var d=this.tableHeader[0],f=[d];for(var b in this.tableHeader)b>=e&&b<=a&&f.push(this.tableHeader[b]);this.tableHeaderShow=f}this.changeTable(),this.refreshData()},refreshData:function(){var t=this;this.g2Show=!1,this.tableShow=!1,this.$nextTick((function(){t.g2Show=!0,t.tableShow=!0}))},filterDateCall:function(t){this.filterDate=t,this.$emit("input",this.filterDate),this.$emit("go")},init:function(){var t=[{value:-1,label:"全步骤"}];for(var e in console.log(this.funnelRes),this.funnelRes){if(e==this.funnelRes.length-1)break;var a=Number(e)+1,n={value:a,label:"步骤"+a,children:[]},i=Number(a)+1;for(var s in Object(l["a"])(new Array(this.funnelRes.length-a).keys()))n.children.push({value:i,label:"步骤"+i}),i++;t.push(n)}this.stepOptions=t}}},c=o,u=(a("2153"),a("2877")),h=Object(u["a"])(c,n,i,!1,null,"2dadd86a",null);e["default"]=h.exports}}]);