Commit e1e90d13 by xinla

--no commit message

1 parent 6b94ac14
...@@ -254,14 +254,12 @@ export default { ...@@ -254,14 +254,12 @@ export default {
time: '昨天', time: '昨天',
uptime: '', uptime: '',
timeType: 'today', timeType: 'today',
charts: '',
opinionData: { opinionData: {
opinionData1: [], opinionData1: [],
opinionData2: [], opinionData2: [],
opinionData3: [], opinionData3: [],
opinionData4: [] opinionData4: []
}, }
charts: null
} }
}, },
methods: { methods: {
...@@ -315,6 +313,7 @@ export default { ...@@ -315,6 +313,7 @@ export default {
data.arr4.push(a.negativeFeedbackCnt) data.arr4.push(a.negativeFeedbackCnt)
}) })
this.xAxis = data.time this.xAxis = data.time
this.resizeArr = []
this.drawLine('main', ['发起申请数'], data.arr1, '#088AEE') this.drawLine('main', ['发起申请数'], data.arr1, '#088AEE')
this.drawLine('main2', ['新增客户数'], data.arr2, '#E74E59') this.drawLine('main2', ['新增客户数'], data.arr2, '#E74E59')
this.drawLine('main3', ['群新增人数'], data.arr3, '#14BF48') this.drawLine('main3', ['群新增人数'], data.arr3, '#14BF48')
...@@ -324,12 +323,22 @@ export default { ...@@ -324,12 +323,22 @@ export default {
let obj = document.getElementById(id) let obj = document.getElementById(id)
obj.style.width = '100%' obj.style.width = '100%'
obj.style.height = '380px' obj.style.height = '380px'
this.charts = echarts.init(obj) let charts = echarts.init(obj)
window.onresize = function() { this.resizeArr.push(charts)
charts.resize()
// test let resize = function() {
this.resizeArr.forEach((element) => {
element.resize()
})
}
function debounce(method, context) {
clearTimeout(method.tId)
method.tId = setTimeout(function() {
method.call(context)
}, 100)
} }
this.charts.setOption({ window.onresize = debounce.bind(this, resize, this)
charts.setOption({
color: [color], color: [color],
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!