Commit 8ca45b9a authored by 杨硕's avatar 杨硕

对接首页统计图接口

parent 795785ef
...@@ -1591,23 +1591,18 @@ export default { ...@@ -1591,23 +1591,18 @@ export default {
// 列表渲染数据 // 列表渲染数据
var data = [] var data = []
const _this = this const _this = this
this.tableData = [ this.tableData = []
{
remarks: "111111",
edit: '0'
}
]
_this.fullscreenLoading = false _this.fullscreenLoading = false
// cmspriceclickList(this.queryParams).then(res => { cmspriceclickList(this.queryParams).then(res => {
// _this.total = res.total// 总记录数 _this.total = res.total// 总记录数
// res.records.forEach(item => item['edit'] = '0') res.records.forEach(item => item['edit'] = '0')
// _this.tableData = res.records _this.tableData = res.records
// this.tableDataOri = JSON.parse(JSON.stringify(res.records)) this.tableDataOri = JSON.parse(JSON.stringify(res.records))
// _this.fullscreenLoading = false _this.fullscreenLoading = false
// if (res.records.length === 0) { if (res.records.length === 0) {
// _this.tableDataTips = '暂无数据' _this.tableDataTips = '暂无数据'
// } }
// }) })
}, },
/** 4.重置时将单位回复正常**/ /** 4.重置时将单位回复正常**/
handleClear() { handleClear() {
......
...@@ -216,7 +216,13 @@ export default { ...@@ -216,7 +216,13 @@ export default {
company: '', company: '',
barNameList: [], // 柱状图姓名列表 barNameList: [], // 柱状图姓名列表
barArticle: [], // 柱状图文章数量 barArticle: [], // 柱状图文章数量
barVideo: [] // 柱状图视频数量 barVideo: [], // 柱状图视频数量
pieArticle: [], // 饼状图文章推广次数
pieVideo: [], // 饼状图视频推广次数
promotionArticle: [], // 柱状图文章
promotionArticleNum: [], // 柱状图文章推广次数
promotionVideo: [], // 柱状图视频
promotionVideoNum: [] // 柱状图视频推广次数
} }
}, },
computed: { computed: {
...@@ -481,47 +487,52 @@ export default { ...@@ -481,47 +487,52 @@ export default {
pieChart({ businessId: this.company, type: 0 }).then(res => { pieChart({ businessId: this.company, type: 0 }).then(res => {
if (res.code === 200) { if (res.code === 200) {
console.log('饼状图', res.data) console.log('饼状图', res.data)
const myChartPeopleTextPie = echarts.init(document.getElementById('dataCharts_textPieChart'))
const optionAverage = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
show: false
},
series: [
{
name: '文章',
type: 'pie',
radius: '85%',
center: ['25%', '50%'], // 设置饼图的中心位置
data: [
{ value: 19, name: '文章1', itemStyle: { color: '#54C0D8' }},
{ value: 11, name: '文章2', itemStyle: { color: '#BF50E5' }},
{ value: 23, name: '文章3', itemStyle: { color: '#E56250' }},
{ value: 9, name: '文章4', itemStyle: { color: '#54D871' }},
{ value: 18, name: '文章5', itemStyle: { color: '#91CC75' }}
]
},
{
name: '视频',
type: 'pie',
radius: '85%',
center: ['75%', '50%'], // 设置饼图的中心位置
data: [
{ value: 11, name: '视频1', itemStyle: { color: '#54C0D8' }},
{ value: 10, name: '视频2', itemStyle: { color: '#BF50E5' }},
{ value: 6, name: '视频3', itemStyle: { color: '#E56250' }},
{ value: 9, name: '视频4', itemStyle: { color: '#54D871' }},
{ value: 7, name: '视频5', itemStyle: { color: '#91CC75' }}
]
}
]
}
myChartPeopleTextPie.setOption(optionAverage)
} }
}) })
pieChart({ businessId: this.company, type: 1 }).then(res => {
if (res.code === 200) {
console.log('饼状图', res.data)
}
})
const myChartPeopleTextPie = echarts.init(document.getElementById('dataCharts_textPieChart'))
const optionAverage = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
show: false
},
series: [
{
name: '文章',
type: 'pie',
radius: '85%',
center: ['25%', '50%'], // 设置饼图的中心位置
data: [
{ value: 19, name: '文章1', itemStyle: { color: '#54C0D8' }},
{ value: 11, name: '文章2', itemStyle: { color: '#BF50E5' }},
{ value: 23, name: '文章3', itemStyle: { color: '#E56250' }},
{ value: 9, name: '文章4', itemStyle: { color: '#54D871' }},
{ value: 18, name: '文章5', itemStyle: { color: '#91CC75' }}
]
},
{
name: '视频',
type: 'pie',
radius: '85%',
center: ['75%', '50%'], // 设置饼图的中心位置
data: [
{ value: 11, name: '视频1', itemStyle: { color: '#54C0D8' }},
{ value: 10, name: '视频2', itemStyle: { color: '#BF50E5' }},
{ value: 6, name: '视频3', itemStyle: { color: '#E56250' }},
{ value: 9, name: '视频4', itemStyle: { color: '#54D871' }},
{ value: 7, name: '视频5', itemStyle: { color: '#91CC75' }}
]
}
]
}
myChartPeopleTextPie.setOption(optionAverage)
}, },
getPromotionArticle() { getPromotionArticle() {
aListOfPromotionAmounts({ businessId: this.company }).then(res => { aListOfPromotionAmounts({ businessId: this.company }).then(res => {
......
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