|
@@ -14,6 +14,18 @@
|
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="formInline.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
|
29
|
<el-form-item>
|
18
|
30
|
<el-button type="primary" @click="queryAll">查询</el-button>
|
19
|
31
|
</el-form-item>
|
|
@@ -90,6 +102,9 @@ import piechart from "@/components/pieChart";
|
90
|
102
|
import linechart from "@/components/lineChart";
|
91
|
103
|
import api from "@/api/article_liao";
|
92
|
104
|
import options from '@/util/options'
|
|
105
|
+
|
|
106
|
+const date = new Date;
|
|
107
|
+
|
93
|
108
|
export default {
|
94
|
109
|
components: {
|
95
|
110
|
piechart,
|
|
@@ -110,6 +125,7 @@ export default {
|
110
|
125
|
regionCode: '',
|
111
|
126
|
keyAreas: '',
|
112
|
127
|
streetName: '',
|
|
128
|
+ time: [date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()), date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate())],
|
113
|
129
|
parkId: '',
|
114
|
130
|
}
|
115
|
131
|
}
|
|
@@ -128,6 +144,16 @@ export default {
|
128
|
144
|
},
|
129
|
145
|
queryAll() {
|
130
|
146
|
let params = {...this.formInline}
|
|
147
|
+ if (
|
|
148
|
+ this.formInline.time && this.formInline.time.length === 2 &&
|
|
149
|
+ this.formInline.time[1] !== ""
|
|
150
|
+ ) {
|
|
151
|
+ this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
|
|
152
|
+ this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
|
|
153
|
+ params.begin= this.formInline.time[0]
|
|
154
|
+ params.end = this.formInline.time[1]
|
|
155
|
+ }
|
|
156
|
+ delete params.time
|
131
|
157
|
this.parkBehaviorDuration(params)
|
132
|
158
|
this.parkBehaviorRange(params)
|
133
|
159
|
this.parkBehaviorTemporary(params)
|