Commit f41139ec by Tianqing Liu

feat: 聚类结果,批量删除

1 parent 5519d217
...@@ -132,6 +132,14 @@ ...@@ -132,6 +132,14 @@
<span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span> <span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span>
<!--修正组类型数据--> <!--修正组类型数据-->
<a-popconfirm
title="您确认要删除此记录吗?"
ok-text="是"
cancel-text="否"
@confirm="deletePersonRecord(person)"
>
<span class="expandWord">删除</span>
</a-popconfirm>
<span class="expandWord" @click='updatePersonInfoByGroup(person)'>类型修正</span> <span class="expandWord" @click='updatePersonInfoByGroup(person)'>类型修正</span>
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox> <el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
...@@ -142,8 +150,8 @@ ...@@ -142,8 +150,8 @@
<el-col :span="3" v-for="item in row"> <el-col :span="3" v-for="item in row">
<div <div
style="margin: 0 5px" style="margin: 0 5px"
:class="currentItemId==item.id?'actived':''" :class="(currentItemId==item.id || isSelectedPerson(item.id))?'actived':''"
@click="handleClick(item)" @click="handleClick(item, $event)"
> >
<div style=""> <div style="">
<span @click="downloadTrajectoryFile(item.track_url)" <span @click="downloadTrajectoryFile(item.track_url)"
...@@ -565,6 +573,27 @@ export default { ...@@ -565,6 +573,27 @@ export default {
// isShowGroupEditor.value = true // isShowGroupEditor.value = true
personGroupEditorRef.value.initDialog(data); personGroupEditorRef.value.initDialog(data);
} }
// 删除人员
const selectedPersonList = ref([])
const deletePersonRecord = (data) => {
console.log('deletePersonRecord', data)
clusterResultApi.deletePerson(data).then(
(r) => {
if(r.msg_code==200){
ElMessage({
message: `删除成功`,
type: 'success'
})
selectedPersonList.value = []
// 刷新列表
clickSearch()
}
}
)
}
const isSelectedPerson = (id) => {
return selectedPersonList.value.some(item => item.id === id)
}
const downloadFile = function(url) { const downloadFile = function(url) {
window.open(url) window.open(url)
...@@ -572,14 +601,13 @@ export default { ...@@ -572,14 +601,13 @@ export default {
const downloadTrajectoryFile = function(url){ const downloadTrajectoryFile = function(url){
window.open(url) window.open(url)
} }
const handleClick = function(data){ const handleClick = function(data, event){
currentItemId.value = data.id console.log('handleClick', event)
currobj.value = data; currentItemId.value = data.id
// clusterResultApi.getBodyPoint({'feature_url':feature}).then( currobj.value = data;
// (r) => { if (event.metaKey) {
// imgModelRef.value.initDialog(url,r.data); selectedPersonList.value.push(data)
// } }
// )
} }
const checkChange = function(data){ const checkChange = function(data){
console.log(data) console.log(data)
...@@ -742,6 +770,9 @@ export default { ...@@ -742,6 +770,9 @@ export default {
checkChange, checkChange,
expandChange, expandChange,
updatePersonInfoByGroup, updatePersonInfoByGroup,
deletePersonRecord,
isSelectedPerson,
selectedPersonList,
clerkComparativeFun, clerkComparativeFun,
singleComparativeFun, singleComparativeFun,
formatGender, formatGender,
......
...@@ -91,6 +91,15 @@ class ClusterResultApi { ...@@ -91,6 +91,15 @@ class ClusterResultApi {
} }
) )
} }
// 多选删除
deletePerson(data) {
return axiosInstance.request(
{
method: 'DELETE',
url: `/faceRecognitions/${data.id}`,
}
)
}
} }
const clusterResultApi = new ClusterResultApi() const clusterResultApi = new ClusterResultApi()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!