Commit fc468a13 by Tianqing Liu

feat: 优化多选删除功能

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