Commit 11d5e477 by 陈岩

feat: 修复搜索抓拍条件,增加部分页面广场搜索

1 parent 5d4505c7
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
const getPlazaList = function() { const getPlazaList = function() {
queryForm.plaza_id = [] queryForm.plaza_id = []
plazaList.value = [] plazaList.value = []
snapshotRecordApi.getPlazaList( snapshotRecordApi.getPlazaListApi(
{ {
account_id: queryForm.account_id.toString() account_id: queryForm.account_id.toString()
} }
......
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
const getPlazaList = function() { const getPlazaList = function() {
queryForm.plaza_id = [] queryForm.plaza_id = []
plazaList.value = [] plazaList.value = []
snapshotRecordApi.getPlazaList( snapshotRecordApi.getPlazaListApi(
{ {
account_id: queryForm.account_id.toString() account_id: queryForm.account_id.toString()
} }
......
...@@ -489,13 +489,13 @@ export default { ...@@ -489,13 +489,13 @@ export default {
const snapShotRecordSearchDialogRef = ref() const snapShotRecordSearchDialogRef = ref()
const handleShotSearch = (dataList,item,dataIndex) => { const handleShotSearch = (dataList,item,dataIndex) => {
// 方向是进 找从dataIndex到dataList.length - 1中第一个方向是出的 并且地点id相同 gate_id // 方向是进 找从dataIndex到dataList.length - 1中第一个方向是出的
const gateId = item.gate_id const gateId = item.gate_id
let index = 0,lastIndex = 0; let index = 0,lastIndex = 0;
if(item.direction === 1){ if(item.direction === 1){
index = dataIndex index = dataIndex
lastIndex = dataList.findIndex((v,index) => index > dataIndex && v.direction === -1 && v.gate_id === gateId) lastIndex = dataList.findIndex((v,index) => index > dataIndex && v.direction === -1 )
if(lastIndex === -1){ if(lastIndex === -1){
ElMessage.error('未找到匹配的出方向的数据') ElMessage.error('未找到匹配的出方向的数据')
return false return false
...@@ -503,7 +503,7 @@ export default { ...@@ -503,7 +503,7 @@ export default {
}else if(item.direction === -1){ }else if(item.direction === -1){
lastIndex = dataIndex lastIndex = dataIndex
const list = dataList.slice(0,dataIndex) const list = dataList.slice(0,dataIndex)
index = list.findLastIndex((v,index) => index < dataIndex && v.direction === 1 && v.gate_id === gateId) index = list.findLastIndex((v,index) => index < dataIndex && v.direction === 1)
if(index === -1){ if(index === -1){
ElMessage.error('未找到匹配的出方向的数据') ElMessage.error('未找到匹配的出方向的数据')
return false return false
...@@ -523,6 +523,7 @@ export default { ...@@ -523,6 +523,7 @@ export default {
startTime: dataList[index].counttime, startTime: dataList[index].counttime,
endTime: dataList[lastIndex].counttime, endTime: dataList[lastIndex].counttime,
personType: queryForm.personType, personType: queryForm.personType,
gate_name: item.gate_name,
others:{ others:{
ids:[dataList[index].id,dataList[lastIndex].id], ids:[dataList[index].id,dataList[lastIndex].id],
...dataList[dataIndex] ...dataList[dataIndex]
...@@ -737,7 +738,6 @@ export default { ...@@ -737,7 +738,6 @@ export default {
} }
const getAccountList = function() { const getAccountList = function() {
queryForm.account_id = '' queryForm.account_id = ''
accountList.value = [] accountList.value = []
......
<template> <template>
<a-modal v-model:visible="visible" :title="`抓拍搜索`" :width="1800"> <a-modal v-model:visible="visible" :title="`抓拍搜索(${submitForm.startTime}至${submitForm.endTime})地点: ${submitForm.gate_name}`" :width="1800">
<div v-loading="isLoading"> <div v-loading="isLoading">
<div class="resultContent" :style="{ height: 300 + 'px' }" v-if="pagedTableDataList.length > 0"> <div class="resultContent" :style="{ height: 300 + 'px' }" v-if="pagedTableDataList.length > 0">
<el-row v-for="(row, rowIndex) in pagedTableDataList" :key="rowIndex"> <el-row v-for="(row, rowIndex) in pagedTableDataList" :key="rowIndex">
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
> >
<!-- @click="handleClick(item)" --> <!-- @click="handleClick(item)" -->
<div style=""> <div style="">
<span @click="onSave(item)" class="downBtn"> <span @click="handleAddToCluster(item)" class="downBtn">
添加到聚类 添加到聚类
</span> </span>
</div> </div>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<script setup> <script setup>
import { defineExpose, defineEmits, ref, computed } from "vue"; import { defineExpose, defineEmits, ref, computed } from "vue";
import { cloneDeep } from "lodash"; import { cloneDeep } from "lodash";
import { ElMessage } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { getPagedList } from "@/PublicUtil/PublicUtil"; import { getPagedList } from "@/PublicUtil/PublicUtil";
import clusterResultApi from "../ClusterResultApi"; import clusterResultApi from "../ClusterResultApi";
import snapshotRecordApi from "@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi"; import snapshotRecordApi from "@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi";
...@@ -97,12 +97,27 @@ const formatChildAdult = function (val) { ...@@ -97,12 +97,27 @@ const formatChildAdult = function (val) {
else return "未知"; else return "未知";
}; };
const handleAddToCluster = (item) =>{
// 二级确认
ElMessageBox.confirm('确认添加到聚类吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 确认添加到聚类
onSave(item)
}).catch(() => {
// 取消添加到聚类
});
}
const onSave = (item) => { const onSave = (item) => {
const { person_unid } = submitForm.value.others const { person_unid } = submitForm.value.others
const params = { const params = {
unid: item.unid, unid: item.unid,
personUnid: person_unid, personUnid: person_unid,
countdate: item.counttime, // countdate只要年月日
countdate: item.counttime.split(' ')[0],
} }
clusterResultApi.updateRecognition(params).then( clusterResultApi.updateRecognition(params).then(
(r) => { (r) => {
...@@ -168,6 +183,7 @@ const onPageSizeChange = function (current, size) { ...@@ -168,6 +183,7 @@ const onPageSizeChange = function (current, size) {
// 初始化弹窗 // 初始化弹窗
const initDialog = (form, selectOptionsMap) => { const initDialog = (form, selectOptionsMap) => {
dataList.value = []
submitForm.value = cloneDeep(form); submitForm.value = cloneDeep(form);
personTypeList.value = selectOptionsMap.personTypeList || []; personTypeList.value = selectOptionsMap.personTypeList || [];
visible.value = true; visible.value = true;
......
...@@ -64,6 +64,19 @@ class SnapshotRecordApi { ...@@ -64,6 +64,19 @@ class SnapshotRecordApi {
} }
) )
} }
getPlazaListApi(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/malls/square`,
params: filterEmptyValueInObject(
{
accountIds: data.account_id
},
)
}
)
}
getResidenceList(data) { getResidenceList(data) {
return axiosInstance.request( return axiosInstance.request(
{ {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
const getPlazaList = function() { const getPlazaList = function() {
queryForm.plaza_id = [] queryForm.plaza_id = []
plazaList.value = [] plazaList.value = []
snapshotRecordApi.getPlazaList({ snapshotRecordApi.getPlazaListApi({
account_id: queryForm.account_id.toString() account_id: queryForm.account_id.toString()
}).then( }).then(
(r) => { (r) => {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
const getPlazaList = function() { const getPlazaList = function() {
queryForm.plaza_id = [] queryForm.plaza_id = []
plazaList.value = [] plazaList.value = []
snapshotRecordApi.getPlazaList({ snapshotRecordApi.getPlazaListApi({
account_id: queryForm.account_id.toString() account_id: queryForm.account_id.toString()
}).then( }).then(
(r) => { (r) => {
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
const getPlazaList = function() { const getPlazaList = function() {
queryForm.plaza_id = '' queryForm.plaza_id = ''
plazaList.value = [] plazaList.value = []
snapshotRecordApi.getPlazaList({ snapshotRecordApi.getPlazaListApi({
account_id: queryForm.account_id account_id: queryForm.account_id
}).then( }).then(
(r) => { (r) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!