style(sj_map_reduce): 优化任务批次操作按钮栏
This commit is contained in:
parent
34826d7ea4
commit
629204f270
@ -159,41 +159,61 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
title: $t('common.operate'),
|
title: $t('common.operate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 130,
|
width: 130,
|
||||||
render: row => (
|
render: row => {
|
||||||
<div class="flex-center gap-8px">
|
const stopBtn = () => {
|
||||||
<NButton type="primary" text ghost size="small" onClick={handleLog}>
|
if (row.taskBatchStatus === 1 || row.taskBatchStatus === 2) {
|
||||||
{$t('common.log')}
|
return (
|
||||||
</NButton>
|
<>
|
||||||
{row.taskBatchStatus === 1 || row.taskBatchStatus === 2 ? (
|
<n-divider vertical />
|
||||||
<NPopconfirm onPositiveClick={() => handleStopJob(row.id!)}>
|
<NPopconfirm onPositiveClick={() => handleStopJob(row.id!)}>
|
||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmStop'),
|
default: () => $t('common.confirmStop'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" text ghost size="small">
|
<>
|
||||||
{$t('common.stop')}
|
<n-divider vertical />
|
||||||
</NButton>
|
<NButton type="error" text ghost size="small">
|
||||||
)
|
{$t('common.stop')}
|
||||||
}}
|
</NButton>
|
||||||
</NPopconfirm>
|
</>
|
||||||
) : (
|
)
|
||||||
''
|
}}
|
||||||
)}
|
</NPopconfirm>
|
||||||
{row.taskBatchStatus === 4 || row.taskBatchStatus === 5 || row.taskBatchStatus === 6 ? (
|
</>
|
||||||
<NPopconfirm onPositiveClick={() => handleRetryJob(row.id!)}>
|
);
|
||||||
{{
|
}
|
||||||
default: () => $t('common.confirmRetry'),
|
return null;
|
||||||
trigger: () => (
|
};
|
||||||
<NButton type="error" text ghost size="small">
|
|
||||||
{$t('common.retry')}
|
const retryBtn = () => {
|
||||||
</NButton>
|
if (row.taskBatchStatus === 4 || row.taskBatchStatus === 5 || row.taskBatchStatus === 6) {
|
||||||
)
|
return (
|
||||||
}}
|
<>
|
||||||
</NPopconfirm>
|
<n-divider vertical />
|
||||||
) : (
|
<NPopconfirm onPositiveClick={() => handleRetryJob(row.id!)}>
|
||||||
''
|
{{
|
||||||
)}
|
default: () => $t('common.confirmRetry'),
|
||||||
</div>
|
trigger: () => (
|
||||||
)
|
<NButton type="error" text ghost size="small">
|
||||||
|
{$t('common.retry')}
|
||||||
|
</NButton>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div class="flex-center gap-8px">
|
||||||
|
<NButton type="primary" text ghost size="small" onClick={handleLog}>
|
||||||
|
{$t('common.log')}
|
||||||
|
</NButton>
|
||||||
|
{stopBtn()}
|
||||||
|
{retryBtn()}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user