Commit 065de870 by 陈岩

feat: 增加搜索项定向问题

1 parent 11d5e477
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<div v-loading="isLoading"> <div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}"> <div class="resultContent" :style="{'height':contentHeight+'px'}">
<template v-for="person in dataList"> <template v-for="(person,personIndex) in dataList">
<div class="classBox" :class="person.expand?'expand':''"> <div class="classBox" :class="person.expand?'expand':''">
<div :class="person.checked?'checked':''"> <div :class="person.checked?'checked':''">
<div class="boxInfo"> <div class="boxInfo">
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
class="downBtn"> class="downBtn">
轨迹 轨迹
</span> </span>
<span class="downBtn" v-if="item.direction === 1 || item.direction === -1" @click="handleShotSearch(person.perrsonList,item,rowIndex*8+index)">搜索抓拍</span> <span class="downBtn" v-if="item.direction === 1 || item.direction === -1" @click="handleShotSearch(person.perrsonList,item,rowIndex*8+index,personIndex)">搜索抓拍</span>
<span @click="downloadFile(item.features_url)" <span @click="downloadFile(item.features_url)"
class="downBtn downBtn1"> class="downBtn downBtn1">
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
<AddPersonnelPool ref='personnelPoolRef' :data-params="currentSearchCondition" @refresh="handleRefresh" /> <AddPersonnelPool ref='personnelPoolRef' :data-params="currentSearchCondition" @refresh="handleRefresh" />
<PersonGroupDialog ref='personGroupDialogRef' :query-form="queryForm" @refresh="handleRefresh" /> <PersonGroupDialog ref='personGroupDialogRef' :query-form="queryForm" @refresh="handleRefresh" />
<AddEditSnapshotClusterDialog ref="addEditSnapshotClusterRef" /> <AddEditSnapshotClusterDialog ref="addEditSnapshotClusterRef" />
<SnapShotRecordSearchDialog ref="snapShotRecordSearchDialogRef" @refresh="handleRefresh" /> <SnapShotRecordSearchDialog ref="snapShotRecordSearchDialogRef" @added="handleAdded" />
</template> </template>
...@@ -377,9 +377,6 @@ export default { ...@@ -377,9 +377,6 @@ export default {
DetailDialogComparison, DetailDialogComparison,
singleImgComparisonDialog, singleImgComparisonDialog,
SnapShotRecordSearchDialog, SnapShotRecordSearchDialog,
}, },
setup() { setup() {
...@@ -488,7 +485,7 @@ export default { ...@@ -488,7 +485,7 @@ export default {
) )
const snapShotRecordSearchDialogRef = ref() const snapShotRecordSearchDialogRef = ref()
const handleShotSearch = (dataList,item,dataIndex) => { const handleShotSearch = (dataList,item,dataIndex,personIndex) => {
// 方向是进 找从dataIndex到dataList.length - 1中第一个方向是出的 // 方向是进 找从dataIndex到dataList.length - 1中第一个方向是出的
const gateId = item.gate_id const gateId = item.gate_id
...@@ -529,7 +526,10 @@ export default { ...@@ -529,7 +526,10 @@ export default {
...dataList[dataIndex] ...dataList[dataIndex]
} }
} }
snapShotRecordSearchDialogRef.value?.initDialog(params, { personTypeList:personTypeList.value }) snapShotRecordSearchDialogRef.value?.initDialog(params, { personTypeList:personTypeList.value },{
index:dataIndex,
personIndex
})
} }
const searchCondition = ref({}) const searchCondition = ref({})
...@@ -772,6 +772,11 @@ export default { ...@@ -772,6 +772,11 @@ export default {
pageNum.value = 1 pageNum.value = 1
confirmSearch() confirmSearch()
} }
const handleAdded = (item,indexMap)=>{
const {index,personIndex:pIndex} = indexMap;
// 在dataList[pIndex]的perrsonList的index位置插入一条数据
(dataList.value[pIndex].perrsonList ??= []).splice(index, 0, item);
}
const handleRefresh = function() { const handleRefresh = function() {
currentItemId.value = '' currentItemId.value = ''
isMultipleOperation.value = false isMultipleOperation.value = false
...@@ -1555,6 +1560,7 @@ export default { ...@@ -1555,6 +1560,7 @@ export default {
clickSearch, clickSearch,
updatePersonInfoByCluster, updatePersonInfoByCluster,
handleRefresh, handleRefresh,
handleAdded,
handleEditorRefresh, handleEditorRefresh,
currentSearchCondition, currentSearchCondition,
// ref // ref
......
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
}).finally(() => { }).finally(() => {
}) })
}; };
const formatImgUrl = (url) => { const formatImgUrl = (url) => {
return window._baseImgUrl + url return window._baseImgUrl + url
} }
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
} }
personList.value = personList.value.concat(targetDataList) personList.value = personList.value.concat(targetDataList)
selectedImgList.value = [] selectedImgList.value = []
emit('refresh')
clickSearch() clickSearch()
} else { } else {
ElMessage({ ElMessage({
...@@ -364,7 +364,7 @@ export default { ...@@ -364,7 +364,7 @@ export default {
} }
default: default:
{ {
break break
} }
} }
...@@ -419,8 +419,8 @@ export default { ...@@ -419,8 +419,8 @@ export default {
isLoading.value = false isLoading.value = false
}) })
}; };
return { return {
keydownClick, keydownClick,
......
...@@ -76,7 +76,7 @@ const pagedTableDataList = computed(() => { ...@@ -76,7 +76,7 @@ const pagedTableDataList = computed(() => {
const pageNum = ref(1); const pageNum = ref(1);
const pageSize = ref(8); const pageSize = ref(8);
const total = ref(0); const total = ref(0);
const emit = defineEmits(['refresh']) const emit = defineEmits(['refresh','added'])
const childAdultOptions = ref([ const childAdultOptions = ref([
{ value: 0, label: "儿童" }, { value: 0, label: "儿童" },
...@@ -119,6 +119,10 @@ const handleAddToCluster = (item) =>{ ...@@ -119,6 +119,10 @@ const handleAddToCluster = (item) =>{
// countdate只要年月日 // countdate只要年月日
countdate: item.counttime.split(' ')[0], countdate: item.counttime.split(' ')[0],
} }
// 出
if(item.direction === -1){
indexMap.value.index += 1
}
clusterResultApi.updateRecognition(params).then( clusterResultApi.updateRecognition(params).then(
(r) => { (r) => {
if(r.msg_code==200){ if(r.msg_code==200){
...@@ -127,7 +131,7 @@ const handleAddToCluster = (item) =>{ ...@@ -127,7 +131,7 @@ const handleAddToCluster = (item) =>{
type: 'success' type: 'success'
}) })
// 刷新列表 // 刷新列表
emit('refresh') emit('added',item, indexMap.value)
visible.value = false visible.value = false
} else { } else {
ElMessage({ ElMessage({
...@@ -180,13 +184,17 @@ const onPageSizeChange = function (current, size) { ...@@ -180,13 +184,17 @@ const onPageSizeChange = function (current, size) {
pageSize.value = size; pageSize.value = size;
confirmSearch(); confirmSearch();
}; };
const indexMap = ref({
index:'',
personIndex:''
})
// 初始化弹窗 // 初始化弹窗
const initDialog = (form, selectOptionsMap) => { const initDialog = (form, selectOptionsMap,indexM) => {
dataList.value = [] dataList.value = []
submitForm.value = cloneDeep(form); submitForm.value = cloneDeep(form);
personTypeList.value = selectOptionsMap.personTypeList || []; personTypeList.value = cloneDeep(selectOptionsMap.personTypeList || []);
visible.value = true; visible.value = true;
indexMap.value = indexM
confirmSearch(); confirmSearch();
}; };
const isLoading = ref(false); const isLoading = ref(false);
...@@ -238,7 +246,6 @@ const confirmSearch = function () { ...@@ -238,7 +246,6 @@ const confirmSearch = function () {
(item) => !submitForm.value.others.ids.includes(item.id) (item) => !submitForm.value.others.ids.includes(item.id)
) || []; ) || [];
total.value = r.data.pageNum; total.value = r.data.pageNum;
document.getElementsByClassName("resultContent")[0].scrollTop = 0;
}); });
}; };
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!