feat(sj_1.1.0-beta3): 优化删除
This commit is contained in:
parent
8dc50bb21e
commit
3317040c0c
@ -62,6 +62,15 @@ export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskReque
|
||||
});
|
||||
}
|
||||
|
||||
/** manual execute callbackTask */
|
||||
export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task/manual/trigger/callback/task',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** batch delete retryTask */
|
||||
export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTaskVO) {
|
||||
return request<number>({
|
||||
|
@ -133,7 +133,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
width: 80,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
{row.retryStatus === 1 ? (
|
||||
{row.retryStatus === 1 || row.retryStatus === 2 ? (
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id)}>
|
||||
{{
|
||||
default: () => $t('common.confirmDelete'),
|
||||
|
@ -4,6 +4,7 @@ import { useBoolean } from '@sa/hooks';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import {
|
||||
fetchBatchDeleteRetryTask,
|
||||
fetchExecuteCallbackTask,
|
||||
fetchExecuteRetryTask,
|
||||
fetchGetAllGroupNameList,
|
||||
fetchGetRetryTaskById,
|
||||
@ -158,7 +159,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
||||
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
||||
<>
|
||||
<NPopconfirm onPositiveClick={() => handleExecute(row.groupName!, row.uniqueId!)}>
|
||||
<NPopconfirm onPositiveClick={() => handleExecute(row.groupName!, row.uniqueId!, row.taskType!)}>
|
||||
{{
|
||||
default: () => $t('common.confirmExecute'),
|
||||
trigger: () => (
|
||||
@ -281,8 +282,15 @@ function handleBatchAdd() {
|
||||
openBatchAddDrawer();
|
||||
}
|
||||
|
||||
function handleExecute(groupName: string, uniqueId: string) {
|
||||
fetchExecuteRetryTask({ groupName, uniqueIds: [uniqueId] });
|
||||
function handleExecute(groupName: string, uniqueId: string, type: Api.RetryTask.TaskType) {
|
||||
if (type === 1) {
|
||||
fetchExecuteRetryTask({ groupName, uniqueIds: [uniqueId] });
|
||||
return;
|
||||
}
|
||||
|
||||
if (type === 2) {
|
||||
fetchExecuteCallbackTask({ groupName, uniqueIds: [uniqueId] });
|
||||
}
|
||||
}
|
||||
|
||||
function handleResume(id: number, groupName: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user