DetailDialog.vue
3.27 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
<template>
<a-modal
title="店员特征对比"
v-model:visible="isVisible"
width="1500px"
height='90%'
class="detail-modal"
>
<div v-loading='isLoading'>
<a-row :gutter="[16,16]">
<a-col :span='4'>
<div style="margin: 0 5px">
<el-image :src="detailData.picture_url" :fit="'fill'" class="single-image">
</el-image>
<div>时间:{{ detailData.counttime }}</div>
<div>方向:{{ formatDirection(detailData.direction) }}</div>
<div>地点:{{ detailData.gate_name }}</div>
</div>
</a-col>
<a-col :span='20'>
<a-row v-for="(row,index) in dataList" :key='index' class='rowBox'>
<p>{{row.name}} {{row.shopname}}</p>
<a-col :span="6" v-for="item in row.personList" class='itemBox' :key='item.id'>
<div style="margin: 0 5px">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image>
<p class="featureNum">{{item.featureNum}}</p>
<div>时间:{{ item.counttime }}</div>
</div>
</a-col>
</a-row>
</a-col>
</a-row>
</div>
<template #footer>
<a-button @click="onCancel">返回</a-button>
</template>
</a-modal>
</template>
<script>
import { reactive, ref } from "vue";
import {isArray } from '@/PublicUtil/Judgment'
import comparsionResultApi from '@/views/ComparisonCapturedPictures/api'
export default {
setup() {
const isVisible = ref(false);
const isLoading = ref(false);
const detailData = ref({});
const dataList = ref([])
const initDialog = (record,parmas) => {
detailData.value = record;
isVisible.value = true;
dataList.value = []
isLoading.value = true
comparsionResultApi.getStaffContrastList(parmas).then((r) => {
isLoading.value = false
if (isArray(r.data)) {
if(r.data.length>0){
dataList.value = r.data
console.log(r.data)
}
}
}
)
};
const formatDirection = function(number) {
switch (number) {
case 1: {
return '进'
}
case -1: {
return '出'
}
case 0: {
return '横穿'
}
default: {
break
}
}
}
const onCancel = () => {
isVisible.value = false;
};
return {
isVisible,
detailData,
onCancel,
dataList,
initDialog,
isLoading,
formatDirection
};
},
};
</script>
<style lang="less" scoped>
.single-image {
height: 300px;
width: 100%;
}
.rowBox{
border : 2px dashed #ccc;
padding: 0 5px;
margin-bottom: 15px;
}
.itemBox{
position: relative;
}
.featureNum{
position: absolute;
top: 0;
left: 15px;
color: red;
font-weight: 900;
font-size: 16px;
}
</style>