| | |
| | | setData:{} |
| | | } |
| | | }, |
| | | // { |
| | | // img: require("@/assets/images/monomerVoltage.png"), |
| | | // chartData: { |
| | | // name: '地图', |
| | | // id: 14, |
| | | // w: 0.635, |
| | | // h: 0.35, |
| | | // x: 0.35, |
| | | // y: 0.35, |
| | | // type: 'chinaMap', |
| | | // setData:{} |
| | | // } |
| | | // }, |
| | | { |
| | | img: require("@/assets/images/chinaMap.png"), |
| | | chartData: { |
| | | name: '地图', |
| | | id: 14, |
| | | w: 0.635, |
| | | h: 0.35, |
| | | x: 0.35, |
| | | y: 0.35, |
| | | type: 'chinaMap', |
| | | setData:{} |
| | | } |
| | | }, |
| | | ] |
| | | export default { |
| | | modularTitle, |
| | |
| | | }, |
| | | series: series |
| | | }; |
| | | |
| | | this.setOption(option); |
| | | this.$nextTick(function(){ |
| | | this.setOption(option); |
| | | }) |
| | | |
| | | }, |
| | | resize() { |
| | | let self = this; |
| | | setTimeout(() => { |
| | | self.$options.chart.resize(); |
| | | self.setData(null); |
| | | self.$options.chart.resize(); |
| | | self.setData(null); |
| | | }, 300) |
| | | // this.$options.chart.resize(); |
| | | } |
| | | }, |
| | | mounted() { |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | this.$options.chart = echarts.init(this.$refs.chinaMap); |
| | | |
| | | window.addEventListener('resize', this.resize); |
| | | this.$nextTick(function(){ |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | this.$options.chart = echarts.init(this.$refs.chinaMap); |
| | | window.addEventListener('resize', this.resize); |
| | | }) |
| | | |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener('resize', this.resize); |