feat(M08-B): 补联调负责人筛选
This commit is contained in:
@@ -20,6 +20,16 @@
|
||||
<el-option label="阻断" value="BLOCKED" />
|
||||
<el-option label="不适用" value="SKIP" />
|
||||
</el-select>
|
||||
<el-select v-model="ownerFilter" class="handoff-owner-select" placeholder="负责人">
|
||||
<el-option label="全部负责人" value="ALL" />
|
||||
<el-option label="未分派" value="__UNASSIGNED__" />
|
||||
<el-option
|
||||
v-for="owner in ownerOptions"
|
||||
:key="owner"
|
||||
:label="owner"
|
||||
:value="owner"
|
||||
/>
|
||||
</el-select>
|
||||
<el-popover trigger="click" width="360">
|
||||
<template #reference>
|
||||
<el-button :icon="ListChecks" :disabled="filteredChecklist.length === 0">
|
||||
@@ -295,6 +305,7 @@ const storageKey = 'qipai.cleaning.field-handoff';
|
||||
const sessionStorageKey = 'qipai.cleaning.field-handoff.session';
|
||||
const category = ref<'全部' | HandoffItem['category']>('全部');
|
||||
const statusFilter = ref<'ALL' | FieldStatus>('ALL');
|
||||
const ownerFilter = ref('ALL');
|
||||
const snapshotInput = ref<HTMLInputElement | null>(null);
|
||||
const bulkForm = reactive<{ status: FieldStatus; owner: string; note: string }>({
|
||||
status: 'PASS',
|
||||
@@ -366,8 +377,15 @@ const sessionMeta = reactive<SessionMeta>(readSessionMeta());
|
||||
const filteredChecklist = computed(() => checklist.filter((item) => {
|
||||
const categoryMatched = category.value === '全部' || item.category === category.value;
|
||||
const statusMatched = statusFilter.value === 'ALL' || draft[item.id].status === statusFilter.value;
|
||||
return categoryMatched && statusMatched;
|
||||
const owner = draft[item.id].owner.trim();
|
||||
const ownerMatched = ownerFilter.value === 'ALL'
|
||||
|| (ownerFilter.value === '__UNASSIGNED__' && !owner)
|
||||
|| owner === ownerFilter.value;
|
||||
return categoryMatched && statusMatched && ownerMatched;
|
||||
}));
|
||||
const ownerOptions = computed(() => Array.from(new Set(checklist
|
||||
.map((item) => draft[item.id].owner.trim())
|
||||
.filter(Boolean))).sort((a, b) => a.localeCompare(b, 'zh-Hans-CN')));
|
||||
const passedCount = computed(() => checklist.filter((item) => draft[item.id].status === 'PASS').length);
|
||||
const blockedCount = computed(() => checklist.filter((item) => draft[item.id].status === 'BLOCKED').length);
|
||||
const pendingCount = computed(() => checklist.filter((item) => draft[item.id].status === 'PENDING').length);
|
||||
@@ -479,6 +497,7 @@ function resetDraft() {
|
||||
for (const item of checklist) {
|
||||
draft[item.id] = normalizeDraft();
|
||||
}
|
||||
ownerFilter.value = 'ALL';
|
||||
touchSessionMeta();
|
||||
persistDraft();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user