Commit 3344937b by Tianqing Liu

feat: 增加按分组添加

1 parent bff1c36f
......@@ -21,7 +21,7 @@
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
<a-button @click="handleAddGroup" :loading="addGroupLoading" style="margin-left: 10px">加入分组</a-button>
<a-button @click="handleAddGroup()" :loading="addGroupLoading" style="margin-left: 10px">加入选中图片</a-button>
<a-alert style="display: inline-block;margin-left: 20px" message="提示:单击选择图片,再次单击,取消选择。双击预览图片。" type="info" />
</a-form-item>
</a-form>
......@@ -55,6 +55,9 @@
<div class="right-part">
<template v-if="groupList.length > 0">
<div class="classBox" v-for="row in groupList" :key="row.person_unid">
<div style="text-align: right;margin-bottom: 10px;">
<a-button @click="handleAddGroup(row.personList)" :loading="addGroupLoading" style="margin-left: 10px">加入此分组内图片</a-button>
</div>
<el-row>
<el-col class="itemBox" :span="3" v-for="item in row.personList" :key="item.id">
<div
......@@ -158,16 +161,18 @@ export default {
return selectedImgList.value.some(item => item.id === data.id)
}
const addGroupLoading = ref(false)
const handleAddGroup = () => {
if (selectedImgList.value.length > 0) {
const strUnidList = selectedImgList.value.map((item) => item.unid).join(',')
const handleAddGroup = (dataList) => {
const targetDataList = dataList || selectedImgList.value
if (targetDataList.length > 0) {
const strUnidList = targetDataList.map((item) => item.unid).join(',')
const params = {
unid: strUnidList,
personUnid: personUnid.value,
}
addGroupLoading.value = true
clusterResultApi.getBodyPoint(params).then((r) => {
clusterResultApi.updateRecognition(params).then((r) => {
console.log('r', r)
if(r.msg_code === 200) {
ElMessage({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!