Commit 08e57e71 authored by cat's avatar cat

控制台

parent d91a1eb2
...@@ -227,6 +227,9 @@ export default { ...@@ -227,6 +227,9 @@ export default {
name: 'Control', name: 'Control',
data() { data() {
return { return {
// 图表
myChartRegistrationTime: undefined,
myChartAverage: undefined,
stopTimer: false, stopTimer: false,
sumUpdateList: [], sumUpdateList: [],
dataList: [], dataList: [],
...@@ -378,16 +381,13 @@ export default { ...@@ -378,16 +381,13 @@ export default {
getSumUpdateList() { getSumUpdateList() {
findCountIdByUpdateDate().then(res => { findCountIdByUpdateDate().then(res => {
this.sumUpdateList = res.data this.sumUpdateList = res.data
console.log('res', res)
this.numList = [] this.numList = []
this.dataList = [] this.dataList = []
this.sumUpdateList.forEach(item => { this.sumUpdateList.forEach(item => {
this.numList.push(item.sum) this.numList.push(item.sum)
this.dataList.push(item.updateDate) this.dataList.push(item.updateDate)
}) })
this.getRegistrationTime() this.updateRegistrationTime()
console.log('numList', this.numList)
console.log('dataList', this.dataList)
}) })
}, },
getSumList() { getSumList() {
...@@ -399,7 +399,7 @@ export default { ...@@ -399,7 +399,7 @@ export default {
this.YyList.push(item.fqYy) this.YyList.push(item.fqYy)
this.FqNumList.push(item.sum) this.FqNumList.push(item.sum)
}) })
this.dataChartsLeaveMessage() this.updateChartsLeaveMessage()
}) })
}, },
handleClick(row) { handleClick(row) {
...@@ -549,7 +549,10 @@ export default { ...@@ -549,7 +549,10 @@ export default {
}, },
/** 数据统计*/ /** 数据统计*/
getRegistrationTime() { getRegistrationTime() {
const myChartRegistrationTime = echarts.init(document.getElementById('dataCharts_data')) this.myChartRegistrationTime = echarts.init(document.getElementById('dataCharts_data'))
this.updateRegistrationTime()
},
updateRegistrationTime() {
var optionRegistrationTime = { var optionRegistrationTime = {
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
...@@ -557,7 +560,7 @@ export default { ...@@ -557,7 +560,7 @@ export default {
legend: { legend: {
x: 'center', x: 'center',
y: 'bottom', y: 'bottom',
data: ['时间'], data: ['数量'],
// 图例之间的间距 // 图例之间的间距
itemGap: 20, itemGap: 20,
// 图标高度 // 图标高度
...@@ -581,12 +584,15 @@ export default { ...@@ -581,12 +584,15 @@ export default {
type: 'line' type: 'line'
} }
} }
myChartRegistrationTime.setOption(optionRegistrationTime) this.myChartRegistrationTime.setOption(optionRegistrationTime)
}, },
/** 法官留言(雷达图) /** 法官留言(雷达图)
* */ * */
dataChartsLeaveMessage() { dataChartsLeaveMessage() {
const myChartAverage = echarts.init(document.getElementById('dataCharts_leaveMessage')) this.myChartAverage = echarts.init(document.getElementById('dataCharts_leaveMessage'))
this.updateChartsLeaveMessage()
},
updateChartsLeaveMessage() {
const optionAverage = { const optionAverage = {
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
...@@ -610,114 +616,15 @@ export default { ...@@ -610,114 +616,15 @@ export default {
yAxis: { yAxis: {
type: 'value' type: 'value'
}, },
series: [ series:
{ {
name: '废弃原因',
type: 'bar', type: 'bar',
data: this.FqNumList, data: this.FqNumList,
barWidth: '10%' 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) this.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)
// }
}, },
/** 访客数据(饼状图) /** 访客数据(饼状图)
* */ * */
......
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