|
@@ -0,0 +1,209 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="body-wrapper">
|
|
3
|
+ <div class="search-card">
|
|
4
|
+ <h5>车辆类型分析</h5>
|
|
5
|
+ </div>
|
|
6
|
+ <br>
|
|
7
|
+ <div class="charts">
|
|
8
|
+ <div style="width: 50%;height: 500px;">
|
|
9
|
+ <h4 style="color: white">新能源车占比</h4>
|
|
10
|
+ <piechart
|
|
11
|
+ class="model-pie-body"
|
|
12
|
+ id="chart1"
|
|
13
|
+ :radiusArr="['30%', '70%']"
|
|
14
|
+ :roseType = "false"
|
|
15
|
+ :colorArr="modelPieColor"
|
|
16
|
+ :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
|
|
17
|
+ :dataset="modelData"
|
|
18
|
+ :encode="{ itemName: 'name', value: 'value' }"
|
|
19
|
+ />
|
|
20
|
+ </div>
|
|
21
|
+ <div style="width: 50%;height: 500px;">
|
|
22
|
+ <h4 style="color: white">车型分类</h4>
|
|
23
|
+ <piechart
|
|
24
|
+ class="model-pie-body"
|
|
25
|
+ id="chart3"
|
|
26
|
+ :radiusArr="['30%', '70%']"
|
|
27
|
+ :roseType = "false"
|
|
28
|
+ :colorArr="modelPieColor4"
|
|
29
|
+ :labelFormat="['{name|{b}}', '{sub|{@value}辆 {d}%}', '{hr|}']"
|
|
30
|
+ :dataset="modelData4"
|
|
31
|
+ :encode="{ itemName: 'name', value: 'value' }"
|
|
32
|
+ />
|
|
33
|
+ </div>
|
|
34
|
+ <br>
|
|
35
|
+ </div>
|
|
36
|
+ <br>
|
|
37
|
+ <br>
|
|
38
|
+ <div class="charts">
|
|
39
|
+ <div style="width: 50%;height: 500px;">
|
|
40
|
+ <h4 style="color: white">新能源趋势</h4>
|
|
41
|
+ <linechart
|
|
42
|
+ :autoStop="false"
|
|
43
|
+ :top="30"
|
|
44
|
+ :bottom="30"
|
|
45
|
+ :left="40"
|
|
46
|
+ :legendTop="0"
|
|
47
|
+ yAxisName="%"
|
|
48
|
+ :dataset="linedata"
|
|
49
|
+ :tooltipFormat="lineTooltipFormat"
|
|
50
|
+ :encode="[
|
|
51
|
+ { x: 'month', y: 'lastYearAmount', seriesName: '入场',bool:'true' },
|
|
52
|
+ ]"
|
|
53
|
+ id="sxcyfzqk"
|
|
54
|
+ />
|
|
55
|
+ </div>
|
|
56
|
+ <div style="width: 50%;height: 500px;">
|
|
57
|
+ <h4 style="color: white">新能源车排名</h4>
|
|
58
|
+ <div class="progress-wrapper">
|
|
59
|
+ <div style="display: flex;line-height: 50px;" v-for="item in progresslist">
|
|
60
|
+ <span style="color: #fff; padding: 0 10px;">{{item.label}}</span>
|
|
61
|
+ <el-progress :text-inside="false" :stroke-width="26" :percentage="item.value" define-back-color="#191e3a" text-color="#888ea8"></el-progress>
|
|
62
|
+ </div>
|
|
63
|
+ </div>
|
|
64
|
+ </div>
|
|
65
|
+ <br>
|
|
66
|
+ </div>
|
|
67
|
+ </div>
|
|
68
|
+</template>
|
|
69
|
+<script>
|
|
70
|
+import piechart from "@/components/pieChart";
|
|
71
|
+import linechart from "@/components/lineChart";
|
|
72
|
+import api from "@/api/article_liao";
|
|
73
|
+export default {
|
|
74
|
+ components: {
|
|
75
|
+ piechart,
|
|
76
|
+ linechart
|
|
77
|
+ },
|
|
78
|
+ data() {
|
|
79
|
+ return {
|
|
80
|
+ linedata: [],
|
|
81
|
+ modelPieColor: ["#4382f6","#9078f8","#DAA520","#2E8B57"],
|
|
82
|
+ modelData: [],
|
|
83
|
+ modelPieColor4: ["#4382f6","#9078f8"],
|
|
84
|
+ modelData4: [],
|
|
85
|
+ modelPieColor5: ["#4382f6","#9078f8"],
|
|
86
|
+ modelData5: [],
|
|
87
|
+ progresslist: [{
|
|
88
|
+ label: '比亚迪',
|
|
89
|
+ value: 30
|
|
90
|
+ },{
|
|
91
|
+ label: '特斯拉',
|
|
92
|
+ value: 50
|
|
93
|
+ },{
|
|
94
|
+ label: '特斯拉',
|
|
95
|
+ value: 70
|
|
96
|
+ }]
|
|
97
|
+ }
|
|
98
|
+ },
|
|
99
|
+ mounted() {
|
|
100
|
+ this.parkBehaviorDuration()
|
|
101
|
+ this.parkBehaviorRange()
|
|
102
|
+ this.parkBehaviorTemporary()
|
|
103
|
+ this.parkBehaviorNight()
|
|
104
|
+ },
|
|
105
|
+ watch: {
|
|
106
|
+ },
|
|
107
|
+ methods: {
|
|
108
|
+ lineTooltipFormat(params) {
|
|
109
|
+ return `<div class="line-tooltip">
|
|
110
|
+ <div style="color: ${params[0].color}">${params[0].seriesName}: ${
|
|
111
|
+ params[0].data.lastYearAmount || "--"
|
|
112
|
+ }</div>
|
|
113
|
+ </div>`;
|
|
114
|
+ },
|
|
115
|
+ parkBehaviorDuration() {
|
|
116
|
+ api.parkBehaviorDuration().then(res =>{
|
|
117
|
+ this.modelData = res.data
|
|
118
|
+ })
|
|
119
|
+ },
|
|
120
|
+ parkBehaviorRange(){
|
|
121
|
+ api.parkBehaviorRange().then(res =>{
|
|
122
|
+ this.linedata = res.data
|
|
123
|
+ })
|
|
124
|
+ },
|
|
125
|
+ parkBehaviorTemporary(){
|
|
126
|
+ api.parkBehaviorTemporary().then(res =>{
|
|
127
|
+ this.modelData4 = res.data
|
|
128
|
+ })
|
|
129
|
+ },
|
|
130
|
+ parkBehaviorNight(){
|
|
131
|
+ api.parkBehaviorNight().then(res =>{
|
|
132
|
+ this.modelData5 = res.data
|
|
133
|
+ })
|
|
134
|
+ },
|
|
135
|
+ }
|
|
136
|
+}
|
|
137
|
+</script>
|
|
138
|
+<style lang="scss" scoped>
|
|
139
|
+.body-wrapper {
|
|
140
|
+ padding: 20px;
|
|
141
|
+ background: #0c0c0c;
|
|
142
|
+ width: 100%;
|
|
143
|
+ .button-block{
|
|
144
|
+ text-align: right;
|
|
145
|
+ margin-bottom: 20px;
|
|
146
|
+ }
|
|
147
|
+ .table-pagination{
|
|
148
|
+ text-align: right;
|
|
149
|
+ }
|
|
150
|
+ .search-card{
|
|
151
|
+ font-size: 24px;
|
|
152
|
+ font-weight: bold;
|
|
153
|
+ color: #3498db;
|
|
154
|
+ margin-bottom: 20px;
|
|
155
|
+ .input-wrapper{
|
|
156
|
+ width: 36%;
|
|
157
|
+ }
|
|
158
|
+ }
|
|
159
|
+}
|
|
160
|
+
|
|
161
|
+.charts{
|
|
162
|
+ width: 100%;
|
|
163
|
+ display: flex;
|
|
164
|
+ justify-content: space-between;
|
|
165
|
+}
|
|
166
|
+.btn_save{
|
|
167
|
+ background-color: #3498db;
|
|
168
|
+ color: #ffffff;
|
|
169
|
+ padding: 10px 20px;
|
|
170
|
+ cursor: pointer;
|
|
171
|
+ border: none;
|
|
172
|
+ border-radius: 4px;
|
|
173
|
+ font-size: 16px;
|
|
174
|
+ height: 40px;
|
|
175
|
+}
|
|
176
|
+
|
|
177
|
+.sel{
|
|
178
|
+ height: 200px;
|
|
179
|
+ margin-right: 10px;
|
|
180
|
+}
|
|
181
|
+
|
|
182
|
+.input-search{
|
|
183
|
+ width: 100%;
|
|
184
|
+ padding: 10px;
|
|
185
|
+ margin-bottom: 20px;
|
|
186
|
+ box-sizing: border-box;
|
|
187
|
+ background-color: #2a2a2a;
|
|
188
|
+ border: 1px solid #333;
|
|
189
|
+ color: #ffffff;
|
|
190
|
+}
|
|
191
|
+.audit-dialog{
|
|
192
|
+ .mg-bt{
|
|
193
|
+ margin-bottom: 24px;
|
|
194
|
+ }
|
|
195
|
+ .label{
|
|
196
|
+ text-align: right;
|
|
197
|
+ }
|
|
198
|
+}
|
|
199
|
+.progress-wrapper {
|
|
200
|
+ width: 100%;
|
|
201
|
+ height: 480px;
|
|
202
|
+ .el-progress {
|
|
203
|
+ line-height: 50px;
|
|
204
|
+ }
|
|
205
|
+}
|
|
206
|
+/deep/.el-progress-bar__outer {
|
|
207
|
+ background-color: #191e3a !important;
|
|
208
|
+}
|
|
209
|
+</style>
|