feat(M08-B): 补联调分类进度

This commit is contained in:
Codex
2026-07-06 08:16:56 +08:00
parent 86106459c4
commit 1543a7df99
7 changed files with 87 additions and 8 deletions
@@ -99,6 +99,23 @@
</el-form-item>
</el-form>
</section>
<section class="handoff-category-progress">
<div v-for="item in categoryProgress" :key="item.category" class="handoff-category-row">
<div class="handoff-category-title">
<strong>{{ item.category }}</strong>
<span>{{ item.passed }}/{{ item.total }} 通过</span>
</div>
<el-progress
:percentage="item.passPercent"
:status="item.blocked > 0 ? 'exception' : item.passPercent === 100 ? 'success' : undefined"
/>
<div class="handoff-category-meta">
<span>阻断 {{ item.blocked }}</span>
<span>待处理 {{ item.pending }}</span>
<span>不适用 {{ item.skipped }}</span>
</div>
</div>
</section>
<section v-if="blockedItems.length" class="handoff-blockers">
<header>
<div>
@@ -275,6 +292,24 @@ const blockedCount = computed(() => checklist.filter((item) => draft[item.id].st
const pendingCount = computed(() => checklist.filter((item) => draft[item.id].status === 'PENDING').length);
const blockedItems = computed(() => checklist.filter((item) => draft[item.id].status === 'BLOCKED'));
const checklistIds = new Set(checklist.map((item) => item.id));
const categoryProgress = computed(() => categoryOptions
.filter((item): item is HandoffItem['category'] => item !== '全部')
.map((item) => {
const items = checklist.filter((check) => check.category === item);
const passed = items.filter((check) => draft[check.id].status === 'PASS').length;
const blocked = items.filter((check) => draft[check.id].status === 'BLOCKED').length;
const pending = items.filter((check) => draft[check.id].status === 'PENDING').length;
const skipped = items.filter((check) => draft[check.id].status === 'SKIP').length;
return {
category: item,
total: items.length,
passed,
blocked,
pending,
skipped,
passPercent: items.length ? Math.round((passed / items.length) * 100) : 0
};
}));
function createInitialDraft() {
const saved = readSavedDraft();