feat(1.4.0-beta1): 1. 修复死信列表查询失败问题 2.调试死信回滚、删除功能
This commit is contained in:
parent
e596020241
commit
4bd7d65616
@ -28,6 +28,7 @@ const local: App.I18n.Schema = {
|
||||
rollbackSuccess: 'Rollback Success',
|
||||
deleteSuccess: 'Delete Success',
|
||||
confirmDelete: 'Are you sure you want to delete?',
|
||||
confirmRollback: 'Are you sure you want to rollback?',
|
||||
checkUploadType: 'Only JSON format files can be uploaded, please re-upload',
|
||||
second: 's',
|
||||
millisecond: 'ms',
|
||||
|
@ -28,6 +28,7 @@ const local: App.I18n.Schema = {
|
||||
rollbackSuccess: '回滚成功',
|
||||
deleteSuccess: '删除成功',
|
||||
confirmDelete: '确认删除吗?',
|
||||
confirmRollback: '确认回滚吗?',
|
||||
checkUploadType: '只能上传json格式的文件,请重新上传',
|
||||
second: '秒',
|
||||
millisecond: '毫秒',
|
||||
|
1
src/typings/app.d.ts
vendored
1
src/typings/app.d.ts
vendored
@ -308,6 +308,7 @@ declare namespace App {
|
||||
batchRollback: string;
|
||||
rollbackSuccess: string;
|
||||
deleteSuccess: string;
|
||||
confirmRollback: string;
|
||||
confirmDelete: string;
|
||||
checkUploadType: string;
|
||||
second: string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script setup lang="tsx">
|
||||
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
||||
import { NButton, NPopconfirm } from 'naive-ui';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useBoolean } from '@sa/hooks';
|
||||
import {
|
||||
@ -12,8 +12,7 @@ import {
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
import { retryTaskTypeRecord } from '@/constants/business';
|
||||
import { monthRangeISO8601, tagColor } from '@/utils/common';
|
||||
import { monthRangeISO8601 } from '@/utils/common';
|
||||
import RetryDeadLetterSearch from './modules/dead-letter-search.vue';
|
||||
import RetryDeadLetterDetailDrawer from './modules/retry-letter-detail-drawer.vue';
|
||||
|
||||
@ -45,13 +44,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
key: 'id',
|
||||
title: $t('common.index'),
|
||||
align: 'center',
|
||||
width: 64
|
||||
},
|
||||
{
|
||||
key: 'uniqueId',
|
||||
title: $t('page.retryDeadLetter.uniqueId'),
|
||||
align: 'left',
|
||||
minWidth: 120,
|
||||
width: 120,
|
||||
render: row => {
|
||||
async function showDetailDrawer() {
|
||||
await loadRetryInfo(row);
|
||||
@ -60,7 +53,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
|
||||
return (
|
||||
<n-button text tag="a" type="primary" onClick={showDetailDrawer} class="ws-normal">
|
||||
{row.uniqueId}
|
||||
{row.id}
|
||||
</n-button>
|
||||
);
|
||||
}
|
||||
@ -68,45 +61,31 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
{
|
||||
key: 'groupName',
|
||||
title: $t('page.retryDeadLetter.groupName'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'sceneName',
|
||||
title: $t('page.retryDeadLetter.sceneName'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'idempotentId',
|
||||
title: $t('page.retryDeadLetter.idempotentId'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'bizNo',
|
||||
title: $t('page.retryDeadLetter.bizNo'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'taskType',
|
||||
title: $t('page.retryDeadLetter.taskType'),
|
||||
align: 'left',
|
||||
minWidth: 120,
|
||||
render: row => {
|
||||
if (row.taskType === null) {
|
||||
return null;
|
||||
}
|
||||
const label = $t(retryTaskTypeRecord[row.taskType!]);
|
||||
|
||||
return <NTag type={tagColor(row.taskType!)}>{label}</NTag>;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'createDt',
|
||||
title: $t('page.retryDeadLetter.createDt'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
@ -116,9 +95,16 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
width: 130,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
<NButton type="primary" text ghost size="small" onClick={() => rollback(row)}>
|
||||
{$t('common.rollback')}
|
||||
</NButton>
|
||||
<NPopconfirm onPositiveClick={() => rollback(row)}>
|
||||
{{
|
||||
default: () => $t('common.confirmRollback'),
|
||||
trigger: () => (
|
||||
<NButton type="info" text ghost size="small">
|
||||
{$t('common.rollback')}
|
||||
</NButton>
|
||||
)
|
||||
}}
|
||||
</NPopconfirm>
|
||||
<n-divider vertical />
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row)}>
|
||||
{{
|
||||
@ -152,8 +138,7 @@ async function handleBatchDelete() {
|
||||
async function handleBatchRollback() {
|
||||
// request
|
||||
const { error } = await fetchRollbackRetryDeadLetter({
|
||||
ids: checkedRowKeys.value as any[],
|
||||
groupName: searchParams.groupName!
|
||||
ids: checkedRowKeys.value as any[]
|
||||
});
|
||||
if (error) return;
|
||||
window.$message?.success($t('common.rollbackSuccess'));
|
||||
@ -181,7 +166,6 @@ async function rollback(row: Api.RetryDeadLetter.DeadLetter) {
|
||||
onMounted(async () => {
|
||||
const { error, data: groupList } = await fetchGetAllGroupNameList();
|
||||
if (!error && groupList.length > 0) {
|
||||
searchParams.groupName = groupList[0];
|
||||
getData();
|
||||
}
|
||||
});
|
||||
@ -208,12 +192,17 @@ onMounted(async () => {
|
||||
@refresh="getData"
|
||||
>
|
||||
<template #addAfter>
|
||||
<NButton size="small" ghost type="primary" @click="handleBatchRollback">
|
||||
<template #icon>
|
||||
<IconTdesignRollback class="text-icon" />
|
||||
<NPopconfirm @positive-click="handleBatchRollback">
|
||||
<template #trigger>
|
||||
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0">
|
||||
<template #icon>
|
||||
<IconTdesignRollback class="text-icon" />
|
||||
</template>
|
||||
{{ $t('common.batchRollback') }}
|
||||
</NButton>
|
||||
</template>
|
||||
{{ $t('common.batchRollback') }}
|
||||
</NButton>
|
||||
{{ $t('common.confirmRollback') }}
|
||||
</NPopconfirm>
|
||||
</template>
|
||||
</TableHeaderOperation>
|
||||
</template>
|
||||
|
@ -1,7 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@/locales';
|
||||
import { tagColor } from '@/utils/common';
|
||||
import { retryTaskTypeRecord } from '@/constants/business';
|
||||
|
||||
defineOptions({
|
||||
name: 'RetryDeadLetterDetailDrawer'
|
||||
@ -21,22 +19,16 @@ defineProps<Props>();
|
||||
<template>
|
||||
<OperateDrawer v-model="visible" :title="$t('page.retryDeadLetter.detail')">
|
||||
<NDescriptions label-placement="top" bordered :column="3">
|
||||
<NDescriptionsItem :label="$t('page.retryTask.uniqueId')" :span="3">
|
||||
{{ rowData?.uniqueId }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.groupName')" :span="3">{{ rowData?.groupName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.sceneName')" :span="3">{{ rowData?.sceneName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.taskType')" :span="1">
|
||||
<NTag :type="tagColor(rowData?.taskType!)">{{ $t(retryTaskTypeRecord[rowData?.taskType!]) }}</NTag>
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.bizNo')" :span="2">{{ rowData?.bizNo }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.idempotentId')" :span="3">
|
||||
<NDescriptionsItem :label="$t('page.retry.groupName')" :span="3">{{ rowData?.groupName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retry.sceneName')" :span="3">{{ rowData?.sceneName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retry.bizNo')" :span="3">{{ rowData?.bizNo }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retry.idempotentId')" :span="3">
|
||||
{{ rowData?.idempotentId }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.executorName')" :span="3">
|
||||
<NDescriptionsItem :label="$t('page.retry.executorName')" :span="3">
|
||||
{{ rowData?.executorName }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.argsStr')" :span="3">{{ rowData?.argsStr }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retry.argsStr')" :span="3">{{ rowData?.argsStr }}</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('common.createDt')" :span="3">{{ rowData?.createDt }}</NDescriptionsItem>
|
||||
</NDescriptions>
|
||||
</OperateDrawer>
|
||||
|
Loading…
Reference in New Issue
Block a user