You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-2508.e8f4a34a.js

1 line
4.7 KiB

3 years ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2508"],{"9kPm":function(t,e,i){"use strict";e.a={data:function(){return{showTable:!0}},methods:{mixinSortFn:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ascending";if("[object Array]"!==Object.prototype.toString.call(t))return[];if(!e)return t;t.sort(function(t,o){if(t[e]===o[e])return 0;var a=isNaN(Number(t[e]))||isNaN(Number(o[e]))?t[e]<o[e]:Number(t[e])<Number(o[e]);return"descending"===i?a?1:-1:a?-1:1})}}}},AfsK:function(t,e,i){"use strict";i.r(e);var o=i("31UX"),a=i("9kPm"),n=i("MT78"),s=i.n(n),r=i("JgLm"),l={name:"CustomerRecordModeStatistics",mixins:[o.a,a.a],data:function(){return{loading:!1,showType:"pie",postParams:{},axisOption:null,pieOption:null,list:[],fieldList:[{field:"category",name:"跟进方式"},{field:"recordNum",name:"个数"},{field:"proportion",name:"占比(%"}]}},computed:{},mounted:function(){this.initPie(),this.initAxis()},methods:{showTypeChange:function(t){this.showType=t,this.refreshChartInfo()},refreshChartInfo:function(){"pie"!=this.showType?(this.axisOption.series[0].type=this.showType,this.chartObj.setOption(this.axisOption,!0)):this.chartObj.setOption(this.pieOption,!0)},getDataList:function(t){var e=this;this.postParams=t,Object(r.n)(t).then(function(t){e.loading=!1,e.list=t.data.list||[];for(var i=[],o=[],a=[],n=0;n<e.list.length;n++){var s=e.list[n];i.push({name:s.category,value:s.proportion}),o.push(s.recordNum),a.push(s.category)}e.pieOption.legend.data=a,e.pieOption.series[0].data=i,e.axisOption.xAxis[0].data=a,e.axisOption.series[0].data=o,e.refreshChartInfo()}).catch(function(){e.loading=!1})},getSummaries:function(t){var e=t.columns,i=t.data,o=[];return e.forEach(function(t,e){if(0!==e){var a=i.map(function(e){return Number(e[t.property])});a.every(function(t){return isNaN(t)})?o[e]="N/A":(o[e]=a.reduce(function(t,e){var i=Number(e);return isNaN(i)?t:t+e},0),2===e&&(o[e]=o[e]>0?"100.00":"0.00"))}else o[e]="合计"}),o},initAxis:function(){this.chartObj=s.a.init(document.getElementById("axismain")),this.axisOption={color:["#6ca2ff"],toolbox:this.toolbox,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"40px",left:"30px",right:"30px",bottom:"40px",containLabel:!0,borderColor:"#fff"},xAxis:[{type:"category",data:[],axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}}],yAxis:[{type:"value",name:"",axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333",formatter:"{value}个"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}}],series:[{name:"",type:"bar",barMaxWidth:15,data:[]}]}},initPie:function(){this.pieOption={color:this.chartColors,toolbox:this.toolbox,tooltip:{trigger:"item",formatter:"{b} : {c}% "},legend:{type:"scroll",bottom:"0",x:"center",data:[]},series:[{name:"",type:"pie",radius:"55%",stillShowZeroSum:!1,center:["40%","50%"],data:[],itemStyle:{emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}},exportClick:function(){this.requestExportInfo(r.o,this.postParams,"recordMode")}}},c=(i("UUOO"),i("KHd+")),u=Object(c.a)(l,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"main-container"},[i("filtrate-handle-view",{staticClass:"filtrate-bar",attrs:{"show-custom-select":!0,"custom-default":t.showType,"custom-options":[{name:"饼状图",value:"pie"},{name:"柱状图",value:"bar"}],title:"客户跟进方式分析","module-type":"customer"},on:{load:function(e){t.loading=!0},change:t.getDataList,typeChange:t.showTypeChange}}),t._v(" "),i("div",{staticClass:"content"},[t._m(0),t._v(" "),i("div",{staticClass:"table-content"},[i("div",{staticClass:"handle-bar"},[i("el-button",{staticClass:"export-btn",on:{click:t.exportClick}},[t._v("导出")])],1),t._v(" "),t.showTable?i("el-table",{attrs:{data:t.list,"summary