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-79ce.99c6326d.js

1 line
4.9 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-79ce"],{"9PTB":function(t,i,a){"use strict";i.a={data:function(){return{summaryData:null}},methods:{getSummariesData:function(t){this.summaryData=t||{}},getSummaries:function(t){var i=this,a=[];return t.columns.forEach(function(t,e){a[e]=i.summaryData?i.summaryData[t.property]:""}),this.$nextTick(function(){}),a}}}},"9kPm":function(t,i,a){"use strict";i.a={data:function(){return{showTable:!0}},methods:{mixinSortFn:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ascending";if("[object Array]"!==Object.prototype.toString.call(t))return[];if(!i)return t;t.sort(function(t,e){if(t[i]===e[i])return 0;var n=isNaN(Number(t[i]))||isNaN(Number(e[i]))?t[i]<e[i]:Number(t[i])<Number(e[i]);return"descending"===a?n?1:-1:n?-1:1})}}}},FUjR:function(t,i,a){},"a/BA":function(t,i,a){"use strict";var e=a("FUjR");a.n(e).a},rPZC:function(t,i,a){"use strict";a.r(i);var e=a("QbLZ"),n=a.n(e),s=a("31UX"),o=a("9kPm"),r=a("9PTB"),l=a("MT78"),c=a.n(l),d=a("JgLm"),u={name:"CustomerRecordStatistics",mixins:[s.a,o.a,r.a],data:function(){return{loading:!1,axisOption:null,list:[],postParams:{},dataIndex:null,axisList:[],fieldList:[{field:"realname",name:"员工姓名"},{field:"record_num",name:"跟进次数"},{field:"customer_num",name:"跟进客户数"}]}},computed:{listPostParams:function(){var t=n()({},this.postParams);if(void 0!==this.dataIndex&&null!==this.dataIndex){var i=this.axisList[this.dataIndex];delete t.type,t.startTime=i.type,t.endTime=i.type}return t}},mounted:function(){this.initAxis()},methods:{searchClick:function(t){this.postParams=t,this.getDataList(),this.getRecordList()},getDataList:function(){var t=this;this.loading=!0,Object(d.p)(this.postParams).then(function(i){t.loading=!1,t.axisList=i.data||[];for(var a=[],e=[],n=[],s=0;s<i.data.length;s++){var o=i.data[s];a.push(o.customerCount),e.push(o.dataCount),n.push(o.type)}t.axisOption.xAxis[0].data=n,t.axisOption.series[0].data=a,t.axisOption.series[1].data=e,t.chartObj.setOption(t.axisOption,!0)}).catch(function(){t.loading=!1})},getRecordList:function(t){var i=this;this.dataIndex=t,this.list=[],this.loading=!0,Object(d.l)(this.listPostParams).then(function(t){i.loading=!1;var a=t.data||{};i.list=a.list||[],i.getSummariesData(a.total)}).catch(function(){i.loading=!1})},initAxis:function(){var t=this,i=c.a.init(document.getElementById("axismain")),a={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:[]}]};i.setOption(a,!0),i.on("click",function(i){t.getRecordList(i.dataIndex)}),this.axisOption=a,this.chartObj=i},exportClick:function(){this.requestExportInfo(d.m,this.listPostParams,"recordList")}}},m=(a("a/BA"),a("KHd+")),h=Object(m.a)(u,function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"main-container"},[a("filtrate-handle-view",{staticClass:"filtrate-bar",attrs:{title:"客户跟进次数分析","module-type":"customer"},on:{load:function(i){t.loading=!0},change:t.searchClick}}),t._v(" "),a("div",{staticClass:"content"},[t._m(0),t._v(" "),a("div",{staticClass:"table-content"},[a("div",{staticClass:"handle-bar"},[a("el-button",{staticClass:"export-btn",on:{click:t.exportClick}},[t._v("导出")])],1),t._v(" "),t.showTable?a("el-table",{attrs:{data:t.list,"summary-method":t.getSummaries,height:"400","show-summary":"",stripe:"",border:"","highlight-current-row":""},on:{"sort-change":function(i){var a=i.prop,e=i.order;return t.mixinSortFn(t.list,a,e)}}},t._l(t.fieldList,function(t,i){return a("el-table-column",{key:i,attrs:{prop:t.field,label:t.name,sortable:"custom",align:"center","header-align":"center","show-overflow-tooltip":""}})})):t._e()],1)])],1)},[function(){var t=this.$createElement,i=this._self._c||t;return i("div",{staticClass:"axis-content"},[i("div",{attrs:{id:"axismain"}})])}],!1,null,"653c0aa7",null);h.options.__file="CustomerRecordStatistics.vue";i.default=h.exports}}]);