Commit fc468a13 by Tianqing Liu

feat: 优化多选删除功能

1 parent fa0f2c19
......@@ -151,7 +151,7 @@
<el-col :span="3" v-for="item in row">
<div
style="margin: 0 5px"
:class="(currentItemId==item.id || isSelectedPerson(item.id))?'actived':''"
:class="[(currentItemId==item.id)?'actived':'', isSelectedPerson(item.id)?'actived-red':'']"
@click="handleClick(item, $event)"
>
<div style="">
......@@ -586,7 +586,7 @@ export default {
unid: unidList.join(','),
personUnid: '',
}
clusterResultApi.updatePerson(params).then(
clusterResultApi.updateRecognition(params).then(
(r) => {
if(r.msg_code==200){
ElMessage({
......@@ -596,6 +596,11 @@ export default {
selectedPersonList.value = []
// 刷新列表
clickSearch()
} else {
ElMessage({
message: `剔除失败`,
type: 'error'
})
}
}
)
......@@ -630,10 +635,13 @@ export default {
}
const handleClick = function(data, event){
console.log('handleClick', event)
currentItemId.value = data.id
currobj.value = data;
if (event.metaKey) {
selectedPersonList.value.push(data)
} else {
currentItemId.value = data.id
currobj.value = data;
// 清空多选
selectedPersonList.value = []
}
}
const checkChange = function(data){
......@@ -823,6 +831,9 @@ export default {
.actived{
border: 3px solid #1890ff;
}
.actived-red {
border: 3px solid red;
}
.checkBox{
margin-left: 10px;
}
......
......@@ -100,6 +100,16 @@ class ClusterResultApi {
}
)
}
// 剔除
updateRecognition(data) {
return axiosInstance.request(
{
method: 'POST',
url: `/faceRecognitions/updateRecognition`,
data: data
}
)
}
}
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!