Browse Source

添加查询条件

duwendi 1 year ago
parent
commit
fa9da86cc4

+ 49 - 15
src/pages/index/components/berths_information.vue

@@ -14,8 +14,24 @@
14 14
       <el-form-item label="具体道路">
15 15
         <el-input  v-model="formInline.streetName" placeholder="请输入"></el-input>
16 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>
17 33
       <el-form-item>
18
-        <el-button type="primary" @click="onSubmit">查询</el-button>
34
+        <el-button type="primary" @click="queryAll">查询</el-button>
19 35
       </el-form-item>
20 36
     </el-form>
21 37
     <br>
@@ -80,6 +96,7 @@ export default {
80 96
     return {
81 97
       districtOptions: options.districtOptions,
82 98
       keyAreaOptions: options.keyAreaOptions,
99
+      carOptions: [],
83 100
       columns: [
84 101
         {
85 102
           label: '日期',
@@ -111,35 +128,52 @@ export default {
111 128
       formInline: {
112 129
         regionCode: '',
113 130
         keyAreas: '',
114
-        streetName: ''
131
+        streetName: '',
132
+        parkId: '',
133
+        time: [],
115 134
       }
116 135
     }
117 136
   },
118 137
   mounted() {
119
-    this.dashBerthsInformationStat1()
120
-    this.dashBerthsInformationStat2()
121
-    this.dashBerthsInformationStat3()
138
+    this.getParkDic()
139
+    this.queryAll()
122 140
   },
123 141
   watch: {
124 142
   },
125 143
   methods: {
126
-    onSubmit() {
127
-      this.dashBerthsInformationStat1()
128
-      this.dashBerthsInformationStat2()
129
-      this.dashBerthsInformationStat3()
144
+    getParkDic() {
145
+      api.parkDic().then(res => {
146
+        this.carOptions = res.data || [];
147
+      })
148
+    },
149
+    queryAll() {
150
+      let params = {...this.formInline}
151
+      if (
152
+        this.formInline.time && this.formInline.time.length === 2 &&
153
+        this.formInline.time[1] !== ""
154
+      ) {
155
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
156
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
157
+        params.begin= this.formInline.time[0]
158
+        params.end = this.formInline.time[1]
159
+      }
160
+      delete params.time
161
+      this.dashBerthsInformationStat1(params)
162
+      this.dashBerthsInformationStat2(params)
163
+      this.dashBerthsInformationStat3(params)
130 164
     },
131
-    dashBerthsInformationStat1(){
132
-      api.dashBerthsInformationStat1({...this.formInline}).then(res =>{
165
+    dashBerthsInformationStat1(params){
166
+      api.dashBerthsInformationStat1(params).then(res =>{
133 167
         this.modelData = res.data
134 168
       })
135 169
     },
136
-    dashBerthsInformationStat2(){
137
-      api.dashBerthsInformationStat2({...this.formInline}).then(res =>{
170
+    dashBerthsInformationStat2(params){
171
+      api.dashBerthsInformationStat2(params).then(res =>{
138 172
         this.modelData2 = res.data
139 173
       })
140 174
     },
141
-    dashBerthsInformationStat3(){
142
-      api.dashBerthsInformationStat3({...this.formInline}).then(res =>{
175
+    dashBerthsInformationStat3(params){
176
+      api.dashBerthsInformationStat3(params).then(res =>{
143 177
         this.modelData3 = res.data
144 178
       })
145 179
     },

+ 54 - 22
src/pages/index/components/berths_revenue.vue

@@ -17,6 +17,22 @@
17 17
       <el-form-item clearable label="具体道路">
18 18
         <el-input v-model="formInline.streetName" placeholder="请输入"></el-input>
19 19
       </el-form-item>
20
+      <el-form-item label="停车场">
21
+        <el-select clearable v-model="formInline.parkId" placeholder="请选择" popper-class="cur-select">
22
+          <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
23
+        </el-select>
24
+      </el-form-item>
25
+      <el-form-item label="查询日期">
26
+        <el-date-picker
27
+          clearable
28
+          v-model="formInline.time"
29
+          type="daterange"
30
+          range-separator="至"
31
+          start-placeholder="开始日期"
32
+          value-format="yyyy-MM-dd"
33
+          end-placeholder="结束日期">
34
+        </el-date-picker>
35
+      </el-form-item>
20 36
       <el-form-item>
21 37
         <el-button type="primary" @click="onSubmit">查询</el-button>
22 38
       </el-form-item>
@@ -147,6 +163,7 @@ export default {
147 163
     return {
148 164
       districtOptions: options.districtOptions,
149 165
       keyAreaOptions: options.keyAreaOptions,
166
+      carOptions: [],
150 167
       linedata: [],
151 168
       linedata2: [],
152 169
       linedata3: [],
@@ -162,26 +179,41 @@ export default {
162 179
       formInline: {
163 180
         regionCode: '',
164 181
         keyAreas: '',
165
-        streetName: ''
182
+        streetName: '',
183
+        parkId: '',
184
+        time: [],
166 185
       }
167 186
     }
168 187
   },
169 188
   mounted() {
170
-    this.dashBerthsRevenueStat1()
171
-    this.dashBerthsRevenueStat2()
172
-    this.dashBerthsRevenueStat3()
173
-    this.dashBerthsRevenueStat4()
174
-    this.dashBerthsRevenueStat5()
189
+    this.getParkDic()
190
+    this.queryAll()
175 191
   },
176 192
   watch: {
177 193
   },
178 194
   methods: {
179
-    onSubmit() {
180
-      this.dashBerthsRevenueStat1()
181
-      this.dashBerthsRevenueStat2()
182
-      this.dashBerthsRevenueStat3()
183
-      this.dashBerthsRevenueStat4()
184
-      this.dashBerthsRevenueStat5()
195
+    getParkDic() {
196
+      api.parkDic().then(res => {
197
+        this.carOptions = res.data || [];
198
+      })
199
+    },
200
+    queryAll() {
201
+      let params = {...this.formInline}
202
+      if (
203
+        this.formInline.time && this.formInline.time.length === 2 &&
204
+        this.formInline.time[1] !== ""
205
+      ) {
206
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
207
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
208
+        params.begin= this.formInline.time[0]
209
+        params.end = this.formInline.time[1]
210
+      }
211
+      delete params.time
212
+      this.dashBerthsRevenueStat1(params)
213
+      this.dashBerthsRevenueStat2(params)
214
+      this.dashBerthsRevenueStat3(params)
215
+      this.dashBerthsRevenueStat4(params)
216
+      this.dashBerthsRevenueStat5(params)
185 217
     },
186 218
     lineTooltipFormat(params) {
187 219
       return `<div class="line-tooltip">
@@ -189,28 +221,28 @@ export default {
189 221
         params[0].data.lastAmount  || "--"
190 222
       }元</div>`;
191 223
     },
192
-    dashBerthsRevenueStat1(){
193
-      api.dashBerthsRevenueStat1({...this.formInline}).then(res =>{
224
+    dashBerthsRevenueStat1(params){
225
+      api.dashBerthsRevenueStat1(params).then(res =>{
194 226
         this.linedata = res.data
195 227
       })
196 228
     },
197
-    dashBerthsRevenueStat2(){
198
-      api.dashBerthsRevenueStat2({...this.formInline}).then(res =>{
229
+    dashBerthsRevenueStat2(params){
230
+      api.dashBerthsRevenueStat2(params).then(res =>{
199 231
         this.linedata2 = res.data
200 232
       })
201 233
     },
202
-    dashBerthsRevenueStat3(){
203
-      api.dashBerthsRevenueStat3({...this.formInline}).then(res =>{
234
+    dashBerthsRevenueStat3(params){
235
+      api.dashBerthsRevenueStat3(params).then(res =>{
204 236
         this.linedata3 = res.data
205 237
       })
206 238
     },
207
-    dashBerthsRevenueStat4(){
208
-      api.dashBerthsRevenueStat4({...this.formInline}).then(res =>{
239
+    dashBerthsRevenueStat4(params){
240
+      api.dashBerthsRevenueStat4(params).then(res =>{
209 241
         this.linedata4 = res.data
210 242
       })
211 243
     },
212
-    dashBerthsRevenueStat5(){
213
-      api.dashBerthsRevenueStat5({...this.formInline}).then(res =>{
244
+    dashBerthsRevenueStat5(params){
245
+      api.dashBerthsRevenueStat5(params).then(res =>{
214 246
         this.linedata5 = res.data
215 247
       })
216 248
     },

+ 55 - 23
src/pages/index/components/berths_usage.vue

@@ -14,8 +14,24 @@
14 14
       <el-form-item label="具体道路">
15 15
         <el-input v-model="formInline.streetName" placeholder="请输入"></el-input>
16 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>
17 33
       <el-form-item>
18
-        <el-button type="primary" @click="onSubmit">查询</el-button>
34
+        <el-button type="primary" @click="queryAll">查询</el-button>
19 35
       </el-form-item>
20 36
     </el-form>
21 37
     <br>
@@ -149,6 +165,7 @@ export default {
149 165
     return {
150 166
       districtOptions: options.districtOptions,
151 167
       keyAreaOptions: options.keyAreaOptions,
168
+      carOptions: [],
152 169
       linedata: [],
153 170
       linedata2: [],
154 171
       linedata3: [],
@@ -164,49 +181,64 @@ export default {
164 181
       formInline: {
165 182
         regionCode: '',
166 183
         keyAreas: '',
167
-        streetName: ''
184
+        streetName: '',
185
+        parkId: '',
186
+        time: [],
168 187
       }
169 188
     }
170 189
   },
171 190
   mounted() {
172
-    this.dashBerthsUsageStat1()
173
-    this.dashBerthsUsageStat2()
174
-    this.dashBerthsUsageStat3()
175
-    this.dashBerthsUsageStat4()
176
-    this.dashBerthsUsageStat5()
191
+    this.getParkDic()
192
+    this.queryAll()
177 193
   },
178 194
   watch: {
179 195
   },
180 196
   methods: {
181
-    onSubmit() {
182
-      this.dashBerthsUsageStat1()
183
-      this.dashBerthsUsageStat2()
184
-      this.dashBerthsUsageStat3()
185
-      this.dashBerthsUsageStat4()
186
-      this.dashBerthsUsageStat5()
197
+    getParkDic() {
198
+      api.parkDic().then(res => {
199
+        this.carOptions = res.data || [];
200
+      })
201
+    },
202
+    queryAll() {
203
+      let params = {...this.formInline}
204
+      if (
205
+        this.formInline.time && this.formInline.time.length === 2 &&
206
+        this.formInline.time[1] !== ""
207
+      ) {
208
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
209
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
210
+        params.begin= this.formInline.time[0]
211
+        params.end = this.formInline.time[1]
212
+      }
213
+      delete params.time
214
+      this.dashBerthsUsageStat1(params)
215
+      this.dashBerthsUsageStat2(params)
216
+      this.dashBerthsUsageStat3(params)
217
+      this.dashBerthsUsageStat4(params)
218
+      this.dashBerthsUsageStat5(params)
187 219
     },
188
-    dashBerthsUsageStat1(){
189
-      api.dashBerthsUsageStat1({...this.formInline}).then(res =>{
220
+    dashBerthsUsageStat1(params){
221
+      api.dashBerthsUsageStat1(params).then(res =>{
190 222
         this.linedata = res.data
191 223
       })
192 224
     },
193
-    dashBerthsUsageStat2(){
194
-      api.dashBerthsUsageStat2({...this.formInline}).then(res =>{
225
+    dashBerthsUsageStat2(params){
226
+      api.dashBerthsUsageStat2(params).then(res =>{
195 227
         this.linedata2 = res.data
196 228
       })
197 229
     },
198
-    dashBerthsUsageStat3(){
199
-      api.dashBerthsUsageStat3({...this.formInline}).then(res =>{
230
+    dashBerthsUsageStat3(params){
231
+      api.dashBerthsUsageStat3(params).then(res =>{
200 232
         this.linedata3 = res.data
201 233
       })
202 234
     },
203
-    dashBerthsUsageStat4(){
204
-      api.dashBerthsUsageStat4({...this.formInline}).then(res =>{
235
+    dashBerthsUsageStat4(params){
236
+      api.dashBerthsUsageStat4(params).then(res =>{
205 237
         this.linedata4 = res.data
206 238
       })
207 239
     },
208
-    dashBerthsUsageStat5(){
209
-      api.dashBerthsUsageStat5({...this.formInline}).then(res =>{
240
+    dashBerthsUsageStat5(params){
241
+      api.dashBerthsUsageStat5(params).then(res =>{
210 242
         this.linedata5 = res.data
211 243
       })
212 244
     },

+ 205 - 23
src/pages/index/components/parking_operate.vue

@@ -1,5 +1,35 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
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>
12
+      <el-form-item label="停车场">
13
+        <el-select clearable v-model="formInline1.parkId" placeholder="请选择" popper-class="cur-select">
14
+          <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
15
+        </el-select>
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
+          end-placeholder="结束日期">
26
+        </el-date-picker>
27
+      </el-form-item>
28
+      <el-form-item>
29
+        <el-button type="primary" @click="queryAll">查询</el-button>
30
+      </el-form-item>
31
+    </el-form>
32
+    <br>
3 33
     <div style="display: flex; justify-content: space-between;">
4 34
       <div style="width: 50%; height: 300px">
5 35
         <div align="center" style="color: white">停车饱和度</div>
@@ -117,6 +147,7 @@ import linechart from "@/components/lineChart";
117 147
 import barchart from "@/components/barChart";
118 148
 import vtable from "@/components/vtableNew";
119 149
 import api from "@/api/article_z";
150
+import options from '@/util/options'
120 151
 
121 152
 
122 153
 export default {
@@ -128,6 +159,14 @@ export default {
128 159
   },
129 160
   data() {
130 161
     return {
162
+      districtOptions: options.districtOptions,
163
+      carOptions: [],
164
+      formInline1: {
165
+        parkId: '',
166
+        time: [],
167
+        regionCode: '',
168
+        streetName: ''
169
+      },
131 170
       modelPieColor: ["#4382f6", "#9078f8", "#79a7db", "#FF9800"],
132 171
       modelData: {
133 172
         list: []
@@ -140,45 +179,65 @@ export default {
140 179
     }
141 180
   },
142 181
   mounted() {
143
-    this.getBardataData()
144
-    this.getLinedata1Data()
145
-    this.getLinedataData()
146
-    this.getModelDataData()
147
-    this.getLinedata2Data()
148
-    this.getLinedata3Data()
182
+    this.getParkDic()
183
+    this.queryAll()
149 184
   },
150 185
   watch: {
151 186
 
152 187
   },
153 188
   methods: {
189
+    getParkDic() {
190
+      api.parkDic().then(res => {
191
+        this.carOptions = res.data || [];
192
+      })
193
+    },
194
+    queryAll() {
195
+      let params = {...this.formInline1}
196
+      if (
197
+        this.formInline1.time && this.formInline1.time.length === 2 &&
198
+        this.formInline1.time[1] !== ""
199
+      ) {
200
+        this.formInline1.time[0] = this.formInline1.time[0].substring(0, 10) + " 00:00:00";
201
+        this.formInline1.time[1] = this.formInline1.time[1].substring(0, 10) + " 23:59:59";
202
+        params.begin= this.formInline1.time[0]
203
+        params.end = this.formInline1.time[1]
204
+      }
205
+      delete params.time
206
+      this.getBardataData(params)
207
+      this.getLinedata1Data(params)
208
+      this.getLinedataData(params)
209
+      this.getModelDataData(params)
210
+      this.getLinedata2Data(params)
211
+      this.getLinedata3Data(params)
212
+    },
154 213
     //初始化
155
-    getBardataData(){
156
-      api.queryParkingOperate_Tcbhd().then(res=>{
214
+    getBardataData(params){
215
+      api.queryParkingOperate_Tcbhd(params).then(res=>{
157 216
         this.bardata=res.data;
158 217
       })
159 218
     },
160
-    getLinedata1Data(){
161
-      api.queryParkingOperate_Tczzlfx().then(res=>{
219
+    getLinedata1Data(params){
220
+      api.queryParkingOperate_Tczzlfx(params).then(res=>{
162 221
         this.linedata1=res.data;
163 222
       })
164 223
     },
165
-    getLinedataData(){
166
-      api.queryParkingOperate_Tccysfx().then(res=>{
224
+    getLinedataData(params){
225
+      api.queryParkingOperate_Tccysfx(params).then(res=>{
167 226
         this.linedata=res.data;
168 227
       })
169 228
     },
170
-    getModelDataData(){
171
-      api.queryParkingOperate_Tscljczb().then(res=>{
229
+    getModelDataData(params){
230
+      api.queryParkingOperate_Tscljczb(params).then(res=>{
172 231
         this.modelData.list=res.data;
173 232
       })
174 233
     },
175
-    getLinedata2Data(){
176
-      api.queryParkingOperate_Cljccqs().then(res=>{
234
+    getLinedata2Data(params){
235
+      api.queryParkingOperate_Cljccqs(params).then(res=>{
177 236
         this.linedata2=res.data;
178 237
       })
179 238
     },
180
-    getLinedata3Data(){
181
-      api.queryParkingOperate_Tccysdbfx().then(res=>{
239
+    getLinedata3Data(params){
240
+      api.queryParkingOperate_Tccysdbfx(params).then(res=>{
182 241
         this.linedata3=res.data;
183 242
       })
184 243
     },
@@ -240,16 +299,139 @@ export default {
240 299
 }
241 300
 </script>
242 301
 <style  lang="scss" scoped>
302
+.form-wrapper {
303
+  margin-bottom: 20px;
304
+}
305
+
306
+/deep/ .el-input__inner {
307
+  background: #2d3744;
308
+  border: none;
309
+  border-radius: 0;
310
+}
311
+
312
+/deep/ .el-select {
313
+  height: 40px;
314
+
315
+  .el-input__inner {
316
+    height: 40px;
317
+  }
318
+
319
+  .el-input__prefix, .el-input__suffix {
320
+    height: 40px;
321
+  }
322
+
323
+  /* 下面设置右侧按钮居中 */
324
+  .el-input__suffix {
325
+    top: 0px;
326
+    display: flex;
327
+    justify-content: center;
328
+    align-items: center;
329
+    flex-wrap: nowrap;
330
+    flex-direction: row;
331
+    align-content: flex-start;
332
+  }
333
+
334
+  /* 输入框加上上下边是 32px + 2px =34px */
335
+  .el-input__icon {
336
+    line-height: 0px;
337
+  }
338
+}
339
+
340
+/deep/ .form-wrapper .el-button {
341
+  background: linear-gradient(90deg, #0158d9, #3c97e4);
342
+  width: 100px;
343
+  height: 40px;
344
+}
345
+
243 346
 .body-wrapper {
244
-  width: 100%;
245
-  height: 100%;
246
-  box-sizing: border-box;
347
+  padding: 20px;
247 348
   background: #0c0c0c;
349
+  .button-block{
350
+    text-align: right;
351
+    margin-bottom: 20px;
352
+  }
353
+  .table-pagination{
354
+    text-align: right;
355
+  }
356
+  .search-card{
357
+    font-size: 24px;
358
+    font-weight: bold;
359
+    color: #3498db;
360
+    margin-bottom: 20px;
361
+    .input-wrapper{
362
+      width: 36%;
363
+    }
364
+  }
365
+}
366
+.audit-dialog{
367
+  .mg-bt{
368
+    margin-bottom: 24px;
369
+  }
370
+  .label{
371
+    text-align: right;
372
+  }
248 373
 }
249 374
 
250
-.model-pie-body {
375
+.charts_all {
376
+  display: flex;
377
+  justify-content: space-around;
251 378
   width: 100%;
252
-  height: 99%;
379
+  height: 400px;
380
+}
381
+
382
+.charts {
383
+  width: 30%;
384
+  height: 300px;
385
+}
386
+
387
+.btn_save {
388
+  background-color: #3498db;
389
+  color: #ffffff;
390
+  padding: 10px 20px;
391
+  cursor: pointer;
392
+  border: none;
393
+  border-radius: 4px;
394
+  font-size: 16px;
395
+  height: 40px;
396
+}
397
+
398
+.sel {
399
+  height: 200px;
400
+  margin-right: 10px;
401
+}
402
+
403
+.input-search {
404
+  width: 100%;
405
+  padding: 10px;
406
+  margin-bottom: 20px;
407
+  box-sizing: border-box;
408
+  background-color: #2a2a2a;
409
+  border: 1px solid #333;
410
+  color: #ffffff;
411
+}
412
+
413
+.audit-dialog {
414
+  .mg-bt {
415
+    margin-bottom: 24px;
416
+  }
417
+
418
+  .label {
419
+    text-align: right;
420
+  }
421
+
422
+  .form-div {
423
+    /deep/ .el-input__inner {
424
+      height: 35px;
425
+      width: 100%;
426
+      border: 1px solid #a6a5a5;
427
+      color: #fff;
428
+      background: #2d3744;
429
+    }
430
+
431
+    /deep/ .el-input__icon {
432
+      //line-height: 35px;
433
+    }
434
+  }
253 435
 }
254 436
 
255 437
 

+ 68 - 9
src/pages/index/components/vehicle_violations.vue

@@ -1,5 +1,35 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
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>
12
+      <el-form-item label="停车场">
13
+        <el-select clearable v-model="formInline1.parkId" placeholder="请选择" popper-class="cur-select">
14
+          <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
15
+        </el-select>
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
+          end-placeholder="结束日期">
26
+        </el-date-picker>
27
+      </el-form-item>
28
+      <el-form-item>
29
+        <el-button type="primary" @click="queryAll">查询</el-button>
30
+      </el-form-item>
31
+    </el-form>
32
+    <br>
3 33
     <div style="display: flex; justify-content: space-between;">
4 34
       <div style="width: 50%; height: 300px">
5 35
         <div align="center" style="color: white">非法车辆类型占比</div>
@@ -57,6 +87,7 @@ import linechart from "@/components/lineChart";
57 87
 import barchart from "@/components/barChart";
58 88
 import vtable from "@/components/vtableNew";
59 89
 import api from "@/api/article_liao";
90
+import options from '@/util/options'
60 91
 
61 92
 
62 93
 export default {
@@ -68,6 +99,14 @@ export default {
68 99
   },
69 100
   data() {
70 101
     return {
102
+      districtOptions: options.districtOptions,
103
+      carOptions: [],
104
+      formInline1: {
105
+        parkId: '',
106
+        time: [],
107
+        regionCode: '',
108
+        streetName: ''
109
+      },
71 110
       modelPieColor: ["#4382f6", "#9078f8", "#79a7db", "#FF9800"],
72 111
       modelData: {
73 112
         list: []
@@ -80,14 +119,34 @@ export default {
80 119
     }
81 120
   },
82 121
   mounted() {
83
-    this.dashVehicleViolationsStat1()
84
-    this.dashVehicleViolationsStat2()
85
-    this.dashVehicleViolationsStat3()
122
+    this.getParkDic()
123
+    this.queryAll()
86 124
   },
87 125
   watch: {
88 126
 
89 127
   },
90 128
   methods: {
129
+    getParkDic() {
130
+      api.parkDic().then(res => {
131
+        this.carOptions = res.data || [];
132
+      })
133
+    },
134
+    queryAll() {
135
+      let params = {...this.formInline1}
136
+      if (
137
+        this.formInline1.time && this.formInline1.time.length === 2 &&
138
+        this.formInline1.time[1] !== ""
139
+      ) {
140
+        this.formInline1.time[0] = this.formInline1.time[0].substring(0, 10) + " 00:00:00";
141
+        this.formInline1.time[1] = this.formInline1.time[1].substring(0, 10) + " 23:59:59";
142
+        params.begin= this.formInline1.time[0]
143
+        params.end = this.formInline1.time[1]
144
+      }
145
+      delete params.time
146
+      this.dashVehicleViolationsStat1(params)
147
+      this.dashVehicleViolationsStat2(params)
148
+      this.dashVehicleViolationsStat3(params)
149
+    },
91 150
     xLabelFormat(name) {
92 151
       const nameArr = []
93 152
       for(let i=0; i<name.length; i+=7) {
@@ -104,18 +163,18 @@ export default {
104 163
         params[0].data.hs || "--"}个</div>
105 164
 </div>`;
106 165
     },
107
-    dashVehicleViolationsStat1(){
108
-      api.dashVehicleViolationsStat1().then(res =>{
166
+    dashVehicleViolationsStat1(params){
167
+      api.dashVehicleViolationsStat1(params).then(res =>{
109 168
         this.modelData.list = res.data
110 169
       })
111 170
     },
112
-    dashVehicleViolationsStat2(){
113
-      api.dashVehicleViolationsStat2().then(res =>{
171
+    dashVehicleViolationsStat2(params){
172
+      api.dashVehicleViolationsStat2(params).then(res =>{
114 173
         this.modelData1.list = res.data
115 174
       })
116 175
     },
117
-    dashVehicleViolationsStat3(){
118
-      api.dashVehicleViolationsStat3().then(res =>{
176
+    dashVehicleViolationsStat3(params){
177
+      api.dashVehicleViolationsStat3(params).then(res =>{
119 178
         this.bardata = res.data
120 179
       })
121 180
     },