highVideo.vue
11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<template>
<el-container style="height: 100%;width: 1190px;margin: 0 auto;" >
<el-header class="header-wrap">
<el-row>
<el-col :span="4">
<p>车场:{{ plNo }}</p>
</el-col>
<el-col :span="4">
<p>设备:</p>
</el-col>
<el-col :span="3">
<p>车位:{{ berthNo }}</p>
</el-col>
<el-col :span="3">
<p>待审: {{ count }}</p>
</el-col>
<el-col :span="4">
<p>获取数据: {{ listNum }}</p>
</el-col>
<el-col :span="2">
<p>刷新</p>
</el-col>
<el-col :span="4">
<p>未审总数:{{ total }}</p>
</el-col>
</el-row>
</el-header>
<el-main style="padding: 0;">
<div v-if="list.length>0" style="display: flex">
<ul class="status-wrap" >
<li v-for="(i, index) in list" :key="i.id" >
<div :class="i.examineState | classBorderFilter" >
<el-row>
<el-col style="padding-left: 10px;" :span="9" :class="{active:currentIndex == index}" @click.native="chooseHandle(i,index)">
<p class="status-ifo">
<span>{{ i.parkState | parkStateFilter}}</span>
<span v-if="i.examineState == 0" class="redText">需审核</span>
<span v-else-if="i.examineState == 1" class="blueText">通过</span>
<span v-else class="yellowText">废弃</span>
</p>
<p class="status-ifo">
<span>车牌号码: {{ i.carNumber }}</span>
<span>车牌颜色: {{ i.vplColor | vplColorFilter}}</span>
</p>
<p class="status-ifo">
<span>车辆类型: 轿车</span>
<span>车身颜色: 其他</span>
</p>
<p class="status-ifo">
<span>{{ i.parkTime }}</span>
<span>停车事件: {{ i.parkState}}</span>
</p>
</el-col>
<el-col :span="15" style="overflow-x: auto;width: 550px;">
<div class="imgBox" :style="{width: i.imgList.length*190+'px'}">
<img
v-for="(item,imgindex) in i.imgList"
:key="imgindex"
:src="item"
:preview="index"
/>
</div>
</el-col>
<!--<el-col :span="4" style="text-align: center;line-height: 120px">-->
<!--<el-button type="primary">操作</el-button>-->
<!--</el-col>-->
</el-row>
</div>
</li>
</ul>
<div class="handle-wrap">
<div v-show="handleShow">
<el-input v-model="carnum" maxlength="9">
<template slot="prepend">改车牌</template>
<el-button slot="append" @click.native="updateStatusCar">确定</el-button>
</el-input>
<div>
<el-date-picker style="width:73%;margin-top:15px;"
v-model="time"
default-value="2021-08-01 00:02:02"
type="datetime"
placeholder="选择日期时间">
</el-date-picker><el-button slot="append" @click.native="updateStatusTime">确定</el-button>
</div>
<div>
<el-button type="primary" size="medium" style="width:100%;margin-top:15px;" @click.native="updateStatus(1,'')">通过</el-button>
</div>
<div>
<el-button type="danger" size="medium" style="width:100%;margin-top:15px;" @click.native="updateStatus(2,'')">废弃</el-button>
</div>
<div>
<el-button type="info" size="medium" style="width:100%;margin-top:15px;" @click.native="updateStatus(0,'')">撤销</el-button>
</div>
<div>
<el-button type="primary" size="medium" style="width:100%;margin-top:15px;">补录</el-button>
</div>
<div style="margin-top:15px;">
车辆类型:
<el-radio-group v-model="radio">
<el-radio :label="3">大型车</el-radio>
<el-radio :label="6">中型车</el-radio>
<el-radio :label="9">小型车</el-radio>
</el-radio-group>
</div>
</div>
</div>
</div>
<div v-else>
<div style="font-size: 20px;padding-top: 20px;text-align: center">
<span class="el-icon-warning-outline">暂无数据</span>
</div>
</div>
</el-main>
<el-footer class="footer-wrap" style="height: 40px;">
<el-row>
<el-col :span="6">
<p>今日已处理 {{ operCurrentCount }} 条,通过 {{ operPassCount }} 条,废弃 {{ operDiscardCount }} 条</p>
</el-col>
<el-col :span="15" :offset="3">
<!--<p>操作按钮</p>-->
</el-col>
</el-row>
</el-footer>
</el-container>
</template>
<script>
import { orderExamine, updateStatus } from '@/api/highVideo'
export default {
name: 'highVideo',
data() {
return {
plNo:'', // 车场
berthNo: '', // 设备
total: '', // 总数
count:'',
listNum:'',
classBorder:'blueBorder',
currentIndex:0,
list:[],
time: '',
radio: 3, // 车辆类型
timer:'', // 定时器
handleShow:true,
centerDialogVisible: false,
carnum: '',
carNumber: '',
examineStateVal:'',
attachmentList: [],
operCurrentCount:'', //今日已处理
operPassCount:'', //今日通过
operDiscardCount:'', // 今日作废
}
},
created() {
this.orderExamine()
},
methods:{
orderExamine(){
let me = this
let jsondata = {}
orderExamine(jsondata).then(response => {
console.log(response)
if(response.data.dataList.length == 0){
this.timer = setInterval(function () {
console.log('1')
me.orderExamine()
},10000)
return
}
window.clearInterval(this.timer)
this.timer = null
this.list = response.data.dataList
this.plNo = response.data.plNo
this.berthNo = response.data.berthNo
this.total = response.data.total
this.count = response.data.count
this.listNum = response.data.dataList.length
this.carnum = this.list[this.currentIndex].carNumber
this.time = this.list[this.currentIndex].parkTime
this.examineStateVal = this.list[this.currentIndex].examineState
this.operCurrentCount = response.data.operCurrentCount //今日已处理
this.operPassCount = response.data.operPassCount //今日通过
this.operDiscardCount = response.data.operDiscardCount // 今日作废
})
},
chooseHandle(i,index){
console.log(i)
this.currentIndex = index
this.carnum = this.list[this.currentIndex].carNumber
this.time = this.list[this.currentIndex].parkTime
this.examineStateVal = this.list[this.currentIndex].examineState
if(this.examineStateVal===1){
this.handleShow = false
}else{
this.handleShow = true
}
},
updateStatus(val,car){
let jsondata = {
plNo:this.plNo,
berthNo:this.berthNo,
id:this.list[this.currentIndex].id,
carNumber:car,
vplColor:this.list[this.currentIndex].vplColor,
examineState:val
}
console.log(jsondata)
updateStatus(jsondata).then(response => {
console.log(response)
this.orderExamine()
})
},
// 修改车牌
updateStatusCar(){
if(this.carnum.length<7){
this.$message({
message: '请输入正确的车牌号',
type: 'warning'
});
return
}
let jsondata = {
plNo:this.plNo,
berthNo:this.berthNo,
id:this.list[this.currentIndex].id,
carNumber:this.carnum,
vplColor:this.list[this.currentIndex].vplColor,
examineState:1
}
console.log(jsondata)
updateStatus(jsondata).then(response => {
console.log(response)
this.orderExamine()
})
},
// 修改时间
updateStatusTime(){
let jsondata = {
plNo:this.plNo,
berthNo:this.berthNo,
id:this.list[this.currentIndex].id,
carNumber:this.carnum,
vplColor:this.list[this.currentIndex].vplColor,
examineState:1,
parkTime:this.time
}
console.log(jsondata)
updateStatus(jsondata).then(response => {
console.log(response)
this.orderExamine()
})
}
},
filters: {
parkStateFilter(val){
if(val===10){
return '在场'
}else if(val===20){
return '离场'
}else{
return '预定'
}
},
examineStateFilter(val){
if(val===1){
return '通过'
}else if(val===0){
return '需审核'
}else{
return '废弃'
}
},
classBorderFilter(val){
if(val===0){
return 'redBorder'
}else if(val===1){
return 'blueBorder'
}else{
return 'yellowBorder'
}
},
vplColorFilter(val){
// 车辆颜色 0:蓝色 1:黄色 2:白色 3:黑色 4:绿色
if(val === '0'){
return '蓝色'
}
if(val === '1'){
return '黄色'
}
if(val === '2'){
return '白色'
}
if(val === '3'){
return '黑色'
}
if(val === '4'){
return '绿色'
}
}
}
}
</script>
<style scoped lang="scss">
.header-wrap {
line-height: 60px;
background: #409EFF;
font-size: 16px;
color: #fff;
}
.status-wrap {
flex: 1;
}
.handle-wrap {
width: 300px;
padding: 15px;
border-right: 1px solid #ddd;
}
.status-wrap > li {
height: 140px;
padding: 10px 0;
border-bottom: 1px solid #ddd;
}
.status-wrap > li:last-child {
border-bottom: 0;
}
.active{
background: #67C23A;
}
.blueBorder{
border: 1px solid blue;
}
.redBorder{
border: 1px solid red;
}
.yellowBorder{
border: 1px solid rgba(254,200,77,1);
}
.status-ifo {
display: flex;
margin-top: 10px;
}
.status-ifo span {
flex: 1;
}
.blueText {
color: blue;
}
.redText {
color: red;
}
.yellowText{
color: rgba(254,200,77,1);
}
.imgBox {
/*width: 590px;*/
height: 120px;
/*padding-top: 10px;*/
overflow-y: hidden;
overflow-x: auto;
white-space: nowrap
}
.imgBox > img {
display: inline-block;
width: 180px;
height: 120px;
float: left;
margin-right: 10px;
}
.imgBox > img:last-child {
margin-right: 0;
}
.button button {
margin-left: 0;
margin-right: 10px;
margin-bottom: 10px;
}
.footer-wrap {
line-height: 40px;
background: #f5f5f5;
}
</style>