Commit 08e57e71 authored by cat's avatar cat

控制台

parent d91a1eb2
......@@ -227,6 +227,9 @@ export default {
name: 'Control',
data() {
return {
// 图表
myChartRegistrationTime: undefined,
myChartAverage: undefined,
stopTimer: false,
sumUpdateList: [],
dataList: [],
......@@ -378,16 +381,13 @@ export default {
getSumUpdateList() {
findCountIdByUpdateDate().then(res => {
this.sumUpdateList = res.data
console.log('res', res)
this.numList = []
this.dataList = []
this.sumUpdateList.forEach(item => {
this.numList.push(item.sum)
this.dataList.push(item.updateDate)
})
this.getRegistrationTime()
console.log('numList', this.numList)
console.log('dataList', this.dataList)
this.updateRegistrationTime()
})
},
getSumList() {
......@@ -399,7 +399,7 @@ export default {
this.YyList.push(item.fqYy)
this.FqNumList.push(item.sum)
})
this.dataChartsLeaveMessage()
this.updateChartsLeaveMessage()
})
},
handleClick(row) {
......@@ -549,7 +549,10 @@ export default {
},
/** 数据统计*/
getRegistrationTime() {
const myChartRegistrationTime = echarts.init(document.getElementById('dataCharts_data'))
this.myChartRegistrationTime = echarts.init(document.getElementById('dataCharts_data'))
this.updateRegistrationTime()
},
updateRegistrationTime() {
var optionRegistrationTime = {
tooltip: {
trigger: 'item'
......@@ -557,7 +560,7 @@ export default {
legend: {
x: 'center',
y: 'bottom',
data: ['时间'],
data: ['数量'],
// 图例之间的间距
itemGap: 20,
// 图标高度
......@@ -581,12 +584,15 @@ export default {
type: 'line'
}
}
myChartRegistrationTime.setOption(optionRegistrationTime)
this.myChartRegistrationTime.setOption(optionRegistrationTime)
},
/** 法官留言(雷达图)
* */
dataChartsLeaveMessage() {
const myChartAverage = echarts.init(document.getElementById('dataCharts_leaveMessage'))
this.myChartAverage = echarts.init(document.getElementById('dataCharts_leaveMessage'))
this.updateChartsLeaveMessage()
},
updateChartsLeaveMessage() {
const optionAverage = {
tooltip: {
trigger: 'axis'
......@@ -610,114 +616,15 @@ export default {
yAxis: {
type: 'value'
},
series: [
series:
{
name: '废弃原因',
type: 'bar',
data: this.FqNumList,
barWidth: '10%'
}
]
// radar: {
// // shape: 'circle',
// radius: '53%',
// indicator: [
// {name: '咨询', min: 0},
// {name: '感谢', min: 0},
// {name: '求助', min: 0},
// {name: '投诉', min: 0},
// {name: '谏言', min: 0}
// ],
// name: {
// textStyle: {
// color: '#333',
// fontSize: '14px'
// }
// }
// },
// color: ['#46BCF3', '#C760F2'],
// series: [{
// type: 'radar',
// tooltip: {
// trigger: 'item'
// },
// data: [
// {
// value: ['14', '38', '15', '36', '12'],
// name: '本月留言量',
// areaStyle: {
// color: '#46BCF3'
// }
// },
// {
// value: ['10', '20', '5', '13', '8'],
// name: '本月回复量'
// }
// ]
// }]
}
myChartAverage.setOption(optionAverage)
// if (this.judgeMessageData === 0) {
//
// }
// if (this.judgeMessageData === 1) {
// const myChartAverage = echarts.init(document.getElementById('dataCharts_leaveMessage'))
// const optionAverage = {
// tooltip: {
// trigger: 'axis'
// },
// legend: {
// x: 'center',
// y: 'bottom',
// data: ['本年留言量', '本年回复量'],
// // 图例之间的间距
// itemGap: 20,
// // 图标高度
// itemHeight: 12,
// textStyle: {
// // 字体大小
// fontSize: 13
// }
// },
// radar: {
// // shape: 'circle',
// radius: '53%',
// indicator: [
// {name: '咨询', min: 0},
// {name: '感谢', min: 0},
// {name: '求助', min: 0},
// {name: '投诉', min: 0},
// {name: '谏言', min: 0}
// ],
// name: {
// textStyle: {
// color: '#333',
// fontSize: '14px'
// }
// }
// },
// color: ['#46BCF3', '#C760F2'],
// series: [{
// type: 'radar',
// tooltip: {
// trigger: 'item'
// },
// data: [
// {
// value: ['97', '93', '84', '98', '44'],
// name: '本年留言量',
// areaStyle: {
// color: '#46BCF3'
// }
// },
// {
// value: ['70', '83', '65', '90', '32'],
// name: '本年回复量'
// }
// ]
// }]
// }
// myChartAverage.setOption(optionAverage)
// }
this.myChartAverage.setOption(optionAverage)
},
/** 访客数据(饼状图)
* */
......
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