feat(M08-B): 补联调分类进度
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -539,6 +539,36 @@ textarea {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.handoff-category-progress {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.handoff-category-row {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
padding: 12px;
|
||||
border: 1px solid #e1e8f0;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.handoff-category-title,
|
||||
.handoff-category-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.handoff-category-title span,
|
||||
.handoff-category-meta {
|
||||
color: #60708a;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.handoff-status-select {
|
||||
width: 130px;
|
||||
}
|
||||
@@ -725,6 +755,7 @@ textarea {
|
||||
.photo-grid,
|
||||
.trend-row,
|
||||
.handoff-session .el-form,
|
||||
.handoff-category-progress,
|
||||
.stats-filter,
|
||||
.stats-grid {
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
Reference in New Issue
Block a user