8dcd7f64
liuqimichale
api 接口封装 news
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
onLoad() {
berthAddress({
orgIds: this.GLOBAL.paramsvariables
}).then((response)=>{
let data = response.data.data
console.log(data)
this.berthTotal = common.formatNumToStr(data.allBerthNum)
this.free = data.freeBerthNum
this.have = data.isOccupyBertnNum
this.pieChartOption.seriesData[0].value = data.isOccupyBertnNum
this.pieChartOption.seriesData[1].value = data.freeBerthNum
let pieChartOption = this.pieChartOption
//占有率
this.pieChart=this.createPie(pieChartOption);
window.addEventListener('resize', function() {
this.pieChart.resize()
}.bind(this));
}).catch((response)=>{
console.log(response);
})
|
22fb20b3
songchongxian
城市停车运营监控
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
let seriesData=root.seriesData;
const option={
// grid: {
// top: '0%',left: '0%',
// right: '0%',bottom: '0%'
// },
grid: {
top: 13,left: 10,
right: 10,bottom: 10,
containLabel: true
},
title: { show:false },
tooltip: {show:false},
series: [{
name: 'pie',type: 'pie',
center: ['50%', '50%'],
radius: ['75%', '90%'],
hoverAnimation: false,
color: ['#FFB704','#02ABFF'],//占有黄色
label: {show:false},
itemStyle: {
normal: {
label: {show: false},
labelLine: {show: false},
shadowBlur: 40,
shadowColor: 'rgba(40, 40, 40,0.5)',
}
},
data: seriesData
},
//内环
{
name: '', type: 'pie',
clockWise: true,hoverAnimation: false,
radius: ['90%', '90%'],
label: { normal: { position: 'center' }},
data: [{
value: 0,
label: {
normal: {
|
22fb20b3
songchongxian
城市停车运营监控
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
textStyle: {
color: '#fe8b53',
fontSize: 18,
fontWeight: 'normal'
}
}
}
}, {
tooltip: {show: false},
label: {
normal: {
formatter: '\n占有',
textStyle: {
color: '#bbeaf9',fontSize: 12
}
}
}
}]
}
]
};
pieChart.setOption(option);
return pieChart;
}
},
}
</script>
<style scoped lang="scss">
.app-berthBox {
width: 100%;
.theme-card{
height: 100%;
}
.berthPie{
position: absolute;
margin: 0 auto;
top:0;
bottom: 0;
left:0;
width: 100%;
height: 100%;
}
.bottomBoxLeft,.bottomBoxRight{
display: inline-block;
width: 50%;
height:100%;
border:0px solid red;
position: relative;
}
.havefreeTb{
height:100%;width: 100%;
}
.havefreeTb td{
text-align: center;
vertical-align: middle;
}
.havefreeTb >tr> td:last-child{
font-size: 12px;text-align: left;
}
/*空余*/
.havefreeTb .free{
background-image: -webkit-linear-gradient(bottom, #00CAFE, #2772F4);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 24px;
}
/*占有*/
.havefreeTb .have{
background-image: -webkit-linear-gradient(bottom, #FFBA00, #FF8100);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 24px;
}
.freeText,.haveText{
margin-top:5px;
}
}
</style>
|