Commit b6694db2 by 李金轩

ljx

1 parent 1f6327c1
<template>
<a-form :model="queryAlarmEventForm" layout="inline">
<a-form :model="queryClusterResultForm" layout="inline">
<a-form-item label="集团:">
<a-select v-model:value="queryAlarmEventForm.account_id"
<a-select v-model:value="queryClusterResultForm.account_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1"
......@@ -16,7 +16,7 @@
</a-select>
</a-form-item>
<a-form-item label="广场:">
<a-select v-model:value="queryAlarmEventForm.plaza_id"
<a-select v-model:value="queryClusterResultForm.plaza_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1"
......@@ -30,7 +30,7 @@
</a-select>
</a-form-item>
<a-form-item label="出入类型:">
<a-select v-model:value="queryAlarmEventForm.type" style="width: 200px">
<a-select v-model:value="queryClusterResultForm.type" style="width: 200px">
<a-select-option :value="0">全场</a-select-option>
<a-select-option :value="1">广场出入口</a-select-option>
<a-select-option :value="2">楼层出入口</a-select-option>
......@@ -39,7 +39,7 @@
</a-select>
</a-form-item>
<a-form-item label="区域信息:">
<a-select v-model:value="queryAlarmEventForm.zone_id"
<a-select v-model:value="queryClusterResultForm.zone_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1"
......@@ -53,7 +53,7 @@
</a-select>
</a-form-item>
<a-form-item label="监控点:">
<a-select v-model:value="queryAlarmEventForm.gate_id"
<a-select v-model:value="queryClusterResultForm.gate_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1">
......@@ -66,7 +66,7 @@
</a-select>
</a-form-item>
<a-form-item label="方向:">
<a-select v-model:value="queryAlarmEventForm.direction"
<a-select v-model:value="queryClusterResultForm.direction"
mode="multiple"
:maxTagCount="1"
style="width: 200px">
......@@ -76,13 +76,13 @@
</a-select>
</a-form-item>
<a-form-item label="抓怕类型:">
<a-select v-model:value="queryAlarmEventForm.picType" style="width: 200px">
<a-select v-model:value="queryClusterResultForm.picType" style="width: 200px">
<a-select-option :value="1">半身照</a-select-option>
<a-select-option :value="2">全身照</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="人员类型:">
<a-select v-model:value="queryAlarmEventForm.personType"
<a-select v-model:value="queryClusterResultForm.personType"
mode="multiple"
:maxTagCount="1"
style="width: 200px">
......@@ -91,44 +91,52 @@
</a-select>
</a-form-item>
<a-form-item label="选择日期:">
<a-date-picker v-model:value="queryAlarmEventForm.date" :format="'YYYY-MM-DD'"/>
<a-date-picker v-model:value="queryClusterResultForm.date" :format="'YYYY-MM-DD'"/>
</a-form-item>
<a-form-item label="选择时间:">
<a-time-picker v-model:value="queryAlarmEventForm.startTime"/>
<a-time-picker v-model:value="queryAlarmEventForm.endTime"/>
<a-time-picker v-model:value="queryClusterResultForm.startTime"/>
<a-time-picker v-model:value="queryClusterResultForm.endTime"/>
</a-form-item>
<a-form-item label="图片数量:">
<a-input v-model:value="queryClusterResultForm.minPic" style="width: 100px"/>
<a-input v-model:value="queryClusterResultForm.maxPic" style="width: 100px"/>
</a-form-item>
<a-form-item>
<a-button type="primary" @click="confirmSearch">查询</a-button>
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
<div v-loading="isLoading">
<el-row v-for="row in pagedTableDataList">
<el-col :span="3" v-for="item in row">
<div style="margin: 0 5px">
<div style="display:flex; justify-content: flex-end ">
<span @click="downloadFile(item.features_url)"
style="color: #409EFF;font-size: 15px;cursor: pointer;">
下载特征值文件
</span>
<div v-for="person in dataList" style="margin: 10px 0;border: solid 1px black">
人id:{{ ' ' + person.person_unid }}
图片数量:{{ person.perrsonList.length }}
<el-row v-for="row in getPagedList(person.perrsonList, 8)">
<el-col :span="3" v-for="item in row">
<div style="margin: 0 5px">
<div style="display:flex; justify-content: flex-end ">
<span @click="downloadFile(item.features_url)"
style="color: #409EFF;font-size: 15px;cursor: pointer;">
下载特征值文件
</span>
</div>
<el-image :src="item.picture_url"
:fit="'fill'"
class="single-image">
</el-image>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
</div>
<el-image :src="item.picture_url"
:fit="'contain'"
class="single-image">
</el-image>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
<a-pagination
v-model:current="pageNum"
v-model:pageSize="pageSize"
:total="total"
:show-total="total => `共 ${total} 条`"
:pageSizeOptions="['24', '48', '96', '192']"
:pageSizeOptions="['10', '20', '40', '80']"
@change="onPageNumChange"
@showSizeChange="onPageSizeChange"
show-size-changer
......@@ -149,7 +157,7 @@ export default {
setup() {
// scalar
const pageNum = ref(1)
const pageSize = ref(24)
const pageSize = ref(10)
const total = ref()
const isLoading = ref(false)
// sequence
......@@ -165,7 +173,7 @@ export default {
}
)
const queryAlarmEventForm = reactive(
const queryClusterResultForm = reactive(
{
account_id: [],
plaza_id: [],
......@@ -178,6 +186,8 @@ export default {
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'),
endTime: moment('23:59:59', 'HH:mm:ss'),
minPic: 0,
maxPic: 100,
}
)
// function
......@@ -212,11 +222,11 @@ export default {
}
const getPlazaList = function() {
queryAlarmEventForm.plaza_id = []
queryClusterResultForm.plaza_id = []
plazaList.value = []
clusterResultApi.getPlazaList(
{
account_id: queryAlarmEventForm.account_id.toString()
account_id: queryClusterResultForm.account_id.toString()
}
).then(
(r) => {
......@@ -229,12 +239,12 @@ export default {
}
const getZoneList = function() {
queryAlarmEventForm.zone_id = []
queryClusterResultForm.zone_id = []
zoneList.value = []
clusterResultApi.getZoneList(
{
account_id: queryAlarmEventForm.account_id.toString(),
plaza_id: queryAlarmEventForm.plaza_id.toString(),
account_id: queryClusterResultForm.account_id.toString(),
plaza_id: queryClusterResultForm.plaza_id.toString(),
}
).then(
(r) => {
......@@ -247,14 +257,14 @@ export default {
}
const getGateList = function() {
queryAlarmEventForm.gate_id = []
queryClusterResultForm.gate_id = []
gateList.value = []
clusterResultApi.getGateList(
{
account_id: queryAlarmEventForm.account_id.toString(),
plaza_id: queryAlarmEventForm.plaza_id.toString(),
zone_id: queryAlarmEventForm.zone_id.toString(),
type: queryAlarmEventForm.type,
account_id: queryClusterResultForm.account_id.toString(),
plaza_id: queryClusterResultForm.plaza_id.toString(),
zone_id: queryClusterResultForm.zone_id.toString(),
type: queryClusterResultForm.type,
}
).then(
(r) => {
......@@ -267,7 +277,7 @@ export default {
}
const getAccountList = function() {
queryAlarmEventForm.account_id = []
queryClusterResultForm.account_id = []
accountList.value = []
clusterResultApi.getAccountList().then(
(r) => {
......@@ -281,7 +291,7 @@ export default {
const confirmSearch = function() {
isLoading.value = true
const rawData = toRaw(queryAlarmEventForm)
const rawData = toRaw(queryClusterResultForm)
const data = filterEmptyValueInObject(
{
account_id: rawData.account_id.toString(),
......@@ -292,9 +302,10 @@ export default {
direction: rawData.direction.toString(),
picType: rawData.picType,
personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
minPic: rawData.minPic,
maxPic: rawData.maxPic,
page: pageNum.value - 1,
pageSize: pageSize.value,
}
......@@ -303,6 +314,7 @@ export default {
clusterResultApi.getClusterResultList(data).then(
(r) => {
isLoading.value = false
sortDataList(r.data.persons)
dataList.value = r.data.persons
total.value = r.data.pageNum
}
......@@ -331,6 +343,14 @@ export default {
}
}
}
const sortDataList = function(list) {
list.sort(
(a, b) => {
return (b.perrsonList.length - a.perrsonList.length)
}
)
}
const downloadFile = function(url) {
window.open(url)
}
......@@ -353,8 +373,9 @@ export default {
zoneList,
gateList,
pagedTableDataList,
dataList,
// mapping
queryAlarmEventForm,
queryClusterResultForm,
// function
onPageNumChange,
onPageSizeChange,
......@@ -365,6 +386,7 @@ export default {
confirmSearch,
formatDirection,
downloadFile,
getPagedList,
}
}
}
......
......@@ -6,7 +6,7 @@ class ClusterResultApi {
return axiosInstance.request(
{
method: 'GET',
url: `/faceRecognitions/faceRecord`,
url: `/faceRecognitions/faceRecordGroup`,
params: filterEmptyValueInObject(
data
)
......
<template>
<a-form :model="queryAlarmEventForm" layout="inline">
<a-form :model="querySnapshotRecordForm" layout="inline">
<a-form-item label="集团:">
<a-select v-model:value="queryAlarmEventForm.account_id"
<a-select v-model:value="querySnapshotRecordForm.account_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1"
......@@ -16,7 +16,7 @@
</a-select>
</a-form-item>
<a-form-item label="广场:">
<a-select v-model:value="queryAlarmEventForm.plaza_id"
<a-select v-model:value="querySnapshotRecordForm.plaza_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1"
......@@ -30,7 +30,7 @@
</a-select>
</a-form-item>
<a-form-item label="出入类型:">
<a-select v-model:value="queryAlarmEventForm.type" style="width: 200px">
<a-select v-model:value="querySnapshotRecordForm.type" style="width: 200px">
<a-select-option :value="0">全场</a-select-option>
<a-select-option :value="1">广场出入口</a-select-option>
<a-select-option :value="2">楼层出入口</a-select-option>
......@@ -39,7 +39,7 @@
</a-select>
</a-form-item>
<a-form-item label="区域信息:">
<a-select v-model:value="queryAlarmEventForm.zone_id"
<a-select v-model:value="querySnapshotRecordForm.zone_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1"
......@@ -53,7 +53,7 @@
</a-select>
</a-form-item>
<a-form-item label="监控点:">
<a-select v-model:value="queryAlarmEventForm.gate_id"
<a-select v-model:value="querySnapshotRecordForm.gate_id"
style="width: 200px"
mode="multiple"
:maxTagCount="1">
......@@ -66,7 +66,7 @@
</a-select>
</a-form-item>
<a-form-item label="方向:">
<a-select v-model:value="queryAlarmEventForm.direction"
<a-select v-model:value="querySnapshotRecordForm.direction"
mode="multiple"
:maxTagCount="1"
style="width: 200px">
......@@ -76,13 +76,13 @@
</a-select>
</a-form-item>
<a-form-item label="抓怕类型:">
<a-select v-model:value="queryAlarmEventForm.picType" style="width: 200px">
<a-select v-model:value="querySnapshotRecordForm.picType" style="width: 200px">
<a-select-option :value="1">半身照</a-select-option>
<a-select-option :value="2">全身照</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="人员类型:">
<a-select v-model:value="queryAlarmEventForm.personType"
<a-select v-model:value="querySnapshotRecordForm.personType"
mode="multiple"
:maxTagCount="1"
style="width: 200px">
......@@ -91,14 +91,14 @@
</a-select>
</a-form-item>
<a-form-item label="选择日期:">
<a-date-picker v-model:value="queryAlarmEventForm.date" :format="'YYYY-MM-DD'"/>
<a-date-picker v-model:value="querySnapshotRecordForm.date" :format="'YYYY-MM-DD'"/>
</a-form-item>
<a-form-item label="选择时间:">
<a-time-picker v-model:value="queryAlarmEventForm.startTime"/>
<a-time-picker v-model:value="queryAlarmEventForm.endTime"/>
<a-time-picker v-model:value="querySnapshotRecordForm.startTime"/>
<a-time-picker v-model:value="querySnapshotRecordForm.endTime"/>
</a-form-item>
<a-form-item>
<a-button type="primary" @click="confirmSearch">查询</a-button>
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
......@@ -113,7 +113,7 @@
</span>
</div>
<el-image :src="item.picture_url"
:fit="'contain'"
:fit="'fill'"
class="single-image">
</el-image>
<div>时间:{{ item.counttime }}</div>
......@@ -165,7 +165,7 @@ export default {
}
)
const queryAlarmEventForm = reactive(
const querySnapshotRecordForm = reactive(
{
account_id: [],
plaza_id: [],
......@@ -212,11 +212,11 @@ export default {
}
const getPlazaList = function() {
queryAlarmEventForm.plaza_id = []
querySnapshotRecordForm.plaza_id = []
plazaList.value = []
snapshotRecordApi.getPlazaList(
{
account_id: queryAlarmEventForm.account_id.toString()
account_id: querySnapshotRecordForm.account_id.toString()
}
).then(
(r) => {
......@@ -229,12 +229,12 @@ export default {
}
const getZoneList = function() {
queryAlarmEventForm.zone_id = []
querySnapshotRecordForm.zone_id = []
zoneList.value = []
snapshotRecordApi.getZoneList(
{
account_id: queryAlarmEventForm.account_id.toString(),
plaza_id: queryAlarmEventForm.plaza_id.toString(),
account_id: querySnapshotRecordForm.account_id.toString(),
plaza_id: querySnapshotRecordForm.plaza_id.toString(),
}
).then(
(r) => {
......@@ -247,14 +247,14 @@ export default {
}
const getGateList = function() {
queryAlarmEventForm.gate_id = []
querySnapshotRecordForm.gate_id = []
gateList.value = []
snapshotRecordApi.getGateList(
{
account_id: queryAlarmEventForm.account_id.toString(),
plaza_id: queryAlarmEventForm.plaza_id.toString(),
zone_id: queryAlarmEventForm.zone_id.toString(),
type: queryAlarmEventForm.type,
account_id: querySnapshotRecordForm.account_id.toString(),
plaza_id: querySnapshotRecordForm.plaza_id.toString(),
zone_id: querySnapshotRecordForm.zone_id.toString(),
type: querySnapshotRecordForm.type,
}
).then(
(r) => {
......@@ -267,7 +267,7 @@ export default {
}
const getAccountList = function() {
queryAlarmEventForm.account_id = []
querySnapshotRecordForm.account_id = []
accountList.value = []
snapshotRecordApi.getAccountList().then(
(r) => {
......@@ -281,7 +281,7 @@ export default {
const confirmSearch = function() {
isLoading.value = true
const rawData = toRaw(queryAlarmEventForm)
const rawData = toRaw(querySnapshotRecordForm)
const data = filterEmptyValueInObject(
{
account_id: rawData.account_id.toString(),
......@@ -354,7 +354,7 @@ export default {
gateList,
pagedTableDataList,
// mapping
queryAlarmEventForm,
querySnapshotRecordForm,
// function
onPageNumChange,
onPageSizeChange,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!