优化 Webhook 列表, 优化日志系统
This commit is contained in:
@@ -486,6 +486,7 @@ export interface AdminWebhookEventListItem {
|
||||
signatureValid: boolean
|
||||
processed: boolean
|
||||
processError: string
|
||||
visibilityLevel: string
|
||||
relatedOrderId: number | null
|
||||
platformOrderId: string
|
||||
buyerId: string
|
||||
|
||||
@@ -54,6 +54,12 @@ export const adminWebhookProcessedOptions = [
|
||||
{ label: '处理失败', value: '0' },
|
||||
]
|
||||
|
||||
export const adminWebhookVisibilityOptions = [
|
||||
{ label: '仅重要', value: 'important' },
|
||||
{ label: '仅忽略', value: 'ignored' },
|
||||
{ label: '全部', value: 'all' },
|
||||
]
|
||||
|
||||
export const adminUserRoleOptions = [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '管理员', value: 'admin' },
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { AdminPagination, AdminWebhookEventListItem } from '@/types/admin'
|
||||
import { hasAdminRole } from '@/utils/admin-auth'
|
||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
import { formatAdminWebhookEventType } from '@/utils/admin-webhook'
|
||||
import { adminWebhookProcessedOptions } from '@/utils/admin-options'
|
||||
import { adminWebhookProcessedOptions, adminWebhookVisibilityOptions } from '@/utils/admin-options'
|
||||
|
||||
const loading = ref(true)
|
||||
const actionLoadingId = ref<number | null>(null)
|
||||
@@ -19,6 +19,7 @@ const provider = ref('')
|
||||
const platform = ref('')
|
||||
const platformOrderId = ref('')
|
||||
const processed = ref('')
|
||||
const visibility = ref('important')
|
||||
const relatedOrderId = ref('')
|
||||
const dateFrom = ref('')
|
||||
const dateTo = ref('')
|
||||
@@ -40,6 +41,7 @@ async function loadEvents(page = pagination.value.page) {
|
||||
platform: platform.value.trim(),
|
||||
platformOrderId: platformOrderId.value.trim(),
|
||||
processed: processed.value.trim(),
|
||||
visibility: visibility.value.trim(),
|
||||
relatedOrderId: relatedOrderId.value.trim(),
|
||||
dateFrom: dateFrom.value.trim(),
|
||||
dateTo: dateTo.value.trim(),
|
||||
@@ -116,6 +118,11 @@ onMounted(loadEvents)
|
||||
{{ option.label }}
|
||||
</option>
|
||||
</select>
|
||||
<select v-model="visibility" class="text-input select-input">
|
||||
<option v-for="option in adminWebhookVisibilityOptions" :key="option.value" :value="option.value">
|
||||
{{ option.label }}
|
||||
</option>
|
||||
</select>
|
||||
<input v-model="platformOrderId" class="text-input" placeholder="平台订单号" />
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user