|
@@ -1,31 +1,31 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="body-wrapper">
|
3
|
3
|
<el-form class="form-wrapper" :inline="true" :model="formInline1">
|
4
|
|
- <el-form-item label="行政区">
|
5
|
|
- <el-select clearable v-model="formInline1.regionCode" placeholder="请选择" popper-class="cur-select">
|
6
|
|
- <el-option v-for="item in districtOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
7
|
|
- </el-select>
|
8
|
|
- </el-form-item>
|
9
|
|
- <el-form-item label="街道">
|
10
|
|
- <el-input v-model="formInline1.streetName" placeholder="请输入"></el-input>
|
11
|
|
- </el-form-item>
|
|
4
|
+<!-- <el-form-item label="行政区">-->
|
|
5
|
+<!-- <el-select clearable v-model="formInline1.regionCode" placeholder="请选择" popper-class="cur-select">-->
|
|
6
|
+<!-- <el-option v-for="item in districtOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>-->
|
|
7
|
+<!-- </el-select>-->
|
|
8
|
+<!-- </el-form-item>-->
|
|
9
|
+<!-- <el-form-item label="街道">-->
|
|
10
|
+<!-- <el-input v-model="formInline1.streetName" placeholder="请输入"></el-input>-->
|
|
11
|
+<!-- </el-form-item>-->
|
12
|
12
|
<el-form-item label="停车场">
|
13
|
13
|
<el-select clearable filterable v-model="formInline1.parkId" placeholder="请选择" popper-class="cur-select">
|
14
|
14
|
<el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
|
15
|
15
|
</el-select>
|
16
|
16
|
</el-form-item>
|
17
|
|
- <el-form-item label="查询日期">
|
18
|
|
- <el-date-picker
|
19
|
|
- clearable
|
20
|
|
- v-model="formInline1.time"
|
21
|
|
- type="daterange"
|
22
|
|
- range-separator="至"
|
23
|
|
- start-placeholder="开始日期"
|
24
|
|
- value-format="yyyy-MM-dd"
|
25
|
|
- :picker-options="{disabledDate: (time) => time.getTime() > Date.now()}"
|
26
|
|
- end-placeholder="结束日期">
|
27
|
|
- </el-date-picker>
|
28
|
|
- </el-form-item>
|
|
17
|
+<!-- <el-form-item label="查询日期">-->
|
|
18
|
+<!-- <el-date-picker-->
|
|
19
|
+<!-- clearable-->
|
|
20
|
+<!-- v-model="formInline1.time"-->
|
|
21
|
+<!-- type="daterange"-->
|
|
22
|
+<!-- range-separator="至"-->
|
|
23
|
+<!-- start-placeholder="开始日期"-->
|
|
24
|
+<!-- value-format="yyyy-MM-dd"-->
|
|
25
|
+<!-- :picker-options="{disabledDate: (time) => time.getTime() > Date.now()}"-->
|
|
26
|
+<!-- end-placeholder="结束日期">-->
|
|
27
|
+<!-- </el-date-picker>-->
|
|
28
|
+<!-- </el-form-item>-->
|
29
|
29
|
<el-form-item>
|
30
|
30
|
<el-button type="primary" @click="queryAll">查询</el-button>
|
31
|
31
|
</el-form-item>
|
|
@@ -34,22 +34,18 @@
|
34
|
34
|
<div style="display: flex; justify-content: space-between;">
|
35
|
35
|
<div style="width: 50%; height: 300px">
|
36
|
36
|
<div align="center" style="color: white">停车饱和度</div>
|
37
|
|
- <barchart
|
38
|
|
- class="side-chart"
|
|
37
|
+ <linechart
|
39
|
38
|
:autoStop="false"
|
40
|
|
- :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
|
41
|
|
- legendIcon="react"
|
|
39
|
+ :top="30"
|
42
|
40
|
:bottom="30"
|
43
|
|
- :xlabelFormat="xLabelFormat"
|
44
|
|
- :top="60"
|
|
41
|
+ :left="40"
|
|
42
|
+ :legendTop="0"
|
45
|
43
|
yAxisName="(个)"
|
46
|
|
- :tooltip="tooltipFormat"
|
47
|
44
|
:dataset="bardata"
|
|
45
|
+ :tooltipFormat="lineTooltipFormat6"
|
48
|
46
|
:encode="[
|
49
|
|
- {x: 'month', y: 'hs', seriesName: '占用'},
|
50
|
|
- {x: 'month', y: 'cs', seriesName: '空闲'}]"
|
51
|
|
- :labelSize="15"
|
52
|
|
- id="fxdqhszzt"
|
|
47
|
+ {x: 'mouth', y: 'lastYearAmount', seriesName: '占用' ,bool:'true'}]"
|
|
48
|
+ id="tcbhd"
|
53
|
49
|
/>
|
54
|
50
|
</div>
|
55
|
51
|
<div style="width: 50%; height: 300px">
|
|
@@ -71,70 +67,72 @@
|
71
|
67
|
</div>
|
72
|
68
|
</div>
|
73
|
69
|
<div style="display: flex; justify-content: space-between;margin-top: 5%">
|
74
|
|
- <div style="width: 50%; height: 300px;">
|
75
|
|
- <div align="center" style="color: white">停车场营收分析</div>
|
|
70
|
+ <div style="width: 50%; height: 300px;padding-left: 25px">
|
|
71
|
+ <div align="center" style="color: white">车辆进出场趋势</div>
|
76
|
72
|
<linechart
|
77
|
73
|
:autoStop="false"
|
78
|
74
|
:top="30"
|
79
|
75
|
:bottom="30"
|
80
|
76
|
:left="40"
|
81
|
77
|
:legendTop="0"
|
82
|
|
- yAxisName="(元)"
|
83
|
|
- :dataset="linedata"
|
84
|
|
- :tooltipFormat="lineTooltipFormat"
|
|
78
|
+ yAxisName="(%)"
|
|
79
|
+ :dataset="linedata2"
|
|
80
|
+ :tooltipFormat="lineTooltipFormat2"
|
85
|
81
|
:encode="[
|
86
|
|
- { x: 'month', y: 'lastAmount', seriesName: '泊位收入',bool:'true' }
|
|
82
|
+ { x: 'month', y: 'lastYearAmount', seriesName: '进流率',bool:'true' },
|
|
83
|
+ { x: 'month', y: 'thisYearAmount', seriesName: '出流率',bool:'true' },
|
87
|
84
|
]"
|
88
|
|
- id="sxcyfzqk"
|
|
85
|
+ id="sxcyfzqk2"
|
89
|
86
|
/>
|
90
|
87
|
</div>
|
91
|
|
- <div style="width: 50%; height: 300px">
|
92
|
|
- <div align="center" style="color: white">车辆类型进场占比</div>
|
|
88
|
+ <div style="width: 50%; height: 300px; position: relative;">
|
|
89
|
+ <div style="position: absolute; left: 0; color: white">车辆类型进场占比</div>
|
93
|
90
|
<piechart
|
94
|
91
|
class="model-pie-body"
|
95
|
92
|
id="chart1"
|
96
|
93
|
:roseType="false"
|
97
|
|
- :radiusArr="['30%', '70%']"
|
|
94
|
+ :radiusArr="['30%', '50%']"
|
98
|
95
|
:colorArr="modelPieColor"
|
99
|
|
- :labelFormat="['{name|{b}}', '{sub|{d}%}', '{hr|}']"
|
|
96
|
+ :labelFormat="['{name|{b} {d}%}', '{hr|}']"
|
100
|
97
|
:dataset="modelData.list"
|
101
|
98
|
:encode="{ itemName: 'name', value: 'value' }"
|
102
|
99
|
/>
|
103
|
100
|
</div>
|
104
|
101
|
</div>
|
105
|
102
|
<div style="display: flex; justify-content: space-between;margin-top: 5%">
|
106
|
|
- <div style="width: 50%; height: 300px;padding-left: 25px">
|
107
|
|
- <div align="center" style="color: white">车辆进出场趋势</div>
|
|
103
|
+ <div style="width: 50%; height: 450px;">
|
|
104
|
+ <div align="center" style="color: white">停车场营收分析</div>
|
108
|
105
|
<linechart
|
109
|
106
|
:autoStop="false"
|
110
|
107
|
:top="30"
|
111
|
|
- :bottom="30"
|
|
108
|
+ :bottom="200"
|
112
|
109
|
:left="40"
|
113
|
110
|
:legendTop="0"
|
114
|
|
- yAxisName="(%)"
|
115
|
|
- :dataset="linedata2"
|
116
|
|
- :tooltipFormat="lineTooltipFormat2"
|
|
111
|
+ yAxisName="(元)"
|
|
112
|
+ :dataset="linedata"
|
|
113
|
+ :xlabelFormat="xlabelFormat"
|
|
114
|
+ :tooltipFormat="lineTooltipFormat"
|
117
|
115
|
:encode="[
|
118
|
|
- { x: 'month', y: 'lastYearAmount', seriesName: '进流率',bool:'true' },
|
119
|
|
- { x: 'month', y: 'thisYearAmount', seriesName: '出流率',bool:'true' },
|
|
116
|
+ { x: 'month', y: 'lastAmount', seriesName: '泊位收入',bool:'true' }
|
120
|
117
|
]"
|
121
|
|
- id="sxcyfzqk2"
|
|
118
|
+ id="sxcyfzqk"
|
122
|
119
|
/>
|
123
|
120
|
</div>
|
124
|
|
- <div style="width: 50%; height: 300px;">
|
|
121
|
+ <div style="width: 50%; height: 450px;">
|
125
|
122
|
<div align="center" style="color: white">停车场营收对比分析</div>
|
126
|
123
|
<linechart
|
127
|
124
|
:autoStop="false"
|
128
|
125
|
:top="30"
|
129
|
|
- :bottom="30"
|
|
126
|
+ :bottom="200"
|
130
|
127
|
:left="40"
|
131
|
128
|
:legendTop="0"
|
132
|
129
|
yAxisName="(元)"
|
133
|
130
|
:dataset="linedata3"
|
|
131
|
+ :xlabelFormat="xlabelFormat"
|
134
|
132
|
:tooltipFormat="lineTooltipFormat3"
|
135
|
133
|
:encode="[
|
136
|
|
- { x: 'month', y: 'lastYearAmount', seriesName: '建材市场南侧停车场',bool:'true' },
|
137
|
|
- { x: 'month', y: 'thisYearAmount', seriesName: '市民之家东侧停车场',bool:'true' },
|
|
134
|
+ { x: 'month', y: 'lastYearAmount', seriesName: '今日',bool:'true' },
|
|
135
|
+ { x: 'month', y: 'thisYearAmount', seriesName: '昨日',bool:'true' },
|
138
|
136
|
]"
|
139
|
137
|
id="sxcyfzqk3"
|
140
|
138
|
/>
|
|
@@ -187,6 +185,10 @@ export default {
|
187
|
185
|
|
188
|
186
|
},
|
189
|
187
|
methods: {
|
|
188
|
+ xlabelFormat(name) {
|
|
189
|
+ var str = name.split("");
|
|
190
|
+ return str.join("\n");
|
|
191
|
+ },
|
190
|
192
|
getParkDic() {
|
191
|
193
|
api.parkDic().then(res => {
|
192
|
194
|
this.carOptions = res.data || [];
|
|
@@ -256,6 +258,20 @@ export default {
|
256
|
258
|
params[0].data.lastAmount || "--"
|
257
|
259
|
}(元)</div>`;
|
258
|
260
|
},
|
|
261
|
+ lineTooltipFormat6(params) {
|
|
262
|
+ const data = params[0].data
|
|
263
|
+ let zb = '--'
|
|
264
|
+ console.log(params[0].data, '999999')
|
|
265
|
+ if (Number(params[0].data.thisYearAmount) > 0) {
|
|
266
|
+ zb = (Number(params[0].data.lastYearAmount)/Number(params[0].data.thisYearAmount) * 100 ).toFixed(2)
|
|
267
|
+ }
|
|
268
|
+ return `<div class="line-tooltip">
|
|
269
|
+ <div style="color: ${params[0].color}">${params[0].seriesName}: ${
|
|
270
|
+ params[0].data.lastYearAmount
|
|
271
|
+ }个<div style="color: ${params[0].color}">饱和度: ${
|
|
272
|
+ zb
|
|
273
|
+ }%</div>`;
|
|
274
|
+ },
|
259
|
275
|
lineTooltipFormat2(params) {
|
260
|
276
|
const data = params[0].data;
|
261
|
277
|
return `<div class="line-tooltip">
|
|
@@ -271,10 +287,10 @@ export default {
|
271
|
287
|
const data = params[0].data;
|
272
|
288
|
return `<div class="line-tooltip">
|
273
|
289
|
<div style="color: ${params[0].color}">${params[0].seriesName}: ${
|
274
|
|
- params[0].data.lastYearAmount || "--"
|
|
290
|
+ params[0].data.lastYearAmount || "0"
|
275
|
291
|
}(元)</div>
|
276
|
292
|
<div style="color: ${params[1].color}">${params[1].seriesName}: ${
|
277
|
|
- params[0].data.thisYearAmount || "--"
|
|
293
|
+ params[0].data.thisYearAmount || "0"
|
278
|
294
|
}(元)</div>
|
279
|
295
|
</div>`;
|
280
|
296
|
},
|