feat(M08-B): 补联调检查项搜索
This commit is contained in:
@@ -31,6 +31,13 @@
|
||||
:value="owner"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="keywordFilter"
|
||||
class="handoff-search"
|
||||
clearable
|
||||
:prefix-icon="Search"
|
||||
:placeholder="'\u641c\u7d22\u68c0\u67e5\u9879/\u8d1f\u8d23\u4eba/\u8bc1\u636e'"
|
||||
/>
|
||||
<el-popover trigger="click" width="360">
|
||||
<template #reference>
|
||||
<el-button :icon="ListChecks" :disabled="filteredChecklist.length === 0">
|
||||
@@ -347,7 +354,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import { Check, Copy, Download, FileDown, FileUp, ListChecks, RotateCcw } from '@lucide/vue';
|
||||
import { Check, Copy, Download, FileDown, FileUp, ListChecks, RotateCcw, Search } from '@lucide/vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
type FieldStatus = 'PENDING' | 'PASS' | 'BLOCKED' | 'SKIP';
|
||||
@@ -384,6 +391,7 @@ const sessionStorageKey = 'qipai.cleaning.field-handoff.session';
|
||||
const category = ref<'全部' | HandoffItem['category']>('全部');
|
||||
const statusFilter = ref<'ALL' | FieldStatus>('ALL');
|
||||
const ownerFilter = ref('ALL');
|
||||
const keywordFilter = ref('');
|
||||
const snapshotInput = ref<HTMLInputElement | null>(null);
|
||||
const bulkForm = reactive<{ status: FieldStatus; owner: string; deadline: string; note: string }>({
|
||||
status: 'PASS',
|
||||
@@ -460,8 +468,26 @@ const filteredChecklist = computed(() => checklist.filter((item) => {
|
||||
const ownerMatched = ownerFilter.value === 'ALL'
|
||||
|| (ownerFilter.value === '__UNASSIGNED__' && !owner)
|
||||
|| owner === ownerFilter.value;
|
||||
return categoryMatched && statusMatched && ownerMatched;
|
||||
return categoryMatched && statusMatched && ownerMatched && matchesKeyword(item);
|
||||
}));
|
||||
function matchesKeyword(item: HandoffItem) {
|
||||
const keyword = keywordFilter.value.trim().toLowerCase();
|
||||
if (!keyword) return true;
|
||||
const itemDraft = draft[item.id];
|
||||
return [
|
||||
item.id,
|
||||
item.category,
|
||||
item.title,
|
||||
item.expected,
|
||||
item.evidence,
|
||||
itemDraft.status,
|
||||
itemDraft.owner,
|
||||
itemDraft.deadline,
|
||||
itemDraft.note,
|
||||
itemDraft.evidenceRef
|
||||
].some((value) => String(value).toLowerCase().includes(keyword));
|
||||
}
|
||||
|
||||
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')));
|
||||
|
||||
@@ -726,6 +726,10 @@ textarea {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.handoff-search {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.handoff-bulk-form {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
@@ -965,6 +969,10 @@ textarea {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.handoff-search {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.preflight-meta {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user