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 */
|
/** batch delete retryTask */
|
||||||
export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTaskVO) {
|
export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTaskVO) {
|
||||||
return request<number>({
|
return request<number>({
|
||||||
|
@ -133,7 +133,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
width: 80,
|
width: 80,
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
{row.retryStatus === 1 ? (
|
{row.retryStatus === 1 || row.retryStatus === 2 ? (
|
||||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id)}>
|
<NPopconfirm onPositiveClick={() => handleDelete(row.id)}>
|
||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmDelete'),
|
default: () => $t('common.confirmDelete'),
|
||||||
|
@ -4,6 +4,7 @@ import { useBoolean } from '@sa/hooks';
|
|||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import {
|
import {
|
||||||
fetchBatchDeleteRetryTask,
|
fetchBatchDeleteRetryTask,
|
||||||
|
fetchExecuteCallbackTask,
|
||||||
fetchExecuteRetryTask,
|
fetchExecuteRetryTask,
|
||||||
fetchGetAllGroupNameList,
|
fetchGetAllGroupNameList,
|
||||||
fetchGetRetryTaskById,
|
fetchGetRetryTaskById,
|
||||||
@ -158,7 +159,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
||||||
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
{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'),
|
default: () => $t('common.confirmExecute'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
@ -281,8 +282,15 @@ function handleBatchAdd() {
|
|||||||
openBatchAddDrawer();
|
openBatchAddDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleExecute(groupName: string, uniqueId: string) {
|
function handleExecute(groupName: string, uniqueId: string, type: Api.RetryTask.TaskType) {
|
||||||
fetchExecuteRetryTask({ groupName, uniqueIds: [uniqueId] });
|
if (type === 1) {
|
||||||
|
fetchExecuteRetryTask({ groupName, uniqueIds: [uniqueId] });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type === 2) {
|
||||||
|
fetchExecuteCallbackTask({ groupName, uniqueIds: [uniqueId] });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleResume(id: number, groupName: string) {
|
function handleResume(id: number, groupName: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user