fix(ui): 读标、查标走查修复;查标结果页按原型补齐
走查(注册 → 读标 → 查标 → 导出报告)发现的问题: - 下拉:原生 select 换成 SelectBox(Reka UI,规范 §7.21):右侧 chevron 有边距、 sm 高 32 和搜索框一致、浮层和触发框同宽、选中项加粗带 ✓;响应方式栏的签名不再被挤成竖排 - 读标:「依据 · 第 N 页」改成行内出处链接;证明材料标签不再被挤压 - 概览:关键日期同一种、同一时刻只列一次 - 报告页:「还有 N 项致命」读项目实时值(检查的 counts 是快照) - 读标抽取:★ 只表示「重要」的文件,清单项也挂到 ★ 规则上(「已识别 N 条」) - 检查范围文案和后端覆盖范围一致;报告出处不重复写文件名(模板 2026.11-v3) - 带加载态的按钮图标和文字间距;单选、半选、禁用复选框样式 查标结果页按原型 results.html 补齐: - 本次处理的问题留在原位(署名行可撤销),修了处理后仍显示处理按钮的问题 - 键盘 J / K / O / 1 / 2 / 3 / X / U / Esc;「提示」批量确认无误;「判断有误?」反馈 - 覆盖范围默认收起成一行;顶部加导出报告入口和致命提示;已处理计数 - 检查进度卡和解析进度卡同一种样式 - 项目头「就绪 / 未就绪」,致命数挂在查标标签上 - 上传投标文件页:已有分册时新增表单收起到「添加分册」 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,11 +11,12 @@
|
||||
* TODO(第 6 步):键盘操作、批量处理「提示」、判断有误反馈、导出报告。
|
||||
*/
|
||||
import { unwrap } from "@bid-doctor/api-client";
|
||||
import { ChevronDown, ChevronRight, X } from "@lucide/vue";
|
||||
import { ChevronDown, ChevronRight, Download, X } from "@lucide/vue";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { computed, ref } from "vue";
|
||||
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
||||
import { RouterLink } from "vue-router";
|
||||
import CitationBlock from "@/components/CitationBlock.vue";
|
||||
import ConfirmDialog from "@/components/ConfirmDialog.vue";
|
||||
import PdfViewer, { type ViewerTarget } from "@/components/PdfViewer.vue";
|
||||
import ProjectHead from "@/components/ProjectHead.vue";
|
||||
import { api, errorTitle, isApiError } from "@/lib/api";
|
||||
@@ -68,8 +69,12 @@ const hidden = computed(() => {
|
||||
});
|
||||
const group = (f: Finding) => [f, ...all.value.filter((x) => (f.duplicate_ids ?? []).includes(x.id))];
|
||||
const live = computed(() => all.value.filter((f) => f.presence !== "resolved" && !hidden.value.has(f.id)));
|
||||
const todo = computed(() => live.value.filter((f) => f.status === "pending" && (!sev.value || f.severity === sev.value)));
|
||||
const handled = computed(() => live.value.filter((f) => f.status !== "pending" && (!sev.value || f.severity === sev.value)));
|
||||
/** 这次打开页面后处理的问题留在原位(署名行),J / K 能回到它按 U 撤销;之前处理的折叠在「已处理」(规范 §8.2) */
|
||||
const session = ref(new Set<string>());
|
||||
const inSev = (f: Finding) => !sev.value || f.severity === sev.value;
|
||||
const todo = computed(() => live.value.filter((f) => (f.status === "pending" || session.value.has(f.id)) && inSev(f)));
|
||||
const handled = computed(() => live.value.filter((f) => f.status !== "pending" && !session.value.has(f.id) && inSev(f)));
|
||||
const doneCount = computed(() => live.value.filter((f) => f.status !== "pending").length);
|
||||
const resolved = computed(() => all.value.filter((f) => f.presence === "resolved"));
|
||||
const count = (s: Sev) => live.value.filter((f) => f.status === "pending" && (!s || f.severity === s)).length;
|
||||
const showHandled = ref(false);
|
||||
@@ -105,8 +110,10 @@ async function resolve(f: Finding, status: "confirmed_ok" | "modified" | "ignore
|
||||
);
|
||||
}
|
||||
noteFor.value = null;
|
||||
remember(group(f));
|
||||
toast(`已标记为「${FINDING_ACTION[status]}」`, { undo: () => void reopen(f) });
|
||||
refresh();
|
||||
next(f);
|
||||
} catch (e) {
|
||||
if (isApiError(e, "note_required")) noteErr.value = "请填写说明";
|
||||
else toast(errorTitle(e), { ok: false });
|
||||
@@ -115,11 +122,53 @@ async function resolve(f: Finding, status: "confirmed_ok" | "modified" | "ignore
|
||||
}
|
||||
}
|
||||
|
||||
function remember(fs: Finding[]) {
|
||||
session.value = new Set([...session.value, ...fs.map((x) => x.id)]);
|
||||
for (const x of fs) picked.value.delete(x.id);
|
||||
}
|
||||
|
||||
/* ---------- 批量处理:只开放给「提示」(FR-M3-07) ---------- */
|
||||
const picked = ref(new Set<string>());
|
||||
const pickable = (f: Finding) => !readOnly.value && f.severity === "hint" && f.status === "pending";
|
||||
const hints = computed(() => todo.value.filter(pickable));
|
||||
const pickedList = computed(() => live.value.filter((f) => picked.value.has(f.id) && pickable(f)));
|
||||
const allPicked = computed(() => hints.value.length > 0 && hints.value.every((f) => picked.value.has(f.id)));
|
||||
function pick(f: Finding, on: boolean) {
|
||||
const n = new Set(picked.value);
|
||||
if (on) n.add(f.id);
|
||||
else n.delete(f.id);
|
||||
picked.value = n;
|
||||
}
|
||||
function pickAll(on: boolean) {
|
||||
picked.value = on ? new Set(hints.value.map((f) => f.id)) : new Set();
|
||||
}
|
||||
const bulkBusy = ref(false);
|
||||
async function bulkOk() {
|
||||
const fs = pickedList.value.flatMap(group).filter((x) => x.status === "pending");
|
||||
if (!fs.length) return;
|
||||
bulkBusy.value = true;
|
||||
try {
|
||||
await unwrap(
|
||||
api.POST("/check-runs/{run_id}/findings/bulk-resolve", {
|
||||
params: { path: { run_id: props.runId } },
|
||||
body: { finding_ids: fs.map((x) => x.id), status: "confirmed_ok" },
|
||||
}),
|
||||
);
|
||||
remember(fs);
|
||||
const n = pickedList.value.length || fs.length;
|
||||
toast(`已将 ${n} 项「提示」标记为确认无误,逐条记了处理人和时间`, { undo: () => void Promise.all(fs.map((x) => reopenOne(x.id))).then(refresh) });
|
||||
refresh();
|
||||
} catch (e) {
|
||||
toast(errorTitle(e), { ok: false });
|
||||
} finally {
|
||||
bulkBusy.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
const reopenOne = (id: string) => unwrap(api.POST("/findings/{finding_id}/reopen", { params: { path: { finding_id: id } } }));
|
||||
async function reopen(f: Finding) {
|
||||
try {
|
||||
for (const x of group(f)) {
|
||||
await unwrap(api.POST("/findings/{finding_id}/reopen", { params: { path: { finding_id: x.id } } }));
|
||||
}
|
||||
for (const x of group(f)) await reopenOne(x.id);
|
||||
refresh();
|
||||
} catch (e) {
|
||||
toast(errorTitle(e), { ok: false });
|
||||
@@ -176,6 +225,103 @@ function openCitation(c: Citation) {
|
||||
target: { id: c.id, page: c.page_no, quads: c.quads, sha: c.normalized_sha256 },
|
||||
};
|
||||
}
|
||||
const firstCite = (f: Finding) => f.tender_citations[0] ?? f.bid_citations[0];
|
||||
|
||||
/* ---------- 当前条与键盘(规范 §8.2):J / K 移动,O / Enter 看原文,1 / 2 / 3 处理,X 勾选「提示」,U 撤销,Esc 关原文 ---------- */
|
||||
const curId = ref<string | null>(null);
|
||||
const cur = computed(() => todo.value.find((f) => f.id === curId.value) ?? todo.value[0]);
|
||||
const kbOn = ref(false);
|
||||
function setCur(f: Finding, scroll = false) {
|
||||
curId.value = f.id;
|
||||
if (scroll) requestAnimationFrame(() => document.querySelector(`[data-fid="${f.id}"]`)?.scrollIntoView({ block: "nearest" }));
|
||||
}
|
||||
/** 处理完跳到下一条待处理 */
|
||||
function next(f: Finding) {
|
||||
const list = todo.value;
|
||||
const i = list.findIndex((x) => x.id === f.id);
|
||||
const n = list.find((x, j) => j > i && x.status === "pending" && x.id !== f.id);
|
||||
if (n) setCur(n, true);
|
||||
}
|
||||
function onKey(e: KeyboardEvent) {
|
||||
if (e.ctrlKey || e.metaKey || e.altKey || document.querySelector(".scrim")) return;
|
||||
if ((e.target as HTMLElement | null)?.closest("input, textarea, select, [role=listbox], [contenteditable]")) return;
|
||||
if (e.key === "Escape") {
|
||||
viewer.value = null;
|
||||
return;
|
||||
}
|
||||
const f = cur.value;
|
||||
if (!f) return;
|
||||
const k = e.key.toLowerCase();
|
||||
if (k === "j" || k === "k") {
|
||||
e.preventDefault();
|
||||
const list = todo.value;
|
||||
const i = Math.max(0, list.indexOf(f));
|
||||
const n = list[Math.max(0, Math.min(list.length - 1, i + (k === "j" ? 1 : -1)))];
|
||||
if (!n) return;
|
||||
kbOn.value = true;
|
||||
setCur(n, true);
|
||||
const c = firstCite(n);
|
||||
if (viewer.value && c) openCitation(c); // 原文开着时跟着翻到当前条的出处
|
||||
} else if (k === "o" || (e.key === "Enter" && !(e.target as HTMLElement).closest("button, a, label"))) {
|
||||
const c = firstCite(f);
|
||||
if (c) {
|
||||
e.preventDefault();
|
||||
openCitation(c);
|
||||
}
|
||||
} else if (readOnly.value) {
|
||||
return;
|
||||
} else if (k === "u") {
|
||||
if (f.status !== "pending") void reopen(f);
|
||||
else toast("当前这一条还没有处理", { ok: false });
|
||||
} else if (k === "x" && pickable(f)) {
|
||||
pick(f, !picked.value.has(f.id));
|
||||
} else if (["1", "2", "3"].includes(e.key) && f.status === "pending" && noteFor.value?.id !== f.id) {
|
||||
e.preventDefault();
|
||||
act(f, (["confirmed_ok", "modified", "ignored"] as const)[Number(e.key) - 1]!);
|
||||
}
|
||||
}
|
||||
onMounted(() => window.addEventListener("keydown", onKey));
|
||||
onBeforeUnmount(() => window.removeEventListener("keydown", onKey));
|
||||
|
||||
/* ---------- 判断有误?(J5):反馈只用于改进检查规则,不改变处理状态 ---------- */
|
||||
const FEEDBACK_REASONS = ["这不是问题(误报)", "级别不对", "出处定位错了", "其他"];
|
||||
const fbFor = ref<Finding | null>(null);
|
||||
const fbReason = ref(FEEDBACK_REASONS[0]!);
|
||||
const fbNote = ref("");
|
||||
const fbBusy = ref(false);
|
||||
const fbOpen = computed({ get: () => !!fbFor.value, set: (v) => { if (!v) fbFor.value = null; } });
|
||||
function askFeedback(f: Finding) {
|
||||
fbFor.value = f;
|
||||
fbReason.value = FEEDBACK_REASONS[0]!;
|
||||
fbNote.value = "";
|
||||
}
|
||||
async function sendFeedback() {
|
||||
const f = fbFor.value;
|
||||
if (!f) return;
|
||||
fbBusy.value = true;
|
||||
try {
|
||||
await unwrap(
|
||||
api.POST("/feedback", {
|
||||
body: {
|
||||
project_id: props.projectId,
|
||||
object_type: "finding",
|
||||
object_id: f.id,
|
||||
kind: "false_positive",
|
||||
note: [fbReason.value, fbNote.value.trim()].filter(Boolean).join(":").slice(0, 1000),
|
||||
},
|
||||
}),
|
||||
);
|
||||
fbFor.value = null;
|
||||
toast("已收到反馈");
|
||||
} catch (e) {
|
||||
toast(errorTitle(e), { ok: false });
|
||||
} finally {
|
||||
fbBusy.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------- 检查覆盖范围:默认收起成一行,展开看全部(报告首页照样全文列出) ---------- */
|
||||
const showCoverage = ref(false);
|
||||
|
||||
const metaLine = computed(() => {
|
||||
const r = run.value;
|
||||
@@ -196,15 +342,23 @@ const errorText = computed(() => {
|
||||
<ProjectHead :project="p" tab="check" />
|
||||
<div class="content">
|
||||
<!-- 进行中 -->
|
||||
<section v-if="run && !TERMINAL_JOB.has(run.status)" class="card running" aria-live="polite">
|
||||
<h2>正在检查<span class="fig">{{ run.progress }}</span>%</h2>
|
||||
<div class="bar" role="progressbar" :aria-valuenow="run.progress" aria-valuemin="0" aria-valuemax="100" aria-label="检查进度"><i :style="{ width: `${run.progress}%` }"></i></div>
|
||||
<ol class="steps">
|
||||
<li v-for="(s, i) in CHECK_STEPS" :key="s.label" :class="{ done: i < step, cur: i === step }">{{ s.label }}</li>
|
||||
</ol>
|
||||
<div class="acts">
|
||||
<span class="cap muted">可以离开这个页面,检查完成后会通知你。</span>
|
||||
<button type="button" class="btn sm text" :disabled="cancelling || run.cancel_requested" @click="cancel">{{ run.cancel_requested ? "正在取消…" : "取消检查" }}</button>
|
||||
<section v-if="run && !TERMINAL_JOB.has(run.status)" class="card flush running" aria-labelledby="h-run" aria-live="polite">
|
||||
<div class="card-h"><h2 id="h-run">正在检查</h2></div>
|
||||
<div class="card-b">
|
||||
<ol class="steps">
|
||||
<li v-for="(s, i) in CHECK_STEPS" :key="s.label" :class="{ done: i < step, now: i === step }">
|
||||
<span class="dot" aria-hidden="true">{{ i < step ? "✓" : "" }}</span>
|
||||
<span>{{ s.label }}<span v-if="i === step" class="vh">(进行中)</span></span>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="progress">
|
||||
<div class="bar" role="progressbar" :aria-valuenow="run.progress" aria-valuemin="0" aria-valuemax="100" aria-label="检查进度"><i :style="{ width: `${run.progress}%` }"></i></div>
|
||||
<span class="fig">{{ run.progress }}%</span>
|
||||
</div>
|
||||
<p class="note">可以离开这个页面,检查完成后会通知你。</p>
|
||||
</div>
|
||||
<div class="card-f">
|
||||
<button type="button" class="btn sm" :disabled="cancelling || run.cancel_requested" @click="cancel">{{ run.cancel_requested ? "正在取消…" : "取消检查" }}</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -222,7 +376,11 @@ const errorText = computed(() => {
|
||||
<p class="meta" :title="metaLine">{{ metaLine }}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<RouterLink class="btn" :to="{ name: 'bid-check', params: { projectId } }">重新检查</RouterLink>
|
||||
<div class="row">
|
||||
<RouterLink class="btn" :to="{ name: 'bid-check', params: { projectId } }">重新检查</RouterLink>
|
||||
<RouterLink class="btn primary" :to="{ name: 'report', params: { projectId } }"><Download class="ic" :stroke-width="1.5" />导出报告</RouterLink>
|
||||
</div>
|
||||
<span v-if="p?.readiness.open_fatal_count" class="export-note">还有 <span class="fig">{{ p.readiness.open_fatal_count }}</span> 项致命问题待处理,报告会如实列出</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!run.is_latest" class="alert warn" role="note"><span class="ico w" aria-hidden="true">!</span><p>这是历史检查,只能查看。</p></div>
|
||||
@@ -233,18 +391,32 @@ const errorText = computed(() => {
|
||||
<RouterLink class="btn sm" :to="{ name: 'bid-check', params: { projectId } }">重新检查</RouterLink>
|
||||
</div>
|
||||
|
||||
<section v-if="run.coverage" class="card coverage" aria-labelledby="h-cov">
|
||||
<h2 id="h-cov" class="vh">检查覆盖范围</h2>
|
||||
<div>
|
||||
<h3>查了</h3>
|
||||
<ul><li v-for="t in run.coverage.checked ?? []" :key="t">{{ t }}</li></ul>
|
||||
</div>
|
||||
<div class="no">
|
||||
<h3>没查</h3>
|
||||
<ul><li v-for="t in run.coverage.not_checked ?? []" :key="t">{{ t }}</li></ul>
|
||||
<section v-if="run.coverage" class="card flush coverage" aria-labelledby="h-cov">
|
||||
<button type="button" class="cov-h" :aria-expanded="showCoverage" aria-controls="cov-body" @click="showCoverage = !showCoverage">
|
||||
<component :is="showCoverage ? ChevronDown : ChevronRight" class="ic" :stroke-width="1.5" />
|
||||
<h2 id="h-cov">检查覆盖范围</h2>
|
||||
<span class="cap muted">查了 <span class="fig">{{ run.coverage.checked?.length ?? 0 }}</span> 项 · 没查 <span class="fig">{{ run.coverage.not_checked?.length ?? 0 }}</span> 项,报告首页会全部写明</span>
|
||||
</button>
|
||||
<div v-show="showCoverage" id="cov-body" class="cov-body">
|
||||
<div>
|
||||
<h3>查了</h3>
|
||||
<ul><li v-for="t in run.coverage.checked ?? []" :key="t">{{ t }}</li></ul>
|
||||
</div>
|
||||
<div class="no">
|
||||
<h3>没查</h3>
|
||||
<ul><li v-for="t in run.coverage.not_checked ?? []" :key="t">{{ t }}</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div v-if="pickedList.length" class="batchbar" role="region" aria-label="批量处理">
|
||||
<b>已选 <span class="fig">{{ pickedList.length }}</span> 项「提示」</b>
|
||||
<span class="r">
|
||||
<button type="button" class="btn sm" :disabled="bulkBusy" @click="bulkOk">批量确认无误</button>
|
||||
<button type="button" class="btn sm text" @click="pickAll(false)">取消选择</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<section class="card flush results" aria-label="检查结果">
|
||||
<div class="card-h">
|
||||
<div class="seg" role="group" aria-label="按级别筛选">
|
||||
@@ -253,11 +425,31 @@ const errorText = computed(() => {
|
||||
<span class="sev" :class="SEVERITY_CLASS[s]">{{ SEVERITY[s] }}<span class="fig">{{ count(s) }}</span></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="r">
|
||||
<label v-if="!readOnly" class="choice cap" :class="{ dis: !hints.length }">
|
||||
<input type="checkbox" class="ck" :checked="allPicked" :indeterminate="!allPicked && pickedList.length > 0" :disabled="!hints.length" @change="pickAll(($event.target as HTMLInputElement).checked)" />全选「提示」
|
||||
</label>
|
||||
<span class="cap muted">已处理 <span class="fig">{{ doneCount }}</span> / <span class="fig">{{ live.length }}</span></span>
|
||||
<span class="cap muted keys" title="J / K 上下条 · O 看原文 · 1 确认无误 · 2 已修改 · 3 忽略 · X 勾选「提示」 · U 撤销"><span class="kbd">J</span><span class="kbd">K</span> 上下条 <span class="kbd">1</span><span class="kbd">2</span><span class="kbd">3</span> 处理 <span class="kbd">U</span> 撤销</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="findingsQ.isPending.value" class="lst-pad"><span class="skel t"></span><span class="skel"></span></div>
|
||||
<template v-else>
|
||||
<article v-for="f in [...todo, ...(showHandled ? handled : [])]" :key="f.id" class="finding">
|
||||
<div class="flist" :class="{ 'kb-on': kbOn }" @pointerdown="kbOn = false">
|
||||
<article
|
||||
v-for="f in [...todo, ...(showHandled ? handled : [])]"
|
||||
:key="f.id"
|
||||
class="finding"
|
||||
:class="{ sel: cur?.id === f.id, 'has-ck': !readOnly }"
|
||||
:data-fid="f.id"
|
||||
:aria-current="cur?.id === f.id ? 'true' : undefined"
|
||||
@click="todo.includes(f) && setCur(f)"
|
||||
>
|
||||
<label v-if="f.status === 'pending' && !readOnly && pickable(f)" class="ckw" data-tip="批量处理" @click.stop>
|
||||
<input type="checkbox" class="ck" :checked="picked.has(f.id)" :aria-label="`勾选:${f.title}`" @change="pick(f, ($event.target as HTMLInputElement).checked)" />
|
||||
</label>
|
||||
<span v-else-if="f.status === 'pending' && !readOnly" class="ckw" data-tip="只有「提示」可以批量处理"><input type="checkbox" class="ck" disabled aria-label="不可批量" /></span>
|
||||
<div>
|
||||
<div class="f-head">
|
||||
<span class="sev" :class="SEVERITY_CLASS[f.severity]">{{ SEVERITY[f.severity] }}</span>
|
||||
@@ -267,12 +459,14 @@ const errorText = computed(() => {
|
||||
</div>
|
||||
<p class="f-text">{{ f.explanation }}</p>
|
||||
|
||||
<div v-if="f.status !== 'pending'" class="sign" :class="{ ign: f.status === 'ignored' }">
|
||||
<span aria-hidden="true">{{ f.status === "ignored" ? "–" : "✓" }}</span><b>{{ f.resolved_by?.name }}</b>
|
||||
<span v-if="f.resolved_at" class="fig">{{ fmtDateTime(f.resolved_at) }}</span><span>{{ FINDING_ACTION[f.status] }}</span>
|
||||
<button v-if="!readOnly" type="button" class="undo" @click="reopen(f)">撤销</button>
|
||||
</div>
|
||||
<p v-if="f.status !== 'pending' && f.resolution_note" class="sign-note">{{ f.status === "ignored" ? "原因" : "说明" }}:{{ f.resolution_note }}</p>
|
||||
<template v-if="f.status !== 'pending'">
|
||||
<div class="sign" :class="{ ign: f.status === 'ignored' }">
|
||||
<span aria-hidden="true">{{ f.status === "ignored" ? "–" : "✓" }}</span><b>{{ f.resolved_by?.name }}</b>
|
||||
<span v-if="f.resolved_at" class="fig">{{ fmtDateTime(f.resolved_at) }}</span><span>{{ FINDING_ACTION[f.status] }}</span>
|
||||
<button v-if="!readOnly" type="button" class="undo" @click="reopen(f)">撤销</button>
|
||||
</div>
|
||||
<p v-if="f.resolution_note" class="sign-note">{{ f.status === "ignored" ? "原因" : "说明" }}:{{ f.resolution_note }}</p>
|
||||
</template>
|
||||
|
||||
<div v-else-if="noteFor?.id === f.id" class="u4">
|
||||
<div class="field" :class="{ err: noteErr }">
|
||||
@@ -290,6 +484,7 @@ const errorText = computed(() => {
|
||||
<button type="button" class="btn sm" :disabled="busyId === f.id" @click="act(f, 'confirmed_ok')">确认无误</button>
|
||||
<button type="button" class="btn sm" :disabled="busyId === f.id" @click="act(f, 'modified')">已修改</button>
|
||||
<button type="button" class="btn sm" :disabled="busyId === f.id" @click="act(f, 'ignored')">忽略并注明原因</button>
|
||||
<button type="button" class="lnk cap feedback" @click="askFeedback(f)">判断有误?</button>
|
||||
</div>
|
||||
</div>
|
||||
<aside>
|
||||
@@ -305,6 +500,7 @@ const errorText = computed(() => {
|
||||
</div>
|
||||
</aside>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div v-if="!todo.length" class="empty sm">
|
||||
<b>{{ live.length ? (sev ? "这个级别的问题都已处理" : "全部问题都已处理") : "没有发现问题" }}</b>
|
||||
@@ -353,6 +549,18 @@ const errorText = computed(() => {
|
||||
<div v-else-if="runQ.error.value" class="alert warn" role="alert"><span class="ico w" aria-hidden="true">!</span><p>{{ errorTitle(runQ.error.value) }}</p></div>
|
||||
</div>
|
||||
|
||||
<ConfirmDialog v-model:open="fbOpen" title="反馈:判断有误" ok-text="提交反馈" busy-text="正在提交…" :busy="fbBusy" @ok="sendFeedback">
|
||||
<p class="muted fb-title">「{{ fbFor?.title }}」</p>
|
||||
<div class="fb-choices" role="radiogroup" aria-label="哪里不对">
|
||||
<label v-for="r in FEEDBACK_REASONS" :key="r" class="choice"><input v-model="fbReason" type="radio" class="ck" name="fb" :value="r" />{{ r }}</label>
|
||||
</div>
|
||||
<div class="field fill fb-note">
|
||||
<label for="fb-note">补充说明 <small>(选填)</small></label>
|
||||
<textarea id="fb-note" v-model="fbNote" class="input" maxlength="200"></textarea>
|
||||
<span class="msg">反馈只用于改进检查规则,不改变这条问题的处理状态。</span>
|
||||
</div>
|
||||
</ConfirmDialog>
|
||||
|
||||
<aside v-if="viewer" class="drawer" aria-label="原文">
|
||||
<button type="button" class="icon-btn sm close" aria-label="关闭原文" @click="viewer = null"><X class="ic" :stroke-width="1.5" /></button>
|
||||
<PdfViewer :document-id="viewer.doc.id" :document-label="viewer.doc.label" :target="viewer.target" />
|
||||
@@ -360,45 +568,14 @@ const errorText = computed(() => {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.running h2 {
|
||||
display: flex;
|
||||
gap: var(--sp-2);
|
||||
align-items: baseline;
|
||||
margin: 0 0 var(--sp-3);
|
||||
font: var(--fw-bold) var(--fs-title) / var(--lh-title) var(--font-sans);
|
||||
.running {
|
||||
max-width: 736px;
|
||||
}
|
||||
.running .bar {
|
||||
height: 6px;
|
||||
border-radius: 3px;
|
||||
background: var(--c-n100);
|
||||
overflow: hidden;
|
||||
.running .card-b {
|
||||
padding-top: var(--sp-2);
|
||||
}
|
||||
.running .bar i {
|
||||
display: block;
|
||||
height: 100%;
|
||||
background: var(--ai);
|
||||
transition: width var(--dur-base) var(--ease);
|
||||
}
|
||||
.steps {
|
||||
display: flex;
|
||||
gap: var(--sp-6);
|
||||
margin: var(--sp-4) 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.steps .done {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.steps .cur {
|
||||
color: var(--text-primary);
|
||||
font-weight: var(--fw-bold);
|
||||
}
|
||||
.running .acts {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: var(--sp-4);
|
||||
.running .progress {
|
||||
margin-top: var(--sp-3);
|
||||
}
|
||||
.rbar {
|
||||
display: flex;
|
||||
@@ -416,13 +593,50 @@ const errorText = computed(() => {
|
||||
font-size: var(--fs-caption);
|
||||
}
|
||||
.rbar .actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: var(--sp-1);
|
||||
margin-left: auto;
|
||||
}
|
||||
.rbar .actions .row {
|
||||
display: flex;
|
||||
gap: var(--sp-2);
|
||||
}
|
||||
.export-note {
|
||||
color: var(--text-secondary);
|
||||
font-size: var(--fs-caption);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.coverage {
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
.cov-h {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-2);
|
||||
width: 100%;
|
||||
padding: var(--sp-3) var(--card-x);
|
||||
border: 0;
|
||||
background: none;
|
||||
font: inherit;
|
||||
color: var(--text-primary);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cov-h h2 {
|
||||
margin: 0;
|
||||
font-size: var(--fs-body);
|
||||
font-weight: var(--fw-bold);
|
||||
}
|
||||
.cov-h .ic {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.cov-body {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--sp-6);
|
||||
margin-bottom: var(--sp-4);
|
||||
padding: 0 var(--card-x) var(--sp-4);
|
||||
}
|
||||
.coverage h3 {
|
||||
margin: 0 0 var(--sp-1);
|
||||
@@ -438,6 +652,36 @@ const errorText = computed(() => {
|
||||
.results .card-h {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-3);
|
||||
}
|
||||
.results .card-h .r {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-4);
|
||||
margin-left: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.keys .kbd {
|
||||
margin-right: 2px;
|
||||
}
|
||||
.flist:focus {
|
||||
outline: 0;
|
||||
}
|
||||
.f-actions .feedback {
|
||||
margin-left: auto;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.fb-title {
|
||||
margin: 0;
|
||||
}
|
||||
.fb-choices {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-2);
|
||||
margin-top: var(--sp-3);
|
||||
}
|
||||
.fb-note {
|
||||
margin-top: var(--sp-4);
|
||||
}
|
||||
.seg {
|
||||
display: flex;
|
||||
@@ -525,7 +769,11 @@ const errorText = computed(() => {
|
||||
gap: var(--sp-1);
|
||||
width: 100%;
|
||||
padding: var(--sp-3) var(--card-x);
|
||||
border: 0;
|
||||
border-top: var(--line) solid var(--border-subtle);
|
||||
background: none;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user