Commit b6aa91fe authored by daywrite's avatar daywrite

'销售分析'

parent 7068dda5
......@@ -24,7 +24,7 @@ export default {
url: '/vue/analysis/get-implement-chart'
},
getFilterImplementChart: {
url: '/vue/supplier/get-filter-implement-chart'
url: '/vue/analysis/get-filter-implement-chart'
},
getFilterSalesGoal: {
url: '/vue/analysis/get-filter-sales-goal'
......
......@@ -14,8 +14,10 @@ export default {
text: ''
},
xAxis: {
type: 'category',
gridLineWidth: 1,
title: {
text: data.name
},
categories: _data.categories,
labels: {
useHTML:true
}
......@@ -24,40 +26,71 @@ export default {
title: {
text: ''
},
gridLineWidth: 1,
labels: {
labels: {
formatter: function () {
return (this.value / 10000) + '万'
},
let _value = (this.value / 10000) | 0
if (_value > 1) {
return (this.value / 10000) + '万'
} else {
return this.value
}
}
},
gridLineWidth: 1,
plotLines:[{
color:'red',
dashStyle:'solid',
value: _data.average,
label: _data.average + '',
width:2
}]
}],
// 柱状图顶部 总计
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
enabled: false
},
plotOptions: {
column: {
stacking: 'normal'
},
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
// enabled: true,
format: '{point.y}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:12px">业绩分析</span><br>',
pointFormat: '<span>{point.name}</span>: <b>{point.y}</b><br/>'
formatter: function () {
let ret = ''
let _x = this.x
if (_x === '平均') {
ret += `<b>${_x}</b><br/>${this.point.stackTotal}`
} else {
ret += `<b>${this.series.name}</b><br/>`
if (this.series.userOptions.title) {
ret += `项目名称:<b>${this.series.userOptions.title}</b><br/>`
}
if (this.series.userOptions.pbudget) {
ret += `商机金额:${this.series.userOptions.pbudget}元<br/>`
}
if (this.series.userOptions.bargain_date) {
ret += `成交日期:${this.series.userOptions.bargain_date}<br/>`
}
ret += `商机批注:${this.series.userOptions.comment}`
}
return ret
}
},
series: [{
colorByPoint: true,
data: _data.summary
}]
series: _data.series
});
}
}
......
......@@ -19,7 +19,11 @@
<div class="header-title header-flex" style="height: 100%;">
<div>
<span class="title-two">实施工程师统计信息</span>
<div id="key" style="height:400px;"></div>
<div id="individualImplementHours" style="height:400px;"></div>
</div>
<div>
<span class=""></span>
<div id="individualImplementTimes" style="height:400px;"></div>
</div>
</div>
</div>
......@@ -78,7 +82,8 @@ export default {
requestAPI(api.getImplementChart, params)
.then(res => {
this.result.countList = res.counts
this.c('key', res.chars.individualJournalContributions)
this.c('individualImplementHours', res.chars.individualImplementHours)
this.c('individualImplementTimes', res.chars.individualImplementTimes)
})
},
......
......@@ -14,8 +14,10 @@ export default {
text: ''
},
xAxis: {
type: 'category',
gridLineWidth: 1,
title: {
text: data.name
},
categories: _data.categories,
labels: {
useHTML:true
}
......@@ -24,40 +26,71 @@ export default {
title: {
text: ''
},
gridLineWidth: 1,
labels: {
labels: {
formatter: function () {
return (this.value / 10000) + '万'
},
let _value = (this.value / 10000) | 0
if (_value > 1) {
return (this.value / 10000) + '万'
} else {
return this.value
}
}
},
gridLineWidth: 1,
plotLines:[{
color:'red',
dashStyle:'solid',
value: _data.average,
label: _data.average + '',
width:2
}]
}],
// 柱状图顶部 总计
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
enabled: false
},
plotOptions: {
column: {
stacking: 'normal'
},
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
// enabled: true,
format: '{point.y}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:12px">业绩分析</span><br>',
pointFormat: '<span>{point.name}</span>: <b>{point.y}</b><br/>'
formatter: function () {
let ret = ''
let _x = this.x
if (_x === '平均') {
ret += `<b>${_x}</b><br/>${this.point.stackTotal}`
} else {
ret += `<b>${this.series.name}</b><br/>`
if (this.series.userOptions.title) {
ret += `项目名称:<b>${this.series.userOptions.title}</b><br/>`
}
if (this.series.userOptions.pbudget) {
ret += `商机金额:${this.series.userOptions.pbudget}元<br/>`
}
if (this.series.userOptions.bargain_date) {
ret += `成交日期:${this.series.userOptions.bargain_date}<br/>`
}
ret += `商机批注:${this.series.userOptions.comment}`
}
return ret
}
},
series: [{
colorByPoint: true,
data: _data.summary
}]
series: _data.series
});
}
}
......
......@@ -19,7 +19,19 @@
<div class="header-title header-flex" style="height: 100%;">
<div>
<span class="title-two">售前工程师统计信息</span>
<div id="key" style="height:400px;"></div>
<div id="individualJournalContributions" style="height:400px;"></div>
</div>
<div>
<span class=""></span>
<div id="individualContributions" style="height:400px;"></div>
</div>
<div>
<span class=""></span>
<div id="individualPreSalesTimes" style="height:400px;"></div>
</div>
<div>
<span class=""></span>
<div id="$ndividualPreSalesSuccessTimes" style="height:400px;"></div>
</div>
</div>
</div>
......@@ -78,7 +90,10 @@ export default {
requestAPI(api.getPreSalesChart, params)
.then(res => {
this.result.countList = res.counts
this.c('key', res.chars.individualJournalContributions)
this.c('individualJournalContributions', res.chars.individualJournalContributions)
this.c('individualContributions', res.chars.individualContributions)
this.c('individualPreSalesTimes', res.chars.individualPreSalesTimes)
this.c('$ndividualPreSalesSuccessTimes', res.chars.$ndividualPreSalesSuccessTimes)
})
},
......
......@@ -74,6 +74,7 @@ export default {
let t = this
requestAPI(api.getSalesGoal, params)
.then(res => {
this.chartTypeArray = []
res.data.list.forEach(item => {
this.chartTypeArray.push({
key: item.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment