|
@@ -1,26 +1,40 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="body-wrapper">
|
3
|
3
|
<el-form class="form-wrapper" :inline="true" :model="formInline" style="margin-bottom: 20px;">
|
4
|
|
- <el-row>
|
5
|
|
- <el-col :span="8">
|
6
|
|
- <el-form-item label="查询日期:">
|
7
|
|
- <el-date-picker
|
8
|
|
- v-model="formInline.time"
|
9
|
|
- type="daterange"
|
10
|
|
- range-separator="至"
|
11
|
|
- start-placeholder="开始日期"
|
12
|
|
- value-format="yyyy-MM-dd"
|
13
|
|
- end-placeholder="结束日期">
|
14
|
|
- </el-date-picker>
|
15
|
|
- </el-form-item>
|
16
|
|
- </el-col>
|
17
|
|
- <el-col :span="8">
|
18
|
|
- <el-form-item>
|
19
|
|
- <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
|
20
|
|
- </el-form-item>
|
21
|
|
- </el-col>
|
22
|
|
- </el-row>
|
|
4
|
+ <el-form-item label="行政区">
|
|
5
|
+ <el-select clearable v-model="formInline.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 clearable label="重点区域">
|
|
10
|
+ <el-select clearable v-model="formInline.keyAreas" placeholder="请选择" popper-class="cur-select">
|
|
11
|
+ <el-option v-for="item in keyAreaOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
12
|
+ </el-select>
|
|
13
|
+ </el-form-item>
|
|
14
|
+ <el-form-item clearable label="具体道路">
|
|
15
|
+ <el-input v-model="formInline.streetName" placeholder="请输入"></el-input>
|
|
16
|
+ </el-form-item>
|
|
17
|
+ <el-form-item label="停车场">
|
|
18
|
+ <el-select clearable v-model="formInline.parkId" placeholder="请选择" popper-class="cur-select">
|
|
19
|
+ <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
|
|
20
|
+ </el-select>
|
|
21
|
+ </el-form-item>
|
|
22
|
+ <el-form-item label="查询日期">
|
|
23
|
+ <el-date-picker
|
|
24
|
+ clearable
|
|
25
|
+ v-model="formInline.time"
|
|
26
|
+ type="daterange"
|
|
27
|
+ range-separator="至"
|
|
28
|
+ start-placeholder="开始日期"
|
|
29
|
+ value-format="yyyy-MM-dd"
|
|
30
|
+ end-placeholder="结束日期">
|
|
31
|
+ </el-date-picker>
|
|
32
|
+ </el-form-item>
|
|
33
|
+ <el-form-item>
|
|
34
|
+ <el-button type="primary" @click="queryAll">查询</el-button>
|
|
35
|
+ </el-form-item>
|
23
|
36
|
</el-form>
|
|
37
|
+ <br>
|
24
|
38
|
<div style="width: 99%; height: 480px">
|
25
|
39
|
<h4 style="color: white">收费数据分析</h4>
|
26
|
40
|
<barchart
|
|
@@ -74,6 +88,7 @@
|
74
|
88
|
import piechart from "@/components/pieChart";
|
75
|
89
|
import barchart from "@/components/barChart";
|
76
|
90
|
import api from "@/api/article_liao";
|
|
91
|
+import options from '@/util/options'
|
77
|
92
|
|
78
|
93
|
export default {
|
79
|
94
|
components: {
|
|
@@ -82,6 +97,9 @@ export default {
|
82
|
97
|
},
|
83
|
98
|
data() {
|
84
|
99
|
return {
|
|
100
|
+ districtOptions: options.districtOptions,
|
|
101
|
+ keyAreaOptions: options.keyAreaOptions,
|
|
102
|
+ carOptions: [],
|
85
|
103
|
modelPieColor: ["#4382f6","#9078f8", "#79a7db", "#FF9800", "#9C27B0"],
|
86
|
104
|
modelPieColor1: ["#4382f6","#9078f8", "#6aa1e1", "#FF9800", "#9C27B0"],
|
87
|
105
|
modelData: {
|
|
@@ -90,33 +108,28 @@ export default {
|
90
|
108
|
},
|
91
|
109
|
bardata: [],
|
92
|
110
|
formInline: {
|
93
|
|
- time: ''
|
|
111
|
+ regionCode: '',
|
|
112
|
+ keyAreas: '',
|
|
113
|
+ streetName: '',
|
|
114
|
+ parkId: '',
|
|
115
|
+ time: [],
|
94
|
116
|
}
|
95
|
117
|
}
|
96
|
118
|
},
|
97
|
119
|
mounted() {
|
98
|
|
- this.businessAnalysisStat()
|
99
|
|
- this.businessAnalysisStat2()
|
100
|
|
- this.businessAnalysisStat3()
|
|
120
|
+ this.getParkDic()
|
|
121
|
+ this.queryAll()
|
101
|
122
|
},
|
102
|
123
|
watch: {
|
103
|
124
|
|
104
|
125
|
},
|
105
|
126
|
methods: {
|
106
|
|
- onSubmit() {
|
107
|
|
- this.businessAnalysisStat()
|
108
|
|
- this.businessAnalysisStat2()
|
109
|
|
- this.businessAnalysisStat3()
|
110
|
|
- },
|
111
|
|
- tooltipFormat(params) {
|
112
|
|
- const type = params[0].seriesType;
|
113
|
|
- const data = params[0].data;
|
114
|
|
- return `<div class="line-tooltip">
|
115
|
|
-<div>${params[0].seriesName}: ${
|
116
|
|
- params[0].data.hs || 0}元</div>
|
117
|
|
-</div>`;
|
|
127
|
+ getParkDic() {
|
|
128
|
+ api.parkDic().then(res => {
|
|
129
|
+ this.carOptions = res.data || [];
|
|
130
|
+ })
|
118
|
131
|
},
|
119
|
|
- businessAnalysisStat(){
|
|
132
|
+ queryAll() {
|
120
|
133
|
let params = {...this.formInline}
|
121
|
134
|
if (
|
122
|
135
|
this.formInline.time && this.formInline.time.length === 2 &&
|
|
@@ -128,38 +141,29 @@ export default {
|
128
|
141
|
params.end = this.formInline.time[1]
|
129
|
142
|
}
|
130
|
143
|
delete params.time
|
|
144
|
+ this.businessAnalysisStat(params)
|
|
145
|
+ this.businessAnalysisStat2(params)
|
|
146
|
+ this.businessAnalysisStat3(params)
|
|
147
|
+ },
|
|
148
|
+ tooltipFormat(params) {
|
|
149
|
+ const type = params[0].seriesType;
|
|
150
|
+ const data = params[0].data;
|
|
151
|
+ return `<div class="line-tooltip">
|
|
152
|
+<div>${params[0].seriesName}: ${
|
|
153
|
+ params[0].data.hs || 0}元</div>
|
|
154
|
+</div>`;
|
|
155
|
+ },
|
|
156
|
+ businessAnalysisStat(params){
|
131
|
157
|
api.businessAnalysisStat(params).then(res =>{
|
132
|
158
|
this.bardata = res.data
|
133
|
159
|
})
|
134
|
160
|
},
|
135
|
|
- businessAnalysisStat2(){
|
136
|
|
- let params = {...this.formInline}
|
137
|
|
- if (
|
138
|
|
- this.formInline.time && this.formInline.time.length === 2 &&
|
139
|
|
- this.formInline.time[1] !== ""
|
140
|
|
- ) {
|
141
|
|
- this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
|
142
|
|
- this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
|
143
|
|
- params.begin= this.formInline.time[0]
|
144
|
|
- params.end = this.formInline.time[1]
|
145
|
|
- }
|
146
|
|
- delete params.time
|
|
161
|
+ businessAnalysisStat2(params){
|
147
|
162
|
api.businessAnalysisStat2(params).then(res =>{
|
148
|
163
|
this.modelData.list = res.data
|
149
|
164
|
})
|
150
|
165
|
},
|
151
|
|
- businessAnalysisStat3(){
|
152
|
|
- let params = {...this.formInline}
|
153
|
|
- if (
|
154
|
|
- this.formInline.time && this.formInline.time.length === 2 &&
|
155
|
|
- this.formInline.time[1] !== ""
|
156
|
|
- ) {
|
157
|
|
- this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
|
158
|
|
- this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
|
159
|
|
- params.begin= this.formInline.time[0]
|
160
|
|
- params.end = this.formInline.time[1]
|
161
|
|
- }
|
162
|
|
- delete params.time
|
|
166
|
+ businessAnalysisStat3(params){
|
163
|
167
|
api.businessAnalysisStat3(params).then(res =>{
|
164
|
168
|
this.modelData.list1 = res.data
|
165
|
169
|
})
|