| | |
| | | // æ¯10ç§å·æ°ä¸æ¬¡æ°æ® |
| | | this.refreshInterval = setInterval(() => { |
| | | this.getData(); |
| | | }, 10000); |
| | | }, 30000); |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.chart) { |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | right: '10%', |
| | | top: 'center', |
| | | orient: 'horizontal', |
| | | bottom: '10%', |
| | | left: 'center', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 14 |
| | | fontSize: 20 |
| | | }, |
| | | data: ['空é²', 'æè´§', 'æè´§éå®'] |
| | | data: ['空é²', 'æè´§', 'æè´§éå®'], |
| | | width: '80%', |
| | | itemWidth: 20, |
| | | itemHeight: 14, |
| | | itemGap: 30, |
| | | formatter: function(name) { |
| | | let value = 0; |
| | | if (name === '空é²') value = this.locationData.free; |
| | | if (name === 'æè´§') value = this.locationData.occupied; |
| | | if (name === 'æè´§éå®') value = this.locationData.locked; |
| | | return `${name}\n${value}`; |
| | | }.bind(this), |
| | | selectedMode: 'multiple' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'SC01è´§ä½ç¶æ', |
| | | type: 'pie', |
| | | radius: ['50%', '70%'], |
| | | center: ['40%', '50%'], |
| | | radius: ['40%', '75%'], |
| | | center: ['50%', '45%'], |
| | | avoidLabelOverlap: true, |
| | | itemStyle: { |
| | | borderRadius: 4, |
| | |
| | | show: true, |
| | | formatter: '{b}: {c}', |
| | | color: '#fff', |
| | | fontSize: 14 |
| | | fontSize: 20 |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: 16, |
| | | fontSize: 20, |
| | | fontWeight: 'bold' |
| | | }, |
| | | itemStyle: { |