feat(M08-B): 补联调批量标记

This commit is contained in:
Codex
2026-07-05 16:00:17 +08:00
parent 273e429d9e
commit 8e4264589d
7 changed files with 75 additions and 9 deletions
@@ -16,6 +16,36 @@
<el-option label="阻断" value="BLOCKED" />
<el-option label="不适用" value="SKIP" />
</el-select>
<el-popover trigger="click" width="360">
<template #reference>
<el-button :icon="ListChecks" :disabled="filteredChecklist.length === 0">
批量标记
</el-button>
</template>
<el-form class="handoff-bulk-form" label-position="top">
<el-alert
:title="`将更新当前筛选出的 ${filteredChecklist.length} 个检查项`"
type="info"
show-icon
:closable="false"
/>
<el-form-item label="状态">
<el-select v-model="bulkForm.status">
<el-option label="待处理" value="PENDING" />
<el-option label="通过" value="PASS" />
<el-option label="阻断" value="BLOCKED" />
<el-option label="不适用" value="SKIP" />
</el-select>
</el-form-item>
<el-form-item label="负责人">
<el-input v-model="bulkForm.owner" placeholder="留空则不覆盖" />
</el-form-item>
<el-form-item label="结果记录">
<el-input v-model="bulkForm.note" placeholder="留空则不覆盖" />
</el-form-item>
<el-button type="primary" :icon="Check" @click="applyBulkMark">应用到当前筛选</el-button>
</el-form>
</el-popover>
<el-button :icon="Download" @click="exportChecklist">导出</el-button>
<el-button :icon="RotateCcw" @click="resetDraft">重置</el-button>
</div>
@@ -81,7 +111,7 @@
<script setup lang="ts">
import { computed, reactive, ref } from 'vue';
import { Download, RotateCcw } from '@lucide/vue';
import { Check, Download, ListChecks, RotateCcw } from '@lucide/vue';
type FieldStatus = 'PENDING' | 'PASS' | 'BLOCKED' | 'SKIP';
@@ -102,6 +132,11 @@ interface HandoffDraft {
const storageKey = 'qipai.cleaning.field-handoff';
const category = ref<'全部' | HandoffItem['category']>('全部');
const statusFilter = ref<'ALL' | FieldStatus>('ALL');
const bulkForm = reactive<{ status: FieldStatus; owner: string; note: string }>({
status: 'PASS',
owner: '',
note: ''
});
const checklist: HandoffItem[] = [
{
id: 'merchant-credential',
@@ -199,6 +234,15 @@ function resetDraft() {
persistDraft();
}
function applyBulkMark() {
for (const item of filteredChecklist.value) {
draft[item.id].status = bulkForm.status;
if (bulkForm.owner.trim()) draft[item.id].owner = bulkForm.owner.trim();
if (bulkForm.note.trim()) draft[item.id].note = bulkForm.note.trim();
}
persistDraft();
}
function exportChecklist() {
downloadCsv(`cleaning-field-handoff-${Date.now()}.csv`, [
['ID', '类别', '检查项', '期望', '状态', '负责人', '结果记录', '证据'],