feat: O→KR→KPI Phase 0 - KR sub-nodes on canvas, KR edit dialog, data migration

- MapNode.vue: Add collapsible KR sub-list with progress bars under each O node
- MapCanvasDialogs.vue: Add KPI selector per KR, editing mode (skip template step, pre-fill data), validation (max 5 KR, target value required)
- StrategyLayer.vue: Pass through edit-kr/add-kr events
- MapCanvas.vue: Data migration (old kpis[]→krs[]), KR add/edit handlers, pass editingObj/allKpis to dialog
This commit is contained in:
Hermes CI Fix
2026-07-26 18:01:59 +08:00
parent 84749a35ca
commit b593e0383f
4 changed files with 356 additions and 14 deletions
@@ -50,7 +50,9 @@
@link-drag-start="(e: MouseEvent) => $emit('link-drag-start', e, layerKey, index, element)"
@kpi-click="(code: string) => $emit('kpi-click', code)"
@plan-click="$emit('show-plan-list', { dimKey: layerKey, idx: index, obj: element })"
/>
@edit-kr="(p: any) => $emit('edit-kr', { dimKey: layerKey, idx: index, obj: element, ki: p.index, kr: p.kr })"
@add-kr="$emit('add-kr', { dimKey: layerKey, idx: index, obj: element })"
/>
</div>
</template>
</draggable>
@@ -107,6 +109,8 @@ const emit = defineEmits<{
(e: 'update:label', val: string): void
(e: 'update:color', val: string): void
(e: 'update:icon', val: string): void
(e: 'edit-kr', payload: { dimKey: string; idx: number; obj: any; ki: number; kr: any }): void
(e: 'add-kr', payload: { dimKey: string; idx: number; obj: any }): void
}>()
const bodyRef = ref<HTMLElement | null>(null)