feat(sj_1.0.0): 调整按钮样式
This commit is contained in:
parent
890b3c5fd7
commit
f843eacb70
@ -87,6 +87,12 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
return <NTag type={tagMap[row.taskBatchStatus!]}>{label}</NTag>;
|
return <NTag type={tagMap[row.taskBatchStatus!]}>{label}</NTag>;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'createDt',
|
||||||
|
title: $t('common.createDt'),
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'operationReason',
|
key: 'operationReason',
|
||||||
title: $t('page.jobBatch.operationReason'),
|
title: $t('page.jobBatch.operationReason'),
|
||||||
@ -113,7 +119,7 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmStop'),
|
default: () => $t('common.confirmStop'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.stop')}
|
{$t('common.stop')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
@ -127,7 +133,7 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmRetry'),
|
default: () => $t('common.confirmRetry'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="warning" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.retry')}
|
{$t('common.retry')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
|
@ -112,14 +112,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
width: 130,
|
width: 130,
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
<NButton type="primary" ghost size="small" onClick={() => rollback(row)}>
|
<NButton type="primary" text ghost size="small" onClick={() => rollback(row)}>
|
||||||
{$t('common.rollback')}
|
{$t('common.rollback')}
|
||||||
</NButton>
|
</NButton>
|
||||||
|
<n-divider vertical />
|
||||||
<NPopconfirm onPositiveClick={() => handleDelete(row)}>
|
<NPopconfirm onPositiveClick={() => handleDelete(row)}>
|
||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmDelete'),
|
default: () => $t('common.confirmDelete'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.delete')}
|
{$t('common.delete')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
|
@ -132,7 +132,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmDelete'),
|
default: () => $t('common.confirmDelete'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.delete')}
|
{$t('common.delete')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
|
@ -147,10 +147,10 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
title: $t('common.operate'),
|
title: $t('common.operate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 130,
|
width: 120,
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
<NButton type="primary" ghost size="small" onClick={() => edit(row.id!)}>
|
<NButton type="primary" text ghost size="small" onClick={() => edit(row.id!)}>
|
||||||
{$t('common.edit')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,61 +150,73 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
||||||
{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!)}>
|
||||||
default: () => $t('common.confirmExecute'),
|
{{
|
||||||
trigger: () => (
|
default: () => $t('common.confirmExecute'),
|
||||||
<NButton type="info" ghost size="small">
|
trigger: () => (
|
||||||
{$t('common.execute')}
|
<NButton type="info" text ghost size="small">
|
||||||
</NButton>
|
{$t('common.execute')}
|
||||||
)
|
</NButton>
|
||||||
}}
|
)
|
||||||
</NPopconfirm>
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
<n-divider vertical />
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
{/* 非[完成,最大次数], 显示[完成]按钮 */}
|
{/* 非[完成,最大次数], 显示[完成]按钮 */}
|
||||||
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
||||||
<NPopconfirm onPositiveClick={() => handleFinish(Number(row.id!), row.groupName!)}>
|
<>
|
||||||
{{
|
<NPopconfirm onPositiveClick={() => handleFinish(Number(row.id!), row.groupName!)}>
|
||||||
default: () => $t('common.confirmFinish'),
|
{{
|
||||||
trigger: () => (
|
default: () => $t('common.confirmFinish'),
|
||||||
<NButton type="warning" ghost size="small">
|
trigger: () => (
|
||||||
{$t('common.finish')}
|
<NButton type="warning" text ghost size="small">
|
||||||
</NButton>
|
{$t('common.finish')}
|
||||||
)
|
</NButton>
|
||||||
}}
|
)
|
||||||
</NPopconfirm>
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
<n-divider vertical />
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
{/* 重试中, 显示[停止]按钮 */}
|
{/* 重试中, 显示[停止]按钮 */}
|
||||||
{row.retryStatus === 0 ? (
|
{row.retryStatus === 0 ? (
|
||||||
<NPopconfirm onPositiveClick={() => handlePause(Number(row.id!), row.groupName!)}>
|
<>
|
||||||
{{
|
<NPopconfirm onPositiveClick={() => handlePause(Number(row.id!), row.groupName!)}>
|
||||||
default: () => $t('common.confirmPause'),
|
{{
|
||||||
trigger: () => (
|
default: () => $t('common.confirmPause'),
|
||||||
<NButton type="success" ghost size="small">
|
trigger: () => (
|
||||||
{$t('common.pause')}
|
<NButton type="success" text ghost size="small">
|
||||||
</NButton>
|
{$t('common.pause')}
|
||||||
)
|
</NButton>
|
||||||
}}
|
)
|
||||||
</NPopconfirm>
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
<n-divider vertical />
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
{/* 暂停, 显示[开始]按钮 */}
|
{/* 暂停, 显示[开始]按钮 */}
|
||||||
{row.retryStatus === 3 ? (
|
{row.retryStatus === 3 ? (
|
||||||
<NPopconfirm onPositiveClick={() => handleResume(Number(row.id!), row.groupName!)}>
|
<>
|
||||||
{{
|
<NPopconfirm onPositiveClick={() => handleResume(Number(row.id!), row.groupName!)}>
|
||||||
default: () => $t('common.confirmResume'),
|
{{
|
||||||
trigger: () => (
|
default: () => $t('common.confirmResume'),
|
||||||
<NButton type="info" ghost size="small">
|
trigger: () => (
|
||||||
{$t('common.resume')}
|
<NButton type="info" text ghost size="small">
|
||||||
</NButton>
|
{$t('common.resume')}
|
||||||
)
|
</NButton>
|
||||||
}}
|
)
|
||||||
</NPopconfirm>
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
<n-divider vertical />
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
@ -213,7 +225,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmDelete'),
|
default: () => $t('common.confirmDelete'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.delete')}
|
{$t('common.delete')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
|
@ -107,14 +107,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
width: 130,
|
width: 130,
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
<NButton type="primary" ghost size="small" onClick={() => edit(row.id!)}>
|
<NButton type="primary" ghost size="small" text onClick={() => edit(row.id!)}>
|
||||||
{$t('common.edit')}
|
{$t('common.edit')}
|
||||||
</NButton>
|
</NButton>
|
||||||
|
<n-divider vertical />
|
||||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmDelete'),
|
default: () => $t('common.confirmDelete'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.delete')}
|
{$t('common.delete')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
|
@ -102,7 +102,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
width: 130,
|
width: 130,
|
||||||
render: row => (
|
render: row => (
|
||||||
<div class="flex-center gap-8px">
|
<div class="flex-center gap-8px">
|
||||||
<NButton type="primary" ghost size="small" onClick={() => detail(row.id!)}>
|
<NButton type="primary" ghost text size="small" onClick={() => detail(row.id!)}>
|
||||||
{$t('common.detail')}
|
{$t('common.detail')}
|
||||||
</NButton>
|
</NButton>
|
||||||
{row?.taskBatchStatus === 1 || row?.taskBatchStatus === 2 ? (
|
{row?.taskBatchStatus === 1 || row?.taskBatchStatus === 2 ? (
|
||||||
@ -110,7 +110,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmStop'),
|
default: () => $t('common.confirmStop'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
<NButton type="error" ghost size="small">
|
<NButton type="error" text ghost size="small">
|
||||||
{$t('common.stop')}
|
{$t('common.stop')}
|
||||||
</NButton>
|
</NButton>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user