fix: replace all clusterAsPending → faceGroups
This commit is contained in:
@@ -39,9 +39,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<!-- Face Group -->
|
<!-- Face Group -->
|
||||||
<div v-if="showCluster && clusterAsPending.length" class="ms-ppl-section">
|
<div v-if="showCluster && faceGroups.length" class="ms-ppl-section">
|
||||||
<div class="ms-ppl-section-toolbar">
|
<div class="ms-ppl-section-toolbar">
|
||||||
<div class="ms-ppl-section-title">{{ t('people.section.face_group') }}: <span class="ms-ppl-section-count">({{ clusterAsPending.length }})</span></div>
|
<div class="ms-ppl-section-title">{{ t('people.section.face_group') }}: <span class="ms-ppl-section-count">({{ faceGroups.length }})</span></div>
|
||||||
<button v-if="!batchMode" class="ms-fm-btn ms-fm-btn-sm" @click="batchMode = true">☑ Select</button>
|
<button v-if="!batchMode" class="ms-fm-btn ms-fm-btn-sm" @click="batchMode = true">☑ Select</button>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<button class="ms-fm-btn ms-fm-btn-sm ms-fm-btn-primary" @click="batchMergeGroups" :disabled="selectedGroups.length < 2">⇄ Merge ({{ selectedGroups.length }})</button>
|
<button class="ms-fm-btn ms-fm-btn-sm ms-fm-btn-primary" @click="batchMergeGroups" :disabled="selectedGroups.length < 2">⇄ Merge ({{ selectedGroups.length }})</button>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="ms-ppl-face-grid">
|
<div class="ms-ppl-face-grid">
|
||||||
<div v-for="c in clusterAsPending" :key="c.identity_uuid" class="ms-ppl-face-card ms-ppl-cluster-card" :class="{ 'ms-ppl-face-card-selected': isGroupSelected(c) }" @click="batchMode ? toggleGroupSelection(c) : selectCluster(c)" title="View member faces">
|
<div v-for="c in faceGroups" :key="c.identity_uuid" class="ms-ppl-face-card ms-ppl-cluster-card" :class="{ 'ms-ppl-face-card-selected': isGroupSelected(c) }" @click="batchMode ? toggleGroupSelection(c) : selectCluster(c)" title="View member faces">
|
||||||
<div v-if="batchMode" class="ms-ppl-card-checkbox" @click.stop="toggleGroupSelection(c)">
|
<div v-if="batchMode" class="ms-ppl-card-checkbox" @click.stop="toggleGroupSelection(c)">
|
||||||
<span v-if="isGroupSelected(c)">✓</span>
|
<span v-if="isGroupSelected(c)">✓</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1640,7 +1640,7 @@ async function batchDeleteGroups() {
|
|||||||
if (!selectedGroups.value.length) return
|
if (!selectedGroups.value.length) return
|
||||||
|
|
||||||
const groupIds = Array.from(selectedGroups.value)
|
const groupIds = Array.from(selectedGroups.value)
|
||||||
const groupsToDelete = clusterAsPending.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
const groupsToDelete = faceGroups.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
||||||
|
|
||||||
let totalTraces = 0
|
let totalTraces = 0
|
||||||
const allTraceIds: number[] = []
|
const allTraceIds: number[] = []
|
||||||
@@ -1693,7 +1693,7 @@ async function batchMergeGroups() {
|
|||||||
const groupIds = Array.from(selectedGroups.value)
|
const groupIds = Array.from(selectedGroups.value)
|
||||||
console.log('[batchMergeGroups] groupIds:', groupIds)
|
console.log('[batchMergeGroups] groupIds:', groupIds)
|
||||||
|
|
||||||
mergeCandidateGroups.value = clusterAsPending.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
mergeCandidateGroups.value = faceGroups.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
||||||
console.log('[batchMergeGroups] mergeCandidateGroups:', mergeCandidateGroups.value.length)
|
console.log('[batchMergeGroups] mergeCandidateGroups:', mergeCandidateGroups.value.length)
|
||||||
|
|
||||||
showMergeTargetModal.value = true
|
showMergeTargetModal.value = true
|
||||||
@@ -1703,7 +1703,7 @@ async function executeMerge(targetGroupId: string) {
|
|||||||
console.log('[executeMerge] targetGroupId:', targetGroupId)
|
console.log('[executeMerge] targetGroupId:', targetGroupId)
|
||||||
showMergeTargetModal.value = false
|
showMergeTargetModal.value = false
|
||||||
|
|
||||||
const targetGroup = clusterAsPending.value.find((c: any) => c.identity_uuid === targetGroupId)
|
const targetGroup = faceGroups.value.find((c: any) => c.identity_uuid === targetGroupId)
|
||||||
console.log('[executeMerge] targetGroup:', targetGroup)
|
console.log('[executeMerge] targetGroup:', targetGroup)
|
||||||
if (!targetGroup) return
|
if (!targetGroup) return
|
||||||
|
|
||||||
@@ -1716,7 +1716,7 @@ async function executeMerge(targetGroupId: string) {
|
|||||||
|
|
||||||
const groupIds = Array.from(selectedGroups.value)
|
const groupIds = Array.from(selectedGroups.value)
|
||||||
const sourceGroupIds = groupIds.filter(id => id !== targetGroupId)
|
const sourceGroupIds = groupIds.filter(id => id !== targetGroupId)
|
||||||
const sourceGroups = clusterAsPending.value.filter((c: any) => sourceGroupIds.includes(c.identity_uuid))
|
const sourceGroups = faceGroups.value.filter((c: any) => sourceGroupIds.includes(c.identity_uuid))
|
||||||
console.log('[executeMerge] sourceGroups:', sourceGroups.length)
|
console.log('[executeMerge] sourceGroups:', sourceGroups.length)
|
||||||
|
|
||||||
const sourceGroupNames = sourceGroups.map(g => g.name).filter(Boolean)
|
const sourceGroupNames = sourceGroups.map(g => g.name).filter(Boolean)
|
||||||
@@ -2025,7 +2025,7 @@ async function runDataQC() {
|
|||||||
qcProgress.value.status = 'Collecting trace IDs from clusters...'
|
qcProgress.value.status = 'Collecting trace IDs from clusters...'
|
||||||
|
|
||||||
const allTraceIds = new Set<number>()
|
const allTraceIds = new Set<number>()
|
||||||
for (const c of clusterAsPending.value) {
|
for (const c of faceGroups.value) {
|
||||||
for (const tid of c.trace_ids || []) {
|
for (const tid of c.trace_ids || []) {
|
||||||
allTraceIds.add(tid)
|
allTraceIds.add(tid)
|
||||||
}
|
}
|
||||||
@@ -2037,7 +2037,7 @@ async function runDataQC() {
|
|||||||
qcReport.value.push({
|
qcReport.value.push({
|
||||||
check: 'Traces from Clusters',
|
check: 'Traces from Clusters',
|
||||||
status: totalTraces > 0 ? 'PASS' : 'WARN',
|
status: totalTraces > 0 ? 'PASS' : 'WARN',
|
||||||
details: `${totalTraces} traces in ${clusterAsPending.value.length} clusters`
|
details: `${totalTraces} traces in ${faceGroups.value.length} clusters`
|
||||||
})
|
})
|
||||||
|
|
||||||
// ===== 3. TEST TRACE PROFILES =====
|
// ===== 3. TEST TRACE PROFILES =====
|
||||||
|
|||||||
Reference in New Issue
Block a user