| | |
| | | // 自定义tooltip内容 |
| | | const isData = that.fetchData(params.name) |
| | | let isHtml = '' |
| | | for (let i = 0; i < isData.length; i++) { |
| | | isHtml += `<div>${isData[i].name}:${isData[i].value}</div>` |
| | | if(isData) { |
| | | for (let i = 0; i < isData.length; i++) { |
| | | isHtml += `<div>${isData[i].name}:${isData[i].value}</div>` |
| | | } |
| | | }else { |
| | | isHtml += `得分:0` |
| | | } |
| | | return `<div class="tooltip-container"> |
| | | <div class="title">${params.name}</div> |
| | |
| | | } |
| | | ] |
| | | } |
| | | |
| | | myAnnular.setOption(option) |
| | | }, |
| | | |
| | |
| | | }) |
| | | }, |
| | | watch: { |
| | | isData(){ |
| | | this.getW() |
| | | this.$nextTick(() => { |
| | | this.initChart( |
| | | this.isData.value1, |
| | | this.isData.value2, |
| | | this.isData.color |
| | | ) |
| | | }) |
| | | } |
| | | isData: { |
| | | handler(newVal, oldVal) { |
| | | this.getW() |
| | | this.$nextTick(() => { |
| | | this.initChart(newVal.value1, newVal.value2, newVal.color); |
| | | }); |
| | | }, |
| | | deep: true |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | background-repeat: no-repeat; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .item-facility-icon { |
| | | margin: 0 auto; |
| | |
| | | text-align: center; |
| | | font-size: 14px; |
| | | list-style-type: none; |
| | | padding-left: 0; |
| | | |
| | | li:nth-child(1) { |
| | | .value { |