| | |
| | | // }, |
| | | startValue: 0, |
| | | endValue: 5, |
| | | chartTimer:null, |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | //在职 |
| | | pieChart(chartName, data) { |
| | | let that = this; |
| | | clearInterval(this.chartTimer); |
| | | let chartDomTwo = this.$refs[chartName]; |
| | | let myChartTwo = echarts.init(chartDomTwo) |
| | | myChartTwo.dispose() |
| | |
| | | } |
| | | }, |
| | | }, |
| | | formatter:function(value){ |
| | | if(value.length>6){ |
| | | return `${value.slice(0,4)}...` |
| | | } |
| | | return value; |
| | | } |
| | | }, |
| | | data: data.datax ? data.datax : [], |
| | | }, |
| | |
| | | ], |
| | | }; |
| | | |
| | | setInterval(function () { |
| | | this.chartTimer=setInterval(function () { |
| | | if (option.dataZoom[0].endValue == data.datay.length) { |
| | | option.dataZoom[0].startValue = that.startValue; |
| | | option.dataZoom[0].endValue = that.endValue; |