feat(frontend): add P2 quality gates
This commit is contained in:
@@ -76,7 +76,10 @@ onMounted(loadMessageDeliveries)
|
||||
|
||||
<template>
|
||||
<div class="deliveries-page list-page">
|
||||
<AdminPageHeader title="消息发送记录" description="查看领取链接消息是否真正发出、平台返回了什么、失败原因是什么。">
|
||||
<AdminPageHeader
|
||||
title="消息发送记录"
|
||||
description="查看领取链接消息是否真正发出、平台返回了什么、失败原因是什么。"
|
||||
>
|
||||
<template #extra>
|
||||
<span class="total-badge">共 {{ pagination.total }} 条记录</span>
|
||||
</template>
|
||||
@@ -91,16 +94,63 @@ onMounted(loadMessageDeliveries)
|
||||
</div>
|
||||
</template>
|
||||
<div class="filter-grid">
|
||||
<el-input v-model="provider" class="filter-control" placeholder="服务商,如 agiso" clearable @keyup.enter="loadMessageDeliveries(1)" />
|
||||
<el-input v-model="platform" class="filter-control" placeholder="业务平台,如 xianyu" clearable @keyup.enter="loadMessageDeliveries(1)" />
|
||||
<el-input
|
||||
v-model="provider"
|
||||
class="filter-control"
|
||||
placeholder="服务商,如 agiso"
|
||||
clearable
|
||||
@keyup.enter="loadMessageDeliveries(1)"
|
||||
/>
|
||||
<el-input
|
||||
v-model="platform"
|
||||
class="filter-control"
|
||||
placeholder="业务平台,如 xianyu"
|
||||
clearable
|
||||
@keyup.enter="loadMessageDeliveries(1)"
|
||||
/>
|
||||
<el-select v-model="status" class="filter-control" placeholder="发送状态" clearable>
|
||||
<el-option v-for="opt in adminMessageDeliveryStatusOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||
<el-option
|
||||
v-for="opt in adminMessageDeliveryStatusOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="shopId" class="filter-control" placeholder="店铺 ID(精确匹配)" clearable @keyup.enter="loadMessageDeliveries(1)" />
|
||||
<el-input v-model="platformOrderId" class="filter-control" placeholder="平台订单号" clearable @keyup.enter="loadMessageDeliveries(1)" />
|
||||
<el-input v-model="taskNo" class="filter-control" placeholder="任务编号" clearable @keyup.enter="loadMessageDeliveries(1)" />
|
||||
<el-date-picker v-model="dateFrom" class="filter-control" type="date" placeholder="开始日期" value-format="YYYY-MM-DD" />
|
||||
<el-date-picker v-model="dateTo" class="filter-control" type="date" placeholder="结束日期" value-format="YYYY-MM-DD" />
|
||||
<el-input
|
||||
v-model="shopId"
|
||||
class="filter-control"
|
||||
placeholder="店铺 ID(精确匹配)"
|
||||
clearable
|
||||
@keyup.enter="loadMessageDeliveries(1)"
|
||||
/>
|
||||
<el-input
|
||||
v-model="platformOrderId"
|
||||
class="filter-control"
|
||||
placeholder="平台订单号"
|
||||
clearable
|
||||
@keyup.enter="loadMessageDeliveries(1)"
|
||||
/>
|
||||
<el-input
|
||||
v-model="taskNo"
|
||||
class="filter-control"
|
||||
placeholder="任务编号"
|
||||
clearable
|
||||
@keyup.enter="loadMessageDeliveries(1)"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="dateFrom"
|
||||
class="filter-control"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="dateTo"
|
||||
class="filter-control"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<div class="filter-buttons">
|
||||
<el-button round @click="resetFilters">重置</el-button>
|
||||
<el-button round type="primary" @click="loadMessageDeliveries(1)">查询</el-button>
|
||||
@@ -111,15 +161,33 @@ onMounted(loadMessageDeliveries)
|
||||
<!-- 摘要 -->
|
||||
<div v-if="!loading && items.length > 0" class="summary-strip">
|
||||
<span class="summary-title">当前页</span>
|
||||
<span class="summary-metric" data-tone="success">发送成功 <strong>{{ summary.successCount }}</strong></span>
|
||||
<span class="summary-metric" data-tone="danger">发送失败 <strong>{{ summary.failedCount }}</strong></span>
|
||||
<span class="summary-metric" data-tone="warning">等待中 <strong>{{ summary.pendingCount }}</strong></span>
|
||||
<span class="summary-metric" data-tone="success"
|
||||
>发送成功 <strong>{{ summary.successCount }}</strong></span
|
||||
>
|
||||
<span class="summary-metric" data-tone="danger"
|
||||
>发送失败 <strong>{{ summary.failedCount }}</strong></span
|
||||
>
|
||||
<span class="summary-metric" data-tone="warning"
|
||||
>等待中 <strong>{{ summary.pendingCount }}</strong></span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-alert v-if="errorMessage" :title="errorMessage" type="error" show-icon :closable="false" style="margin-top: 16px" />
|
||||
<el-alert
|
||||
v-if="errorMessage"
|
||||
:title="errorMessage"
|
||||
type="error"
|
||||
show-icon
|
||||
:closable="false"
|
||||
style="margin-top: 16px"
|
||||
/>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-card shadow="never" class="section-card" v-loading="loading" element-loading-text="消息发送记录加载中">
|
||||
<el-card
|
||||
shadow="never"
|
||||
class="section-card"
|
||||
v-loading="loading"
|
||||
element-loading-text="消息发送记录加载中"
|
||||
>
|
||||
<template v-if="items.length === 0 && !loading">
|
||||
<el-empty description="当前筛选下还没有消息发送记录。" :image-size="60" />
|
||||
</template>
|
||||
@@ -139,7 +207,9 @@ onMounted(loadMessageDeliveries)
|
||||
<el-table-column label="接收者" min-width="160">
|
||||
<template #default="{ row }">
|
||||
<div class="cell-stack">
|
||||
<span class="cell-title">{{ row.recipientKey || row.shopName || row.shopId || '-' }}</span>
|
||||
<span class="cell-title">{{
|
||||
row.recipientKey || row.shopName || row.shopId || '-'
|
||||
}}</span>
|
||||
<span class="cell-subline">{{ row.shopName || row.shopId || '-' }}</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -164,17 +234,35 @@ onMounted(loadMessageDeliveries)
|
||||
<template #default="{ row }">
|
||||
<div class="cell-stack">
|
||||
<span class="cell-title">{{ formatAdminDateTime(row.createdAt) }}</span>
|
||||
<span v-if="row.sentAt" class="cell-subline">发送 {{ formatAdminDateTime(row.sentAt) }}</span>
|
||||
<span v-if="row.sentAt" class="cell-subline"
|
||||
>发送 {{ formatAdminDateTime(row.sentAt) }}</span
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<div class="action-stack">
|
||||
<a v-if="row.claimUrl" class="detail-link" :href="row.claimUrl" target="_blank" rel="noreferrer">Claim 链接</a>
|
||||
<RouterLink v-if="row.orderId" class="detail-link" :to="`/admin/orders/${row.orderId}`">订单 #{{ row.orderId }}</RouterLink>
|
||||
<RouterLink v-if="row.taskId" class="detail-link" :to="`/admin/tasks/${row.taskId}`">任务 {{ row.taskNo || row.taskId }}</RouterLink>
|
||||
<span v-if="!row.claimUrl && !row.orderId && !row.taskId" class="cell-subline">-</span>
|
||||
<a
|
||||
v-if="row.claimUrl"
|
||||
class="detail-link"
|
||||
:href="row.claimUrl"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>Claim 链接</a
|
||||
>
|
||||
<RouterLink
|
||||
v-if="row.orderId"
|
||||
class="detail-link"
|
||||
:to="`/admin/orders/${row.orderId}`"
|
||||
>订单 #{{ row.orderId }}</RouterLink
|
||||
>
|
||||
<RouterLink v-if="row.taskId" class="detail-link" :to="`/admin/tasks/${row.taskId}`"
|
||||
>任务 {{ row.taskNo || row.taskId }}</RouterLink
|
||||
>
|
||||
<span v-if="!row.claimUrl && !row.orderId && !row.taskId" class="cell-subline"
|
||||
>-</span
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user