|
@@ -26,7 +26,7 @@
|
26
|
26
|
:top="60"
|
27
|
27
|
yAxisName="(元)"
|
28
|
28
|
:tooltip="tooltipFormat"
|
29
|
|
- :dataset="bardata"
|
|
29
|
+ :dataset="modelData2"
|
30
|
30
|
:encode="[
|
31
|
31
|
{x: 'month', y: 'hs', seriesName: '应收'},
|
32
|
32
|
{x: 'month', y: 'cs', seriesName: '实收'}]"
|
|
@@ -35,7 +35,7 @@
|
35
|
35
|
/>
|
36
|
36
|
</div>
|
37
|
37
|
<div style="width: 33%;height: 400px;">
|
38
|
|
- <h4 style="color: white">满位显示器</h4>
|
|
38
|
+ <h4 style="color: white">事件数据</h4>
|
39
|
39
|
<el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
|
40
|
40
|
<el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
|
41
|
41
|
</el-table-column>
|
|
@@ -48,17 +48,126 @@
|
48
|
48
|
</div>
|
49
|
49
|
<br>
|
50
|
50
|
</div>
|
|
51
|
+ <br>
|
|
52
|
+ <br>
|
|
53
|
+ <div style="width: 100%;display: flex;justify-content: space-between;">
|
|
54
|
+ <div style="width: 33%;height: 400px;">
|
|
55
|
+ <div align="center" style="color: white">停车趋势</div>
|
|
56
|
+ <linechart
|
|
57
|
+ :autoStop="false"
|
|
58
|
+ :top="30"
|
|
59
|
+ :bottom="30"
|
|
60
|
+ :left="40"
|
|
61
|
+ :legendTop="0"
|
|
62
|
+ yAxisName="(%)"
|
|
63
|
+ :dataset="linedata"
|
|
64
|
+ :tooltipFormat="lineTooltipFormat1"
|
|
65
|
+ :encode="[
|
|
66
|
+ { x: 'month', y: 'lastAmount', seriesName: '停车总时长(时)',bool:'true' },
|
|
67
|
+ ]"
|
|
68
|
+ id="sxcyfzqk1"
|
|
69
|
+ />
|
|
70
|
+ </div>
|
|
71
|
+ <div style="width: 33%;height: 400px;">
|
|
72
|
+ <div align="center" style="color: white">泊位周转趋势</div>
|
|
73
|
+ <linechart
|
|
74
|
+ :autoStop="false"
|
|
75
|
+ :top="30"
|
|
76
|
+ :bottom="30"
|
|
77
|
+ :left="40"
|
|
78
|
+ :legendTop="0"
|
|
79
|
+ yAxisName="(%)"
|
|
80
|
+ :dataset="linedata2"
|
|
81
|
+ :tooltipFormat="lineTooltipFormat1"
|
|
82
|
+ :encode="[
|
|
83
|
+ { x: 'month', y: 'lastAmount', seriesName: '当日平均周转次数',bool:'true' },
|
|
84
|
+ ]"
|
|
85
|
+ id="bwzzqs"
|
|
86
|
+ />
|
|
87
|
+ </div>
|
|
88
|
+ <div style="width: 33%;height: 400px;">
|
|
89
|
+ <div align="center" style="color: white">泊位利用率趋势</div>
|
|
90
|
+ <linechart
|
|
91
|
+ :autoStop="false"
|
|
92
|
+ :top="30"
|
|
93
|
+ :bottom="30"
|
|
94
|
+ :left="40"
|
|
95
|
+ :legendTop="0"
|
|
96
|
+ yAxisName="(%)"
|
|
97
|
+ :dataset="linedata3"
|
|
98
|
+ :tooltipFormat="lineTooltipFormat1"
|
|
99
|
+ :encode="[
|
|
100
|
+ { x: 'month', y: 'lastAmount', seriesName: '当日平均利用率(%)',bool:'true' },
|
|
101
|
+ ]"
|
|
102
|
+ id="bwlylqs"
|
|
103
|
+ />
|
|
104
|
+ </div>
|
|
105
|
+ </div>
|
|
106
|
+ <br>
|
|
107
|
+ <br>
|
|
108
|
+ <div style="width: 100%;display: flex;justify-content: space-between;">
|
|
109
|
+ <div style="width: 33%;height: 400px;">
|
|
110
|
+ <div align="center" style="color: white">实缴趋势</div>
|
|
111
|
+ <linechart
|
|
112
|
+ :autoStop="false"
|
|
113
|
+ :top="30"
|
|
114
|
+ :bottom="30"
|
|
115
|
+ :left="40"
|
|
116
|
+ :legendTop="0"
|
|
117
|
+ yAxisName="(%)"
|
|
118
|
+ :dataset="linedata4"
|
|
119
|
+ :tooltipFormat="lineTooltipFormat1"
|
|
120
|
+ :encode="[
|
|
121
|
+ { x: 'month', y: 'lastAmount', seriesName: '实缴率(%)',bool:'true' },
|
|
122
|
+ ]"
|
|
123
|
+ id="sjqs"
|
|
124
|
+ />
|
|
125
|
+ </div>
|
|
126
|
+ <div style="width: 33%;height: 400px;">
|
|
127
|
+ <div align="center" style="color: white">泊位实时占用率</div>
|
|
128
|
+ <linechart
|
|
129
|
+ :autoStop="false"
|
|
130
|
+ :top="30"
|
|
131
|
+ :bottom="30"
|
|
132
|
+ :left="40"
|
|
133
|
+ :legendTop="0"
|
|
134
|
+ yAxisName="(%)"
|
|
135
|
+ :dataset="linedata5"
|
|
136
|
+ :tooltipFormat="lineTooltipFormat1"
|
|
137
|
+ :encode="[
|
|
138
|
+ { x: 'month', y: 'lastAmount', seriesName: '实时占用率',bool:'true' },
|
|
139
|
+ ]"
|
|
140
|
+ id="bwsszyl"
|
|
141
|
+ />
|
|
142
|
+ </div>
|
|
143
|
+ <div style="width: 33%;height: 400px;">
|
|
144
|
+ <h4 style="color: white">动态信息监控</h4>
|
|
145
|
+ <el-table :data="tableData2" style="background: #2a2a2a;border-color: #333;">
|
|
146
|
+ <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
|
|
147
|
+ </el-table-column>
|
|
148
|
+ </el-table>
|
|
149
|
+ <div class="table-pagination">
|
|
150
|
+ <el-pagination :background="false" layout="total, prev, pager, next" :total="total2" @current-change="handlePageChange"
|
|
151
|
+ :current-page.sync="pageNum2" :page-size.sync="pageSize2">
|
|
152
|
+ </el-pagination>
|
|
153
|
+ </div>
|
|
154
|
+ </div>
|
|
155
|
+ </div>
|
51
|
156
|
|
52
|
157
|
|
53
|
158
|
</div>
|
54
|
159
|
</template>
|
55
|
160
|
<script>
|
56
|
161
|
import piechart from "@/components/pieChart";
|
|
162
|
+import barchart from "@/components/barChart";
|
|
163
|
+import linechart from "@/components/lineChart";
|
57
|
164
|
import api from "@/api/article_z";
|
58
|
165
|
|
59
|
166
|
export default {
|
60
|
167
|
components: {
|
61
|
|
- piechart
|
|
168
|
+ piechart,
|
|
169
|
+ barchart,
|
|
170
|
+ linechart
|
62
|
171
|
},
|
63
|
172
|
data() {
|
64
|
173
|
return {
|
|
@@ -72,16 +181,68 @@ export default {
|
72
|
181
|
key: 'deviceState'
|
73
|
182
|
}
|
74
|
183
|
],
|
75
|
|
- modelPieColor: ["#2E8B57","#9078f8"],
|
76
|
|
- modelData: [],
|
77
|
|
- modelPieColor2: ["#2E8B57","#9078f8"],
|
78
|
|
- modelData2: [],
|
79
|
|
- modelPieColor3: ["#2E8B57","#9078f8"],
|
|
184
|
+ columns2: [
|
|
185
|
+ {
|
|
186
|
+ label: '时间',
|
|
187
|
+ key: 'deviceName'
|
|
188
|
+ },
|
|
189
|
+ {
|
|
190
|
+ label: '事件',
|
|
191
|
+ key: 'deviceState'
|
|
192
|
+ },
|
|
193
|
+ {
|
|
194
|
+ label: '车牌号',
|
|
195
|
+ key: 'deviceState'
|
|
196
|
+ },
|
|
197
|
+ {
|
|
198
|
+ label: '停车场',
|
|
199
|
+ key: 'deviceState'
|
|
200
|
+ }
|
|
201
|
+ ],
|
|
202
|
+ modelPieColor: ["#2E8B57","#9078f8","#00FFFF","#DAA520","#20B2AA"],
|
|
203
|
+ modelData: [{"name":"A区","value":"300"},{"name":"B区","value":"600"},{"name":"C区","value":"100"}],
|
|
204
|
+ modelPieColor2: ["#2E8B57","#9078f8","#00FFFF","#DAA520","#20B2AA"],
|
|
205
|
+ modelData2: [{
|
|
206
|
+ "mouth": "市图书馆停车场",
|
|
207
|
+ "hs": 6053,
|
|
208
|
+ "cs": 1921
|
|
209
|
+ },
|
|
210
|
+ {
|
|
211
|
+ "mouth": "中山公园停车场",
|
|
212
|
+ "hs": 6033,
|
|
213
|
+ "cs": 3766
|
|
214
|
+ },
|
|
215
|
+ {
|
|
216
|
+ "mouth": "天地广场停车场",
|
|
217
|
+ "hs": 2258,
|
|
218
|
+ "cs": 2513
|
|
219
|
+ }],
|
|
220
|
+ modelPieColor3: ["#2E8B57","#9078f8","#00FFFF","#DAA520","#20B2AA"],
|
80
|
221
|
modelData3: [],
|
81
|
222
|
tableData: [],
|
|
223
|
+ tableData2: [],
|
|
224
|
+ linedata:[{
|
|
225
|
+ "mouth": "星期一",
|
|
226
|
+ "lastAmount": 14
|
|
227
|
+ },
|
|
228
|
+ {
|
|
229
|
+ "mouth": "星期二",
|
|
230
|
+ "lastAmount": 46
|
|
231
|
+ },
|
|
232
|
+ {
|
|
233
|
+ "mouth": "星期三",
|
|
234
|
+ "lastAmount": 59
|
|
235
|
+ },],
|
|
236
|
+ linedata2:[],
|
|
237
|
+ linedata3:[],
|
|
238
|
+ linedata4:[],
|
|
239
|
+ linedata5:[],
|
82
|
240
|
total: 0,
|
83
|
241
|
pageSize: 5,
|
84
|
242
|
pageNum: 1,
|
|
243
|
+ total2: 0,
|
|
244
|
+ pageSize2: 5,
|
|
245
|
+ pageNum2: 1,
|
85
|
246
|
radio: '2',
|
86
|
247
|
dialogVisible: false,
|
87
|
248
|
selRow: {},
|
|
@@ -93,8 +254,8 @@ export default {
|
93
|
254
|
let params4 = {current: pageNum, size: pageSize}
|
94
|
255
|
let requestList = [api.queryEquipmentRunning_Sxt(), api.queryEquipmentRunning_Zj(),api.queryEquipmentRunning_Mwxsq(), api.sbyxjcList(params4)];
|
95
|
256
|
Promise.all(requestList).then(res => {
|
96
|
|
- that.modelData = res[0].data || []
|
97
|
|
- that.modelData2 = res[1].data || []
|
|
257
|
+ //that.modelData = res[0].data || []
|
|
258
|
+ //that.modelData2 = res[1].data || []
|
98
|
259
|
that.modelData3 = res[2].data || []
|
99
|
260
|
this.tableData = res[3].data.records || []
|
100
|
261
|
this.total = res[3].data.total || 0
|
|
@@ -113,6 +274,36 @@ export default {
|
113
|
274
|
this.total = res.data.total
|
114
|
275
|
})
|
115
|
276
|
},
|
|
277
|
+ lineTooltipFormat1(params) {
|
|
278
|
+ const data = params[0].data;
|
|
279
|
+ return `<div class="line-tooltip">
|
|
280
|
+ <div style="color: ${params[0].color}">${params[0].seriesName}: ${
|
|
281
|
+ params[0].data.lastAmount || "--"
|
|
282
|
+ }(%)</div>`;
|
|
283
|
+ },
|
|
284
|
+ tooltipFormat(params) {
|
|
285
|
+ const type = params[0].seriesType;
|
|
286
|
+ const data = params[0].data;
|
|
287
|
+ // ${params[0].name || "--"}月:
|
|
288
|
+ return `<div class="line-tooltip">
|
|
289
|
+<div>${params[0].seriesName}: ${
|
|
290
|
+ params[0].data.hs || "--"}个</div>
|
|
291
|
+<div>${params[1].seriesName}: ${
|
|
292
|
+ params[0].data.cs || "--"}个</div>
|
|
293
|
+</div>`;
|
|
294
|
+ },
|
|
295
|
+ xLabelFormat(name) {
|
|
296
|
+ const nameArr = []
|
|
297
|
+ for (let i = 0; i < name.length; i += 7) {
|
|
298
|
+ nameArr.push(name.substring(i, i + 7))
|
|
299
|
+ }
|
|
300
|
+ return nameArr.join('\n');
|
|
301
|
+ },
|
|
302
|
+ dashAccessDataAnalysisStat1(){
|
|
303
|
+ api.dashAccessDataAnalysisStat1().then(res =>{
|
|
304
|
+ this.bardata = res.data
|
|
305
|
+ })
|
|
306
|
+ },
|
116
|
307
|
}
|
117
|
308
|
}
|
118
|
309
|
</script>
|