1 line
5.6 KiB
JavaScript
1 line
5.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e044625"],{2:function(t,e){},"2cc7":function(t,e,a){},3:function(t,e){},4:function(t,e){},7237: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()],1)]),t._v(" "),[t.showTable?a("div",[t.tableData.length>0?a("div",[t.g2Show?a("trace-sankey",{attrs:{"chart-data":t.traceChartsRes}}):t._e()],1):t._e()]):t._e(),t._v(" "),t.showCharts?a("div",[t.tableData.length<=0?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):a("div",{staticStyle:{"margin-top":"20px"}},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"300px"},attrs:{placeholder:"输入关键字进行过滤",clearable:""},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}}),t._v(" "),t.tableShow?a("page-table",{ref:"pagetable",staticStyle:{"margin-top":"20px"},attrs:{input:t.input,limit:Number(10),"table-list":t.tableData,"table-info":t.tableInfo}},[a("el-table-column",{attrs:{slot:"operate",label:"路径",align:"center",sortable:"",prop:"trace"},slot:"operate"}),t._v(" "),a("el-table-column",{attrs:{slot:"operate",label:"人数",width:"100",align:"center",sortable:"",prop:"user_count"},slot:"operate",scopedSlots:t._u([{key:"default",fn:function(e){return[a("a",{staticStyle:{color:"#6bb8ff"},on:{click:function(a){return t.drillDown(e.row.ui)}}},[t._v(" "+t._s(e.row.user_count))]),t._v(" "),a("add-user-group",{attrs:{uid:e.row.ui}})]}}],null,!1,357144926)}),t._v(" "),a("el-table-column",{attrs:{slot:"operate",label:"比例",width:"100",align:"center",sortable:""},slot:"operate",scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s((100*Number(e.row.user_count/t.allUserNum)).toFixed(2))+"%\n ")]}}],null,!1,2794885717)})],1):t._e()],1)]):t._e()]],2)])])},i=[],r=(a("ac6a"),a("5df3"),a("f400"),a("2d63")),s=a("989b"),l={name:"RetentionResult",components:{PageTable:function(){return a.e("chunk-b022bae4").then(a.bind(null,"e94a"))},Date:function(){return a.e("chunk-2d213cc6").then(a.bind(null,"ade2"))},TraceSankey:function(){return a.e("chunk-22c1490a").then(a.bind(null,"06b5"))},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:[]},traceTableRes:{type:Array,default:[]},traceChartsRes:{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,tableInfo:[{slot:"operate"}],chartType:1,showList:[],tableData:[],chartData:[],allUserNum:0}},computed:{},watch:{value:{deep:!0,handler:function(){var t=this;this.dateShow=!1,this.$nextTick((function(){t.dateShow=!0}))}}},beforeMount:function(){this.init()},methods:{drillDown:function(t){console.log("ui",t),this.$store.dispatch("baseData/SETUI",t),this.$router.push({path:"/user-analysis/user_list"})},rewriteNodeName:function(t,e){return"".concat(t,"_").concat(e)},download:function(t){Object(s["a"])(this,"pagetable","智能路径分析:".concat(t))},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")},initTableData:function(){this.allUserNum=0;var t,e=Object(r["a"])(this.traceTableRes);try{for(e.s();!(t=e.n()).done;){var a=t.value;this.allUserNum=this.allUserNum+a.user_count}}catch(n){e.e(n)}finally{e.f()}this.tableData=this.traceTableRes},initChartData:function(){if(this.chartData=[],!(this.traceChartsRes.length<=0)){var t=[],e=[],a=new Map;for(var n in this.traceChartsRes){var i=this.traceChartsRes[n];a.set(i["event"][0],1),a.set(i["event"][1],1),e.push({source:i["event"][0],target:i["event"][1],value:i["sum_user_count"]})}a.forEach((function(e,a,n){var i={name:a};t.push(i)})),this.chartData.push(t),this.chartData.push(e)}},init:function(){this.initTableData(),this.initChartData(),this.refreshData()}}},o=l,c=(a("9878"),a("2877")),u=Object(c["a"])(o,n,i,!1,null,"1113e638",null);e["default"]=u.exports},9878:function(t,e,a){"use strict";a("2cc7")},"989b":function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a("21a6"),i=a.n(n),r=a("1146"),s=a.n(r);function l(t,e,a){try{var n=t.$refs[e].$el,r=n.querySelector(".el-table__fixed");r||(r=n);var l=s.a.utils.table_to_book(r,{raw:!0}),o=s.a.write(l,{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)}}},f400:function(t,e,a){"use strict";var n=a("c26b"),i=a("b39a"),r="Map";t.exports=a("e0b8")(r,(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=n.getEntry(i(this,r),t);return e&&e.v},set:function(t,e){return n.def(i(this,r),0===t?0:t,e)}},n,!0)}}]); |