Commit 2ca6d27d3a120fd102e4db6cfdec39a5984341eb
1 parent
9ffd6894
正式地址
Showing
4 changed files
with
12 additions
and
8 deletions
src/components/halfPieChart.vue
| ... | ... | @@ -69,6 +69,7 @@ export default { |
| 69 | 69 | methods: { |
| 70 | 70 | setOptions({yData} = {}) { |
| 71 | 71 | console.log(yData[0]) |
| 72 | + console.log(yData[1]) | |
| 72 | 73 | this.chart.setOption({ |
| 73 | 74 | tooltip: { |
| 74 | 75 | trigger: 'item', |
| ... | ... | @@ -90,16 +91,16 @@ export default { |
| 90 | 91 | data: [ |
| 91 | 92 | { |
| 92 | 93 | value: yData[0], |
| 93 | - name: '空闲', | |
| 94 | + name: '空余', | |
| 94 | 95 | itemStyle: { |
| 95 | 96 | normal: { |
| 96 | 97 | color: { |
| 97 | 98 | colorStops: [{ |
| 98 | 99 | offset: 0, |
| 99 | - color: '#FFBA00' // 0% 处的颜色 | |
| 100 | + color: '#00CAFE' // 0% 处的颜色 | |
| 100 | 101 | }, { |
| 101 | 102 | offset: 1, |
| 102 | - color: '#FF8100' // 100% 处的颜色 | |
| 103 | + color: '#2772F4' // 100% 处的颜色 | |
| 103 | 104 | }] |
| 104 | 105 | }, |
| 105 | 106 | } |
| ... | ... | @@ -108,15 +109,16 @@ export default { |
| 108 | 109 | { |
| 109 | 110 | value: yData[1], |
| 110 | 111 | name: '占有', |
| 112 | + | |
| 111 | 113 | itemStyle: { |
| 112 | 114 | normal: { |
| 113 | 115 | color: { |
| 114 | 116 | colorStops: [{ |
| 115 | 117 | offset: 0, |
| 116 | - color: '#00CAFE' // 0% 处的颜色 | |
| 118 | + color: '#FFBA00' // 0% 处的颜色 | |
| 117 | 119 | }, { |
| 118 | 120 | offset: 1, |
| 119 | - color: '#2772F4' // 100% 处的颜色 | |
| 121 | + color: '#FF8100' // 100% 处的颜色 | |
| 120 | 122 | }] |
| 121 | 123 | }, |
| 122 | 124 | } | ... | ... |
src/views/berthsection.vue
| ... | ... | @@ -65,6 +65,8 @@ export default { |
| 65 | 65 | yData: [data.freeBerthNum,data.isOccupyBertnNum], |
| 66 | 66 | legendData: ['空余','占有'] |
| 67 | 67 | } |
| 68 | + console.log(data.freeBerthNum) | |
| 69 | + console.log(data.isOccupyBertnNum) | |
| 68 | 70 | // this.pieChartData.yData = [10,20] |
| 69 | 71 | // this.pieChartData.yData.push(data.freeBerthNum) |
| 70 | 72 | // this.pieChartData.yData.push(data.isOccupyBertnNum) | ... | ... |
src/views/mainContainer.vue