Commit 1250868c7aa31c2bb09a86c074d4b9d0493605d0
1 parent
73c8d18c
高位视频 定时器
Showing
4 changed files
with
274 additions
and
106 deletions
index.html
src/api/highVideo.js
... | ... | @@ -12,6 +12,16 @@ export function orderExamine(params) { |
12 | 12 | } |
13 | 13 | |
14 | 14 | |
15 | +// 1.2.状态更新,通过,撤销,废除 | |
16 | +export function updateStatus(params) { | |
17 | + return request({ | |
18 | + url: 'orderExamine/updateStatus', | |
19 | + method: 'post', | |
20 | + data: params | |
21 | + }) | |
22 | +} | |
23 | + | |
24 | + | |
15 | 25 | |
16 | 26 | |
17 | 27 | ... | ... |
src/utils/request.js
... | ... | @@ -15,7 +15,7 @@ const service = axios.create({ |
15 | 15 | service.interceptors.request.use( |
16 | 16 | |
17 | 17 | config => { |
18 | - config.headers['X-Auth-Token'] = '84108a96-3589-443d-90e1-1a8e724fd21c' | |
18 | + config.headers['X-Auth-Token'] = '952d9c9d-8b86-4dc4-8d3a-90d11e659dae' | |
19 | 19 | return config |
20 | 20 | }, |
21 | 21 | error => { | ... | ... |
src/views/highVideo.vue
1 | 1 | <template> |
2 | 2 | |
3 | - <el-container style="height: 100%;width: 1190px;margin: 0 auto;"> | |
3 | + <el-container style="height: 100%;width: 1190px;margin: 0 auto;" v-if="list.length>0"> | |
4 | 4 | <el-header class="header-wrap"> |
5 | 5 | <el-row> |
6 | 6 | <el-col :span="4"> |
7 | - <p>车场:XHZ-002</p> | |
7 | + <p>车场:{{ plNo }}</p> | |
8 | 8 | </el-col> |
9 | 9 | |
10 | 10 | <el-col :span="4"> |
11 | - <p>设备:AAAAAAA</p> | |
11 | + <p>设备:</p> | |
12 | 12 | </el-col> |
13 | 13 | |
14 | 14 | <el-col :span="3"> |
15 | - <p>车位:XHZ-002</p> | |
15 | + <p>车位:{{ berthNo }}</p> | |
16 | 16 | </el-col> |
17 | 17 | |
18 | 18 | <el-col :span="3"> |
19 | - <p>待审:AAAAAAA</p> | |
19 | + <p>待审: {{ count }}</p> | |
20 | 20 | </el-col> |
21 | 21 | |
22 | 22 | <el-col :span="4"> |
23 | - <p>获取数据:AAAAA</p> | |
23 | + <p>获取数据: {{ listNum }}</p> | |
24 | 24 | </el-col> |
25 | 25 | |
26 | 26 | <el-col :span="2"> |
... | ... | @@ -28,88 +28,94 @@ |
28 | 28 | </el-col> |
29 | 29 | |
30 | 30 | <el-col :span="4"> |
31 | - <p>未审总数:AAAAAAA</p> | |
31 | + <p>未审总数:{{ total }}</p> | |
32 | 32 | </el-col> |
33 | 33 | </el-row> |
34 | 34 | </el-header> |
35 | 35 | <el-main style="padding: 0;display: flex"> |
36 | 36 | <ul class="status-wrap"> |
37 | - <li v-for="(i, index) in list" :key="i.id"> | |
38 | - <el-row> | |
39 | - <el-col :span="8"> | |
40 | - <p class="status-ifo"> | |
41 | - <span>{{ i.parkState | parkStateFilter}}</span> | |
42 | - <span class="blueText">{{ i.examineState | examineStateFilter }}</span> | |
43 | - </p> | |
44 | - <p class="status-ifo"> | |
45 | - <span>车牌号码: {{ i.carNumber }}</span> | |
46 | - <span>车牌颜色: {{ i.vplColor }}</span> | |
47 | - </p> | |
48 | - <p class="status-ifo"> | |
49 | - <span>车辆类型: 轿车</span> | |
50 | - <span>车身颜色: 其他</span> | |
51 | - </p> | |
52 | - <p class="status-ifo"> | |
53 | - <span>{{ i.parkTime }}</span> | |
54 | - <span>停车事件: {{ i.parkState}}</span> | |
55 | - </p> | |
56 | - </el-col> | |
57 | - <el-col :span="16" style="overflow-x: auto;width: 570px;"> | |
58 | - <div class="imgBox" :style="{width: attachmentList.length*190+'px'}"> | |
59 | - <img | |
60 | - v-for="(item,index) in attachmentList" | |
61 | - :key="index" | |
62 | - :src="item" | |
63 | - preview="1" | |
64 | - /> | |
65 | - </div> | |
66 | - | |
67 | - </el-col> | |
68 | - <!--<el-col :span="4" style="text-align: center;line-height: 120px">--> | |
37 | + <li v-for="(i, index) in list" :key="i.id" > | |
38 | + <div :class="i.examineState | classBorderFilter" > | |
39 | + <el-row> | |
40 | + <el-col style="padding-left: 10px;" :span="8" :class="{active:currentIndex == index}" @click.native="chooseHandle(i,index)"> | |
41 | + <p class="status-ifo"> | |
42 | + <span>{{ i.parkState | parkStateFilter}}</span> | |
43 | + <span v-if="i.examineState == 0" class="redText">需审核</span> | |
44 | + <span v-else-if="i.examineState == 1" class="blueText">通过</span> | |
45 | + <span v-else class="yellowText">废弃</span> | |
46 | + </p> | |
47 | + <p class="status-ifo"> | |
48 | + <span>车牌号码: {{ i.carNumber }}</span> | |
49 | + <span>车牌颜色: {{ i.vplColor | vplColorFilter}}</span> | |
50 | + </p> | |
51 | + <p class="status-ifo"> | |
52 | + <span>车辆类型: 轿车</span> | |
53 | + <span>车身颜色: 其他</span> | |
54 | + </p> | |
55 | + <p class="status-ifo"> | |
56 | + <span>{{ i.parkTime }}</span> | |
57 | + <span>停车事件: {{ i.parkState}}</span> | |
58 | + </p> | |
59 | + </el-col> | |
60 | + <el-col :span="16" style="overflow-x: auto;width: 570px;"> | |
61 | + <div class="imgBox" :style="{width: i.imgList.length*190+'px'}"> | |
62 | + <img | |
63 | + v-for="(item,imgindex) in i.imgList" | |
64 | + :key="imgindex" | |
65 | + :src="item" | |
66 | + :preview="index" | |
67 | + /> | |
68 | + </div> | |
69 | + | |
70 | + </el-col> | |
71 | + <!--<el-col :span="4" style="text-align: center;line-height: 120px">--> | |
69 | 72 | <!--<el-button type="primary">操作</el-button>--> |
70 | - <!--</el-col>--> | |
73 | + <!--</el-col>--> | |
71 | 74 | |
72 | - </el-row> | |
75 | + </el-row> | |
76 | + </div> | |
73 | 77 | </li> |
74 | 78 | |
75 | 79 | </ul> |
76 | 80 | |
77 | 81 | <div class="handle-wrap"> |
78 | - <el-input v-model="carNumber" maxlength="9"> | |
79 | - <template slot="prepend">改车牌</template> | |
80 | - <el-button slot="append">确定</el-button> | |
81 | - </el-input> | |
82 | - <div> | |
83 | - <el-date-picker style="width:100%;margin-top:15px;" | |
84 | - v-model="value1" | |
85 | - default-value="2021-08-01 00:02:02" | |
86 | - type="datetime" | |
87 | - placeholder="选择日期时间"> | |
88 | - </el-date-picker> | |
89 | - | |
90 | - </div> | |
91 | - <div> | |
92 | - <el-button type="primary" size="medium" style="width:100%;margin-top:15px;">通过</el-button> | |
93 | - </div> | |
94 | - <div> | |
95 | - <el-button type="primary" size="medium" style="width:100%;margin-top:15px;">废弃</el-button> | |
96 | - | |
97 | - </div> | |
98 | - | |
99 | - <div> | |
100 | - <el-button type="primary" size="medium" style="width:100%;margin-top:15px;">撤销</el-button> | |
101 | - | |
82 | + <div v-show="handleShow"> | |
83 | + <el-input v-model="carnum" maxlength="9"> | |
84 | + <template slot="prepend">改车牌</template> | |
85 | + <el-button slot="append" @click.native="updateStatusCar">确定</el-button> | |
86 | + </el-input> | |
87 | + <div> | |
88 | + <el-date-picker style="width:73%;margin-top:15px;" | |
89 | + v-model="time" | |
90 | + default-value="2021-08-01 00:02:02" | |
91 | + type="datetime" | |
92 | + placeholder="选择日期时间"> | |
93 | + </el-date-picker><el-button slot="append" @click.native="updateStatusTime">确定</el-button> | |
94 | + </div> | |
95 | + <div> | |
96 | + <el-button type="primary" size="medium" style="width:100%;margin-top:15px;" @click.native="updateStatus(1,'')">通过</el-button> | |
97 | + </div> | |
98 | + <div> | |
99 | + <el-button type="primary" size="medium" style="width:100%;margin-top:15px;" @click.native="updateStatus(2,'')">废弃</el-button> | |
100 | + | |
101 | + </div> | |
102 | + | |
103 | + <div> | |
104 | + <el-button type="primary" size="medium" style="width:100%;margin-top:15px;" @click.native="updateStatus(0,'')">撤销</el-button> | |
105 | + | |
106 | + </div> | |
107 | + | |
108 | + <div> | |
109 | + <el-button type="primary" size="medium" style="width:100%;margin-top:15px;">补录</el-button> | |
110 | + | |
111 | + </div> | |
102 | 112 | </div> |
103 | 113 | |
104 | - <div> | |
105 | - <el-button type="primary" size="medium" style="width:100%;margin-top:15px;">补录</el-button> | |
106 | 114 | |
107 | - </div> | |
108 | - | |
109 | - <div> | |
110 | - <el-button type="success" size="medium" style="width:100%;margin-top:15px;">确定</el-button> | |
115 | + <!--<div>--> | |
116 | + <!--<el-button type="success" size="medium" style="width:100%;margin-top:15px;">确定</el-button>--> | |
111 | 117 | |
112 | - </div> | |
118 | + <!--</div>--> | |
113 | 119 | |
114 | 120 | |
115 | 121 | </div> |
... | ... | @@ -128,48 +134,66 @@ |
128 | 134 | |
129 | 135 | </el-footer> |
130 | 136 | |
131 | - <el-dialog | |
132 | - title="操作" | |
133 | - :visible.sync="centerDialogVisible" | |
134 | - width="30%" | |
135 | - center> | |
136 | - | |
137 | - <div class="button"> | |
138 | - <el-input v-model="carNumber" maxlength="9"> | |
139 | - <template slot="prepend">修改车牌</template> | |
140 | - </el-input> | |
141 | - <div style="margin-bottom: 15px;"></div> | |
142 | - <el-button type="primary">通过</el-button> | |
143 | - <el-button type="primary">废弃</el-button> | |
144 | - <el-button type="primary">通过</el-button> | |
145 | - <el-button type="primary">废弃</el-button> | |
146 | - <el-button type="primary">通过</el-button> | |
147 | - <el-button type="primary">废弃</el-button> | |
148 | - <el-button type="primary">通过</el-button> | |
149 | - <el-button type="primary">废弃</el-button> | |
150 | - </div> | |
151 | - <span slot="footer" class="dialog-footer"> | |
152 | - <el-button @click="centerDialogVisible = false">取 消</el-button> | |
153 | - <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button> | |
154 | - </span> | |
155 | - </el-dialog> | |
137 | + <!--<el-dialog--> | |
138 | + <!--title="操作"--> | |
139 | + <!--:visible.sync="centerDialogVisible"--> | |
140 | + <!--width="30%"--> | |
141 | + <!--center>--> | |
142 | + | |
143 | + <!--<div class="button">--> | |
144 | + <!--<el-input v-model="carNumber" maxlength="9">--> | |
145 | + <!--<template slot="prepend">修改车牌</template>--> | |
146 | + <!--</el-input>--> | |
147 | + <!--<div style="margin-bottom: 15px;"></div>--> | |
148 | + <!--<el-button type="primary">通过</el-button>--> | |
149 | + <!--<el-button type="primary">废弃</el-button>--> | |
150 | + <!--<el-button type="primary">通过</el-button>--> | |
151 | + <!--<el-button type="primary">废弃</el-button>--> | |
152 | + <!--<el-button type="primary">通过</el-button>--> | |
153 | + <!--<el-button type="primary">废弃</el-button>--> | |
154 | + <!--<el-button type="primary">通过</el-button>--> | |
155 | + <!--<el-button type="primary">废弃</el-button>--> | |
156 | + <!--</div>--> | |
157 | + <!--<span slot="footer" class="dialog-footer">--> | |
158 | + <!--<el-button @click="centerDialogVisible = false">取 消</el-button>--> | |
159 | + <!--<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>--> | |
160 | + <!--</span>--> | |
161 | + <!--</el-dialog>--> | |
156 | 162 | |
157 | 163 | </el-container> |
158 | 164 | |
165 | + <div v-else> | |
166 | + <div style="font-size: 20px;padding-top: 20px;text-align: center"> | |
167 | + <span class="el-icon-warning-outline">暂无数据</span> | |
168 | + </div> | |
169 | + | |
170 | + </div> | |
171 | + | |
159 | 172 | </template> |
160 | 173 | |
161 | 174 | <script> |
162 | 175 | |
163 | -import { orderExamine } from '@/api/highVideo' | |
176 | +import { orderExamine, updateStatus } from '@/api/highVideo' | |
164 | 177 | |
165 | 178 | export default { |
166 | 179 | name: 'highVideo', |
167 | 180 | data() { |
168 | 181 | return { |
182 | + plNo:'', // 车场 | |
183 | + berthNo: '', // 设备 | |
184 | + total: '', // 总数 | |
185 | + count:'', | |
186 | + listNum:'', | |
187 | + classBorder:'blueBorder', | |
188 | + currentIndex:0, | |
169 | 189 | list:[], |
170 | - value1: '2021-08-01 00:02:02', | |
190 | + time: '', | |
191 | + timer:'', | |
192 | + handleShow:true, | |
171 | 193 | centerDialogVisible: false, |
194 | + carnum: '', | |
172 | 195 | carNumber: '京A123312', |
196 | + examineStateVal:'', | |
173 | 197 | swiperOption: { |
174 | 198 | autoplay: 5000,//可选选项,自动滑动 |
175 | 199 | loop: true,//可选选项,开启循环 |
... | ... | @@ -189,10 +213,99 @@ export default { |
189 | 213 | }, |
190 | 214 | methods:{ |
191 | 215 | orderExamine(){ |
216 | + let me = this | |
192 | 217 | let jsondata = {} |
193 | 218 | orderExamine(jsondata).then(response => { |
194 | 219 | console.log(response) |
220 | + if(response.data.dataList.length == 0){ | |
221 | + this.timer = setInterval(function () { | |
222 | + console.log('1') | |
223 | + me.orderExamine() | |
224 | + },10000) | |
225 | + return | |
226 | + } | |
227 | + clearInterval(this.timer) | |
195 | 228 | this.list = response.data.dataList |
229 | + this.plNo = response.data.plNo | |
230 | + this.berthNo = response.data.berthNo | |
231 | + this.total = response.data.total | |
232 | + this.count = response.data.count | |
233 | + this.listNum = response.data.dataList.length | |
234 | + this.carnum = this.list[this.currentIndex].carNumber | |
235 | + this.time = this.list[this.currentIndex].parkTime | |
236 | + this.examineStateVal = this.list[this.currentIndex].examineState | |
237 | + | |
238 | + }) | |
239 | + }, | |
240 | + chooseHandle(i,index){ | |
241 | + console.log(i) | |
242 | + this.currentIndex = index | |
243 | + this.carnum = this.list[this.currentIndex].carNumber | |
244 | + this.time = this.list[this.currentIndex].parkTime | |
245 | + this.examineStateVal = this.list[this.currentIndex].examineState | |
246 | + | |
247 | + if(this.examineStateVal===1){ | |
248 | + this.handleShow = false | |
249 | + }else{ | |
250 | + this.handleShow = true | |
251 | + } | |
252 | + }, | |
253 | + updateStatus(val,car){ | |
254 | + let jsondata = { | |
255 | + plNo:this.plNo, | |
256 | + berthNo:this.berthNo, | |
257 | + id:this.list[this.currentIndex].id, | |
258 | + carNumber:car, | |
259 | + vplColor:this.list[this.currentIndex].vplColor, | |
260 | + examineState:val | |
261 | + } | |
262 | + console.log(jsondata) | |
263 | + updateStatus(jsondata).then(response => { | |
264 | + console.log(response) | |
265 | + this.orderExamine() | |
266 | + | |
267 | + }) | |
268 | + }, | |
269 | + // 修改车牌 | |
270 | + updateStatusCar(){ | |
271 | + if(this.carnum.length<7){ | |
272 | + this.$message({ | |
273 | + message: '请输入正确的车牌号', | |
274 | + type: 'warning' | |
275 | + }); | |
276 | + return | |
277 | + } | |
278 | + let jsondata = { | |
279 | + plNo:this.plNo, | |
280 | + berthNo:this.berthNo, | |
281 | + id:this.list[this.currentIndex].id, | |
282 | + carNumber:this.carnum, | |
283 | + vplColor:this.list[this.currentIndex].vplColor, | |
284 | + examineState:1 | |
285 | + } | |
286 | + console.log(jsondata) | |
287 | + updateStatus(jsondata).then(response => { | |
288 | + console.log(response) | |
289 | + this.orderExamine() | |
290 | + | |
291 | + }) | |
292 | + }, | |
293 | + // 修改时间 | |
294 | + updateStatusTime(){ | |
295 | + let jsondata = { | |
296 | + plNo:this.plNo, | |
297 | + berthNo:this.berthNo, | |
298 | + id:this.list[this.currentIndex].id, | |
299 | + carNumber:this.carnum, | |
300 | + vplColor:this.list[this.currentIndex].vplColor, | |
301 | + examineState:1, | |
302 | + parkTime:this.time | |
303 | + } | |
304 | + console.log(jsondata) | |
305 | + updateStatus(jsondata).then(response => { | |
306 | + console.log(response) | |
307 | + this.orderExamine() | |
308 | + | |
196 | 309 | }) |
197 | 310 | } |
198 | 311 | }, |
... | ... | @@ -207,7 +320,6 @@ export default { |
207 | 320 | } |
208 | 321 | }, |
209 | 322 | examineStateFilter(val){ |
210 | - | |
211 | 323 | if(val===1){ |
212 | 324 | return '通过' |
213 | 325 | }else if(val===0){ |
... | ... | @@ -215,6 +327,33 @@ export default { |
215 | 327 | }else{ |
216 | 328 | return '废弃' |
217 | 329 | } |
330 | + }, | |
331 | + classBorderFilter(val){ | |
332 | + if(val===0){ | |
333 | + return 'redBorder' | |
334 | + }else if(val===1){ | |
335 | + return 'blueBorder' | |
336 | + }else{ | |
337 | + return 'yellowBorder' | |
338 | + } | |
339 | + }, | |
340 | + vplColorFilter(val){ | |
341 | + // 车辆颜色 0:蓝色 1:黄色 2:白色 3:黑色 4:绿色 | |
342 | + if(val === '0'){ | |
343 | + return '蓝色' | |
344 | + } | |
345 | + if(val === '1'){ | |
346 | + return '黄色' | |
347 | + } | |
348 | + if(val === '2'){ | |
349 | + return '白色' | |
350 | + } | |
351 | + if(val === '3'){ | |
352 | + return '黑色' | |
353 | + } | |
354 | + if(val === '4'){ | |
355 | + return '绿色' | |
356 | + } | |
218 | 357 | } |
219 | 358 | } |
220 | 359 | } |
... | ... | @@ -236,12 +375,12 @@ export default { |
236 | 375 | .handle-wrap { |
237 | 376 | width: 300px; |
238 | 377 | padding: 15px; |
239 | - border-left: 1px solid #ddd; | |
240 | 378 | border-right: 1px solid #ddd; |
241 | 379 | } |
242 | 380 | |
243 | 381 | .status-wrap > li { |
244 | - height: 130px; | |
382 | + height: 140px; | |
383 | + padding: 10px 0; | |
245 | 384 | border-bottom: 1px solid #ddd; |
246 | 385 | } |
247 | 386 | |
... | ... | @@ -249,6 +388,21 @@ export default { |
249 | 388 | border-bottom: 0; |
250 | 389 | } |
251 | 390 | |
391 | + .active{ | |
392 | + background: #67C23A; | |
393 | + } | |
394 | + .blueBorder{ | |
395 | + border: 1px solid blue; | |
396 | + } | |
397 | + | |
398 | + .redBorder{ | |
399 | + border: 1px solid red; | |
400 | + } | |
401 | + | |
402 | + .yellowBorder{ | |
403 | + border: 1px solid rgba(254,200,77,1); | |
404 | + } | |
405 | + | |
252 | 406 | .status-ifo { |
253 | 407 | display: flex; |
254 | 408 | margin-top: 10px; |
... | ... | @@ -266,10 +420,14 @@ export default { |
266 | 420 | color: red; |
267 | 421 | } |
268 | 422 | |
423 | + .yellowText{ | |
424 | + color: rgba(254,200,77,1); | |
425 | + } | |
426 | + | |
269 | 427 | .imgBox { |
270 | 428 | /*width: 590px;*/ |
271 | 429 | height: 120px; |
272 | - padding-top: 10px; | |
430 | + /*padding-top: 10px;*/ | |
273 | 431 | overflow-y: hidden; |
274 | 432 | overflow-x: auto; |
275 | 433 | white-space: nowrap |
... | ... | @@ -278,7 +436,7 @@ export default { |
278 | 436 | .imgBox > img { |
279 | 437 | display: inline-block; |
280 | 438 | width: 180px; |
281 | - height: 110px; | |
439 | + height: 120px; | |
282 | 440 | float: left; |
283 | 441 | margin-right: 10px; |
284 | 442 | } | ... | ... |