Commit 11d5e477 by 陈岩

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

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