diff --git a/src/components/halfPieChart.vue b/src/components/halfPieChart.vue index f06835e..7e414bb 100644 --- a/src/components/halfPieChart.vue +++ b/src/components/halfPieChart.vue @@ -69,6 +69,7 @@ export default { methods: { setOptions({yData} = {}) { console.log(yData[0]) + console.log(yData[1]) this.chart.setOption({ tooltip: { trigger: 'item', @@ -90,16 +91,16 @@ export default { data: [ { value: yData[0], - name: '空闲', + name: '空余', itemStyle: { normal: { color: { colorStops: [{ offset: 0, - color: '#FFBA00' // 0% 处的颜色 + color: '#00CAFE' // 0% 处的颜色 }, { offset: 1, - color: '#FF8100' // 100% 处的颜色 + color: '#2772F4' // 100% 处的颜色 }] }, } @@ -108,15 +109,16 @@ export default { { value: yData[1], name: '占有', + itemStyle: { normal: { color: { colorStops: [{ offset: 0, - color: '#00CAFE' // 0% 处的颜色 + color: '#FFBA00' // 0% 处的颜色 }, { offset: 1, - color: '#2772F4' // 100% 处的颜色 + color: '#FF8100' // 100% 处的颜色 }] }, } diff --git a/src/views/berthsection.vue b/src/views/berthsection.vue index 35d9ecc..6c28548 100644 --- a/src/views/berthsection.vue +++ b/src/views/berthsection.vue @@ -65,6 +65,8 @@ export default { yData: [data.freeBerthNum,data.isOccupyBertnNum], legendData: ['空余','占有'] } + console.log(data.freeBerthNum) + console.log(data.isOccupyBertnNum) // this.pieChartData.yData = [10,20] // this.pieChartData.yData.push(data.freeBerthNum) // this.pieChartData.yData.push(data.isOccupyBertnNum) diff --git a/src/views/mainContainer.vue b/src/views/mainContainer.vue index b598c72..f05d8a9 100644 --- a/src/views/mainContainer.vue +++ b/src/views/mainContainer.vue @@ -59,7 +59,7 @@ export default {