From 9359f11cd0fa54dc86c3dcb92cb92e266a08208c Mon Sep 17 00:00:00 2001 From: kx_guo Date: Fri, 18 Sep 2026 17:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A3=8E=E9=99=A9=E9=A1=B9?= =?UTF-8?q?=E6=92=A4=E5=9B=9E=E6=93=8D=E4=BD=9C=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=98=9F=E5=88=97=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/riskItems.ts | 4 ++ src/pages/ReviewPage.vue | 137 ++++++++++++++++++++++++++++++------- src/stores/review.store.ts | 17 +++++ 3 files changed, 134 insertions(+), 24 deletions(-) diff --git a/src/api/riskItems.ts b/src/api/riskItems.ts index 22b68b6..288bb51 100644 --- a/src/api/riskItems.ts +++ b/src/api/riskItems.ts @@ -28,6 +28,10 @@ export function updateRiskItem(itemId: number, payload: RiskItemUpdate) { return http.patch>(`/v1/risk-items/${itemId}`, payload); } +export function withdrawRiskItem(itemId: number) { + return http.post>(`/v1/risk-items/${itemId}/withdraw`); +} + export function reviewRiskItem(itemId: number, payload: ReviewAction) { return http.post>( `/v1/risk-items/${itemId}/review`, diff --git a/src/pages/ReviewPage.vue b/src/pages/ReviewPage.vue index 6c932ce..a323e0b 100644 --- a/src/pages/ReviewPage.vue +++ b/src/pages/ReviewPage.vue @@ -15,6 +15,7 @@ import { RefreshCw, Save, SlidersHorizontal, + Undo2, Upload, Users, X, @@ -40,6 +41,7 @@ const statusFilter = ref("待审核"); const expandedId = ref(null); const editingId = ref(null); const reviewingId = ref(null); +const withdrawingId = ref(null); const ocrOpen = ref(false); const attachmentError = ref(""); const modelConfig = ref(null); @@ -245,6 +247,20 @@ async function review(item: RiskItem, action: "通过" | "驳回") { reviewingId.value = null; } } +async function withdraw(item: RiskItem) { + if (withdrawingId.value !== null) return; + if (!window.confirm("确认撤回该风险项吗?撤回后将不再显示在审核队列中。")) + return; + withdrawingId.value = item.id; + try { + await store.withdraw(item.id); + if (expandedId.value === item.id) expandedId.value = null; + } catch { + // The exact API error is shown above the queue. + } finally { + withdrawingId.value = null; + } +} function formatDate(value: string | null) { if (!value) return "未记录时间"; return new Intl.DateTimeFormat("zh-CN", { @@ -374,22 +390,37 @@ onMounted(() => { class="review-item" :class="{ expanded: expandedId === item.id }" > - + + { :class="item.status === '待审核' ? 'is-pending' : 'is-pre'" >{{ item.status }} - + > + +