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-e2e2.a6276774.js

1 line
6.8 KiB

3 years ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e2e2"],{"14H8":function(t,e,i){},"7WeT":function(t,e,i){"use strict";var a=i("R/xI");i.n(a).a},"9PTB":function(t,e,i){"use strict";e.a={data:function(){return{summaryData:null}},methods:{getSummariesData:function(t){this.summaryData=t||{}},getSummaries:function(t){var e=this,i=[];return t.columns.forEach(function(t,a){i[a]=e.summaryData?e.summaryData[t.property]:""}),this.$nextTick(function(){}),i}}}},"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,a){if(t[e]===a[e])return 0;var s=isNaN(Number(t[e]))||isNaN(Number(a[e]))?t[e]<a[e]:Number(t[e])<Number(a[e]);return"descending"===i?s?1:-1:s?-1:1})}}}},ECOn:function(t,e,i){"use strict";i.r(e);var a=i("31UX"),s=i("9kPm"),n=i("9PTB"),o=i("MT78"),r=i.n(o),l=i("JgLm"),c={name:"CycleView",components:{},mixins:[a.a,s.a,n.a],props:{type:{required:!0,type:String},show:{required:!0,type:Boolean}},data:function(){return{loading:!1,axisOption:null,postParams:null,list:[],fieldList:[],initView:!1}},computed:{title:function(){return{customer:"员工客户成交周期(根据合同下单时间和客户创建时间计算)",address:"地区成交周期(根据合同下单时间和客户创建时间计算)",product:"产品成交周期(根据合同下单时间和客户创建时间计算)"}[this.type]},filterTitle:function(){return{customer:"员工客户成交周期分析",address:"地区成交周期分析",product:"产品成交周期分析"}[this.type]}},watch:{show:function(t){var e=this;t&&!this.initView&&(this.initView=!0,this.postParams&&this.getDataList(this.postParams),this.$nextTick(function(){e.initAxis()}))}},mounted:function(){this.fieldList=this.getFieldList(),this.show&&(this.initView=!0,this.initAxis())},methods:{getDataList:function(t){var e=this;(this.postParams=t,this.show)&&(this.loading=!0,(0,{customer:l.v,product:l.h,address:l.a}[this.type])(t).then(function(t){e.loading=!1;var i=[];if("customer"!=e.type){var a=t.data||{};i=a.list||[],e.list=a.list||[],e.getSummariesData(a.total)}else i=t.data||[];for(var s=[],n=[],o=[],r=0;r<i.length;r++){var l=i[r];s.push(l.cycle),n.push(l.customer_num),"customer"==e.type?o.push(l.type):"address"==e.type?o.push(l.address):"product"==e.type&&o.push(l.product_name)}e.axisOption.xAxis[0].data=o,e.axisOption.series[0].data=s,e.axisOption.series[1].data=n,e.chartObj.setOption(e.axisOption,!0)}).catch(function(){e.loading=!1}),"customer"==this.type&&Object(l.x)(t).then(function(t){e.loading=!1;var i=t.data||{};e.list=i.list||[],e.getSummariesData(i.total)}).catch(function(){e.loading=!1}))},initAxis:function(){var t=r.a.init(document.getElementById("axismain"+this.type)),e={color:["#6ca2ff","#ff7474"],toolbox:this.toolbox,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:["成交周期","成交客户数"],bottom:"0px",itemWidth:14},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}},{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",yAxisIndex:0,barMaxWidth:15,data:[]},{name:"成交客户数",type:"bar",yAxisIndex:1,barMaxWidth:15,data:[]}]};t.setOption(e,!0),this.axisOption=e,this.chartObj=t},getFieldList:function(){return{customer:[{field:"